var image1first, image2first, image1second, image2second, image1third, image2third;
SimpleTest.waitForExplicitFinish();
function checkFirst()
{ var iframeelem = document.getElementById('test-iframe'); varcanvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d');
var firstimg = iframeelem.contentDocument.getElementById('image1'); var secondimg = iframeelem.contentDocument.getElementById('image2');
ctx.drawImage(firstimg, 0, 0);
image1first = canvas.toDataURL();
ctx.drawImage(secondimg, 0, 0);
image2first = canvas.toDataURL();
ok(image1first == image2first, "We got different images, but shouldn't have.");
function checkForceReload()
{ var iframeelem = document.getElementById('test-iframe'); varcanvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d');
var firstimg = iframeelem.contentDocument.getElementById('image1'); var secondimg = iframeelem.contentDocument.getElementById('image2');
ctx.drawImage(firstimg, 0, 0);
image1second = canvas.toDataURL();
ctx.drawImage(secondimg, 0, 0);
image2second = canvas.toDataURL();
ok(image1second == image2second, "We got different images after a force-reload, but shouldn't have.");
// Sanity check that we actually reloaded.
ok(image1first != image1second, "We got the same images after a force-reload.");
function checkReload()
{ var iframeelem = document.getElementById('test-iframe'); varcanvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d');
var firstimg = iframeelem.contentDocument.getElementById('image1'); var secondimg = iframeelem.contentDocument.getElementById('image2');
ctx.drawImage(firstimg, 0, 0);
image1third = canvas.toDataURL();
ctx.drawImage(secondimg, 0, 0);
image2third = canvas.toDataURL();
ok(image1third == image2third, "We got different images after a reload, but shouldn't have.");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.