Diff
Modified: trunk/LayoutTests/ChangeLog (120546 => 120547)
--- trunk/LayoutTests/ChangeLog 2012-06-17 04:53:31 UTC (rev 120546)
+++ trunk/LayoutTests/ChangeLog 2012-06-17 07:01:14 UTC (rev 120547)
@@ -1,3 +1,12 @@
+2012-06-17 Adam Barth <[email protected]>
+
+ Update a few more tests to use internals.settings.setDeviceScaleFactor.
+
+ * compositing/tiled-layers-hidpi.html:
+ * fast/canvas/2d.backingStorePixelRatio.html:
+ * fast/canvas/2d.imageDataHD.html:
+ * platform/mac-wk2/plugins/contents-scale-factor.html:
+
2012-06-16 Adam Barth <[email protected]>
layoutTestController.setBackingScaleFactor is redundant with (and less awesome than) internals.settings.setDeviceScaleFactor
Modified: trunk/LayoutTests/compositing/tiled-layers-hidpi.html (120546 => 120547)
--- trunk/LayoutTests/compositing/tiled-layers-hidpi.html 2012-06-17 04:53:31 UTC (rev 120546)
+++ trunk/LayoutTests/compositing/tiled-layers-hidpi.html 2012-06-17 07:01:14 UTC (rev 120547)
@@ -12,16 +12,13 @@
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
- testRunner.setBackingScaleFactor(2, finishTest);
+ internals.settings.setDeviceScaleFactor(2);
+ setTimeout(function() {
+ document.getElementById('layer-tree').innerText = window.testRunner.layerTreeAsText();
+ testRunner.notifyDone();
+ }, 0);
}
}
-
- function finishTest() {
- setTimeout(function() {
- document.getElementById('layer-tree').innerText = window.testRunner.layerTreeAsText();
- testRunner.notifyDone();
- }, 0);
- }
</script>
</head>
<body _onload_="startTest();">
Modified: trunk/LayoutTests/fast/canvas/2d.backingStorePixelRatio.html (120546 => 120547)
--- trunk/LayoutTests/fast/canvas/2d.backingStorePixelRatio.html 2012-06-17 04:53:31 UTC (rev 120546)
+++ trunk/LayoutTests/fast/canvas/2d.backingStorePixelRatio.html 2012-06-17 07:01:14 UTC (rev 120547)
@@ -11,7 +11,8 @@
var context1 = canvas1.getContext("2d");
layoutTestController.waitUntilDone();
- layoutTestController.setBackingScaleFactor(2, function() {
+ internals.settings.setDeviceScaleFactor(2);
+ setTimeout(function() {
var canvas2 = document.createElement("canvas");
var context2 = canvas2.getContext("2d");
@@ -19,7 +20,7 @@
log ("context2.webkitBackingStorePixelRatio is " + context2.webkitBackingStorePixelRatio);
layoutTestController.notifyDone();
- });
+ }, 0);
} else {
log ("When not run inside DumpRenderTree or WebKitTestRunner, this test just prints the value of");
log ("backingStorePixelRatio. Please verify that it matches what you expect, based on the");
Modified: trunk/LayoutTests/fast/canvas/2d.imageDataHD.html (120546 => 120547)
--- trunk/LayoutTests/fast/canvas/2d.imageDataHD.html 2012-06-17 04:53:31 UTC (rev 120546)
+++ trunk/LayoutTests/fast/canvas/2d.imageDataHD.html 2012-06-17 07:01:14 UTC (rev 120547)
@@ -52,7 +52,8 @@
log("This test requires WebKitTestRunner or DumpRenderTree.");
layoutTestController.waitUntilDone();
- layoutTestController.setBackingScaleFactor(2, function() {
+ internals.settings.setDeviceScaleFactor(2);
+ setTimeout(function() {
var canvas = document.createElement("canvas");
canvas.width = 8;
canvas.height = 8;
@@ -114,5 +115,5 @@
log("High-DPI canvas is not enabled.");
layoutTestController.notifyDone();
- });
+ }, 0);
</script>
Modified: trunk/LayoutTests/platform/mac-wk2/plugins/contents-scale-factor.html (120546 => 120547)
--- trunk/LayoutTests/platform/mac-wk2/plugins/contents-scale-factor.html 2012-06-17 04:53:31 UTC (rev 120546)
+++ trunk/LayoutTests/platform/mac-wk2/plugins/contents-scale-factor.html 2012-06-17 07:01:14 UTC (rev 120547)
@@ -29,8 +29,8 @@
shouldBe("plugin1.contentsScaleFactor", "1.0");
shouldBe("plugin1.cachedContentsScaleFactor", "1.0");
- // Now change the backing scale factor.
- testRunner.setBackingScaleFactor(2, function() {
+ internals.settings.setDeviceScaleFactor(2);
+ setTimeout(function() {
shouldBe("plugin1.contentsScaleFactor", "2.0");
shouldBe("plugin1.cachedContentsScaleFactor", "2.0");
@@ -41,7 +41,7 @@
shouldBe("plugin2.cachedContentsScaleFactor", "2.0");
testRunner.notifyDone();
- });
+ }, 0);
}
</script>