| OLD | NEW |
| (Empty) |
| 1 <pre id="console"></pre> | |
| 2 <script> | |
| 3 function log(message) | |
| 4 { | |
| 5 document.getElementById("console").appendChild(document.createTextNode(m
essage + "\n")); | |
| 6 } | |
| 7 | |
| 8 if (window.testRunner) { | |
| 9 testRunner.dumpAsText(); | |
| 10 var canvas1 = document.createElement("canvas"); | |
| 11 var context1 = canvas1.getContext("2d"); | |
| 12 | |
| 13 testRunner.waitUntilDone(); | |
| 14 testRunner.setBackingScaleFactor(2, function() { | |
| 15 var canvas2 = document.createElement("canvas"); | |
| 16 var context2 = canvas2.getContext("2d"); | |
| 17 | |
| 18 log ("context1.webkitBackingStorePixelRatio is " + context1.webkitBa
ckingStorePixelRatio); | |
| 19 log ("context2.webkitBackingStorePixelRatio is " + context2.webkitBa
ckingStorePixelRatio); | |
| 20 | |
| 21 testRunner.notifyDone(); | |
| 22 }); | |
| 23 } else { | |
| 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 exp
ect, 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.webkitBackingS
torePixelRatio); | |
| 30 } | |
| 31 </script> | |
| OLD | NEW |