1 <pre id="console"></pre>
5 document.getElementById("console").appendChild(document.createTextNode(message + "\n"));
8 if (window.testRunner) {
9 testRunner.dumpAsText();
10 var canvas1 = document.createElement("canvas");
11 var context1 = canvas1.getContext("2d");
13 testRunner.waitUntilDone();
14 testRunner.setBackingScaleFactor(2, function() {
15 var canvas2 = document.createElement("canvas");
16 var context2 = canvas2.getContext("2d");
18 log ("context1.webkitBackingStorePixelRatio is " + context1.webkitBackingStorePixelRatio);
19 log ("context2.webkitBackingStorePixelRatio is " + context2.webkitBackingStorePixelRatio);
21 testRunner.notifyDone();
24 log ("When not run inside DumpRenderTree or WebKitTestRunner, this test just prints the value of");
25 log ("backingStorePixelRatio. Please verify that it matches what you expect, based on the");
26 log ("current configuration.\n");
27 var canvas = document.createElement("canvas");
28 var context = canvas.getContext("2d");
29 log ("context.webkitBackingStorePixelRatio is " + context.webkitBackingStorePixelRatio);