Improve srcset's layout tests
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 Aug 2013 21:43:39 +0000 (21:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 Aug 2013 21:43:39 +0000 (21:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=120274

Moved srcset's tests to use js-test-pre, and output text with clear PASS/FAILED statements.
Added expected.txt files to the test directory, since there shouldn't be any platform variance in the results.
For some of the tests, added an equivalent 1x/2x test, to make sure the feature behaves on both DPRs.
Added preload tests on the "change-dynamically" tests, to make sure the 'src' resource is not loaded when it shouldn't.

Patch by Yoav Weiss <yoav@yoav.ws> on 2013-08-25
Reviewed by Andreas Kling.

* fast/hidpi/image-srcset-change-dynamically-from-js-1x-expected.txt: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js-1x.html: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js-2x-expected.txt: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js-2x.html: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js.html: Removed.
* fast/hidpi/image-srcset-data-src-expected.txt: Added.
* fast/hidpi/image-srcset-data-src.html:
* fast/hidpi/image-srcset-data-srcset-expected.txt: Added.
* fast/hidpi/image-srcset-data-srcset.html:
* fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt: Added.
* fast/hidpi/image-srcset-invalid-inputs-correct-src.html:
* fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt: Added.
* fast/hidpi/image-srcset-invalid-inputs-except-one.html:
* fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt: Added.
* fast/hidpi/image-srcset-remove-dynamically-from-js.html:
* fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt: Added.
* fast/hidpi/image-srcset-same-alternative-for-both-attributes.html:
* fast/hidpi/image-srcset-simple-1x-expected.txt: Added.
* fast/hidpi/image-srcset-simple-1x.html: Added.
* fast/hidpi/image-srcset-simple-2x-expected.txt: Added.
* fast/hidpi/image-srcset-simple-2x.html: Added.
* fast/hidpi/image-srcset-simple.html: Removed.
* fast/hidpi/image-srcset-src-selection-1x-expected.txt: Added.
* fast/hidpi/image-srcset-src-selection-1x.html: Added.
* fast/hidpi/image-srcset-src-selection-2x-expected.txt: Added.
* fast/hidpi/image-srcset-src-selection-2x.html: Added.
* fast/hidpi/image-srcset-src-selection.html: Removed.
* fast/hidpi/image-srcset-viewport-modifiers-expected.txt: Added.
* fast/hidpi/image-srcset-viewport-modifiers.html:
* platform/mac/fast/hidpi/image-srcset-change-dynamically-from-js-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-data-src-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-data-srcset-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-simple-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-src-selection-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-viewport-modifiers-expected.txt: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154582 268f45cc-cd09-0410-ab3c-d52691b4dbfc

40 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x.html [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js.html [deleted file]
LayoutTests/fast/hidpi/image-srcset-data-src-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-data-src.html
LayoutTests/fast/hidpi/image-srcset-data-srcset-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-data-srcset.html
LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src.html
LayoutTests/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-invalid-inputs-except-one.html
LayoutTests/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-remove-dynamically-from-js.html
LayoutTests/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-same-alternative-for-both-attributes.html
LayoutTests/fast/hidpi/image-srcset-simple-1x-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-simple-1x.html [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-simple-2x-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-simple-2x.html [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-simple.html [deleted file]
LayoutTests/fast/hidpi/image-srcset-src-selection-1x-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-src-selection-1x.html [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-src-selection-2x-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-src-selection-2x.html [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-src-selection.html [deleted file]
LayoutTests/fast/hidpi/image-srcset-viewport-modifiers-expected.txt [new file with mode: 0644]
LayoutTests/fast/hidpi/image-srcset-viewport-modifiers.html
LayoutTests/platform/mac/fast/hidpi/image-srcset-change-dynamically-from-js-expected.txt [deleted file]
LayoutTests/platform/mac/fast/hidpi/image-srcset-data-src-expected.txt [deleted file]
LayoutTests/platform/mac/fast/hidpi/image-srcset-data-srcset-expected.txt [deleted file]
LayoutTests/platform/mac/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt [deleted file]
LayoutTests/platform/mac/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt [deleted file]
LayoutTests/platform/mac/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt [deleted file]
LayoutTests/platform/mac/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt [deleted file]
LayoutTests/platform/mac/fast/hidpi/image-srcset-simple-expected.txt [deleted file]
LayoutTests/platform/mac/fast/hidpi/image-srcset-src-selection-expected.txt [deleted file]
LayoutTests/platform/mac/fast/hidpi/image-srcset-viewport-modifiers-expected.txt [deleted file]

index 92e3652c839917038e347562afc009cfe7a5251a..b0824c7d5ff19332cae233a03e8fbac7dd24bf8a 100644 (file)
@@ -1,3 +1,55 @@
+2013-08-25  Yoav Weiss  <yoav@yoav.ws>
+
+        Improve srcset's layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=120274
+
+        Moved srcset's tests to use js-test-pre, and output text with clear PASS/FAILED statements.
+        Added expected.txt files to the test directory, since there shouldn't be any platform variance in the results.
+        For some of the tests, added an equivalent 1x/2x test, to make sure the feature behaves on both DPRs.
+        Added preload tests on the "change-dynamically" tests, to make sure the 'src' resource is not loaded when it shouldn't.
+
+        Reviewed by Andreas Kling.
+
+        * fast/hidpi/image-srcset-change-dynamically-from-js-1x-expected.txt: Added.
+        * fast/hidpi/image-srcset-change-dynamically-from-js-1x.html: Added.
+        * fast/hidpi/image-srcset-change-dynamically-from-js-2x-expected.txt: Added.
+        * fast/hidpi/image-srcset-change-dynamically-from-js-2x.html: Added.
+        * fast/hidpi/image-srcset-change-dynamically-from-js.html: Removed.
+        * fast/hidpi/image-srcset-data-src-expected.txt: Added.
+        * fast/hidpi/image-srcset-data-src.html:
+        * fast/hidpi/image-srcset-data-srcset-expected.txt: Added.
+        * fast/hidpi/image-srcset-data-srcset.html:
+        * fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt: Added.
+        * fast/hidpi/image-srcset-invalid-inputs-correct-src.html:
+        * fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt: Added.
+        * fast/hidpi/image-srcset-invalid-inputs-except-one.html:
+        * fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt: Added.
+        * fast/hidpi/image-srcset-remove-dynamically-from-js.html:
+        * fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt: Added.
+        * fast/hidpi/image-srcset-same-alternative-for-both-attributes.html:
+        * fast/hidpi/image-srcset-simple-1x-expected.txt: Added.
+        * fast/hidpi/image-srcset-simple-1x.html: Added.
+        * fast/hidpi/image-srcset-simple-2x-expected.txt: Added.
+        * fast/hidpi/image-srcset-simple-2x.html: Added.
+        * fast/hidpi/image-srcset-simple.html: Removed.
+        * fast/hidpi/image-srcset-src-selection-1x-expected.txt: Added.
+        * fast/hidpi/image-srcset-src-selection-1x.html: Added.
+        * fast/hidpi/image-srcset-src-selection-2x-expected.txt: Added.
+        * fast/hidpi/image-srcset-src-selection-2x.html: Added.
+        * fast/hidpi/image-srcset-src-selection.html: Removed.
+        * fast/hidpi/image-srcset-viewport-modifiers-expected.txt: Added.
+        * fast/hidpi/image-srcset-viewport-modifiers.html:
+        * platform/mac/fast/hidpi/image-srcset-change-dynamically-from-js-expected.txt: Removed.
+        * platform/mac/fast/hidpi/image-srcset-data-src-expected.txt: Removed.
+        * platform/mac/fast/hidpi/image-srcset-data-srcset-expected.txt: Removed.
+        * platform/mac/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt: Removed.
+        * platform/mac/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt: Removed.
+        * platform/mac/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt: Removed.
+        * platform/mac/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt: Removed.
+        * platform/mac/fast/hidpi/image-srcset-simple-expected.txt: Removed.
+        * platform/mac/fast/hidpi/image-srcset-src-selection-expected.txt: Removed.
+        * platform/mac/fast/hidpi/image-srcset-viewport-modifiers-expected.txt: Removed.
+
 2013-08-24  Filip Pizlo  <fpizlo@apple.com>
 
         FloatTypedArrayAdaptor::toJSValue should almost certainly not use jsNumber() since that attempts int conversions
diff --git a/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x-expected.txt b/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x-expected.txt
new file mode 100644 (file)
index 0000000..9e6480a
--- /dev/null
@@ -0,0 +1,4 @@
+PASS internals.isPreloaded("resources/green-200-px-square.png") is false
+PASS document.getElementById("foo").clientWidth==100 is true
+This test passes if this img tag below is a blue square when the scale factor is 1. It ensures that attributes can be changed dynamically from javascript, and that only the correct resource is loaded.
+
diff --git a/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x.html b/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x.html
new file mode 100644 (file)
index 0000000..3f9baa8
--- /dev/null
@@ -0,0 +1,36 @@
+<html>
+<head>
+<script>
+    window.targetScaleFactor = 1;
+</script>
+<script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    function updateSrc() {
+        var img = document.getElementById("foo");
+        // srcset must be set first, otherwise 'src' is loaded as well
+        img.srcset = "resources/green-200-px-square.png 2x";
+        img.src = "resources/blue-100-px-square.png"
+    }
+
+    addEventListener("DOMContentLoaded", function() {
+        updateSrc();
+    }, false);
+    addEventListener("load", function() {
+        if (internals)
+            shouldBeFalse('internals.isPreloaded("resources/green-200-px-square.png")');
+        shouldBeTrue('document.getElementById("foo").clientWidth==100');
+    }, false);
+</script>
+</head>
+
+<body id="body">
+    <div>This test passes if this img tag below is a blue square when the scale factor is 1.
+      It ensures that attributes can be changed dynamically from javascript, and that only the correct resource is loaded.</div>
+    <img id="foo">
+</body>
+</html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x-expected.txt b/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x-expected.txt
new file mode 100644 (file)
index 0000000..a298f6c
--- /dev/null
@@ -0,0 +1,4 @@
+PASS internals.isPreloaded("resources/blue-100-px-square.png") is false
+PASS document.getElementById("foo").clientWidth==200 is true
+This test passes if this img tag below is a green square when the scale factor is 2. It ensures that attributes can be changed dynamically from javascript, and that only the correct resource is loaded.
+
diff --git a/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html b/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html
new file mode 100644 (file)
index 0000000..b6ff475
--- /dev/null
@@ -0,0 +1,33 @@
+<html>
+<head>
+<script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    function updateSrc() {
+        var img = document.getElementById("foo");
+        // srcset must be set first, otherwise 'src' is loaded as well
+        img.srcset = "resources/green-200-px-square.png 2x";
+        img.src = "resources/blue-100-px-square.png"
+    }
+
+    addEventListener("DOMContentLoaded", function() {
+        updateSrc();
+    }, false);
+    addEventListener("load", function() {
+        if (internals)
+            shouldBeFalse('internals.isPreloaded("resources/blue-100-px-square.png")');
+        shouldBeTrue('document.getElementById("foo").clientWidth==200');
+    }, false);
+</script>
+</head>
+
+<body id="body">
+    <div>This test passes if this img tag below is a green square when the scale factor is 2.
+      It ensures that attributes can be changed dynamically from javascript, and that only the correct resource is loaded.</div>
+    <img id="foo">
+</body>
+</html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js.html b/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js.html
deleted file mode 100644 (file)
index 1653ccd..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<html>
-<head>
-<script>
-    function updateSrc() {
-        var img = document.getElementById("foo");
-        img.src = "resources/blue-100-px-square.png"
-        img.srcset = "resources/green-200-px-square.png 1x";
-    }
-
-    function runTest() {
-        if (!window.testRunner || !window.sessionStorage) {
-            updateSrc();
-            return;
-        }
-
-        if (!sessionStorage.scaleFactorIsSet) {
-            testRunner.waitUntilDone();
-            testRunner.setBackingScaleFactor(1, scaleFactorIsSet);
-        }
-
-        if (sessionStorage.pageReloaded && sessionStorage.scaleFactorIsSet) {
-            delete sessionStorage.pageReloaded;
-            delete sessionStorage.scaleFactorIsSet;
-            updateSrc();
-            testRunner.notifyDone();
-        } else {
-            // Right now there is a bug that srcset does not properly deal with dynamic changes to the scale factor,
-            // so to work around that, we must reload the page to get the 1x image.
-            sessionStorage.pageReloaded = true;
-            document.location.reload(true);
-        }
-    }
-
-    function scaleFactorIsSet() {
-        sessionStorage.scaleFactorIsSet = true;
-    }
-
-    window.onload = runTest;
-</script>
-</head>
-
-<body id="body">
-    <div>This test passes if this img tag below is a green square when the scale factor is 1. It ensures that attributes can be changed dynamically from javascript</div>
-    <img id="foo" height="100" width="100"></img>
-</body>
-</html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-data-src-expected.txt b/LayoutTests/fast/hidpi/image-srcset-data-src-expected.txt
new file mode 100644 (file)
index 0000000..ef15046
--- /dev/null
@@ -0,0 +1,3 @@
+PASS document.getElementById("foo").clientWidth==150 is true
+This test passes if the image below looks like a 2x2 grid (yellow, gray, light green, dark green).
+
index 3a093dfd447e8b81bf3244c9d6777ca57bdf5f22..55365e16e4eb3c042bbb03469910a63e91f12df9 100644 (file)
@@ -1,10 +1,19 @@
 <html>
 <head>
-<script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    addEventListener("load", function() {
+        shouldBeTrue('document.getElementById("foo").clientWidth==150');
+    }, false);
+</script>
 </head>
 
 <body id="body">
     <div>This test passes if the image below looks like a 2x2 grid (yellow, gray, light green, dark green).</div>
-    <img height="100" width="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAA8CAIAAAAL5NQ9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2woaBQc4oLEFpAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAACMSURBVHja7dNBEYAgFEVRPhHMYgAzUIsmVnFvB/fsoQb+ObfBmzMvxneW1D1vzz2wFiEUQiFEKIRCKIQIhVAIhRChEAqhECIUQiEUQoRCKIRCiFAIhVAIEep3xTWTLzzu5oVCKIRCiFAIhVAIEQqhEAohQiEUQiFEKIRCKIQIhVAIhRChEAqhECLUZi3VEwcBMGr1NgAAAABJRU5ErkJggg==">
+    <img id="foo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAA8CAIAAAAL5NQ9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2woaBQc4oLEFpAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAACMSURBVHja7dNBEYAgFEVRPhHMYgAzUIsmVnFvB/fsoQb+ObfBmzMvxneW1D1vzz2wFiEUQiFEKIRCKIQIhVAIhRChEAqhECIUQiEUQoRCKIRCiFAIhVAIEep3xTWTLzzu5oVCKIRCiFAIhVAIEQqhEAohQiEUQiFEKIRCKIQIhVAIhRChEAqhECLUZi3VEwcBMGr1NgAAAABJRU5ErkJggg==">
 </body>
 </html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-data-srcset-expected.txt b/LayoutTests/fast/hidpi/image-srcset-data-srcset-expected.txt
new file mode 100644 (file)
index 0000000..8f83a32
--- /dev/null
@@ -0,0 +1,3 @@
+PASS document.getElementById("foo").clientWidth==150 is true
+This test passes if the image below looks like a 2x2 grid (yellow, gray, light green, dark green). In this case the srcset attribute has a base64 url, with the comma escaped.
+
index 144d4378da024376956da9b009ff5258ec304537..4ce2fea0c31d21e06ae36c14e521f9085deabdaf 100644 (file)
@@ -1,10 +1,18 @@
 <html>
 <head>
-<script src="resources/srcset-helper.js"></script>
-</head>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
 
+    addEventListener("load", function() {
+        shouldBeTrue('document.getElementById("foo").clientWidth==150');
+    }, false);
+</script>
+</head>
 <body id="body">
     <div>This test passes if the image below looks like a 2x2 grid (yellow, gray, light green, dark green). In this case the srcset attribute has a base64 url, with the comma escaped.</div>
-    <img height="100" width="100" src="" srcset="data:image/png;base64%2CiVBORw0KGgoAAAANSUhEUgAAAJYAAAA8CAIAAAAL5NQ9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2woaBQc4oLEFpAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAACMSURBVHja7dNBEYAgFEVRPhHMYgAzUIsmVnFvB/fsoQb+ObfBmzMvxneW1D1vzz2wFiEUQiFEKIRCKIQIhVAIhRChEAqhECIUQiEUQoRCKIRCiFAIhVAIEep3xTWTLzzu5oVCKIRCiFAIhVAIEQqhEAohQiEUQiFEKIRCKIQIhVAIhRChEAqhECLUZi3VEwcBMGr1NgAAAABJRU5ErkJggg== 2x, data:image/png;base64%2CiVBORw0KGgoAAAANSUhEUgAAAJYAAAA8CAIAAAAL5NQ9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2woaBQc4oLEFpAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAACMSURBVHja7dNBEYAgFEVRPhHMYgAzUIsmVnFvB/fsoQb+ObfBmzMvxneW1D1vzz2wFiEUQiFEKIRCKIQIhVAIhRChEAqhECIUQiEUQoRCKIRCiFAIhVAIEep3xTWTLzzu5oVCKIRCiFAIhVAIEQqhEAohQiEUQiFEKIRCKIQIhVAIhRChEAqhECLUZi3VEwcBMGr1NgAAAABJRU5ErkJggg== 1x">
+    <img id="foo" src="" srcset="data:image/png;base64%2CiVBORw0KGgoAAAANSUhEUgAAAJYAAAA8CAIAAAAL5NQ9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2woaBQc4oLEFpAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAACMSURBVHja7dNBEYAgFEVRPhHMYgAzUIsmVnFvB/fsoQb+ObfBmzMvxneW1D1vzz2wFiEUQiFEKIRCKIQIhVAIhRChEAqhECIUQiEUQoRCKIRCiFAIhVAIEep3xTWTLzzu5oVCKIRCiFAIhVAIEQqhEAohQiEUQiFEKIRCKIQIhVAIhRChEAqhECLUZi3VEwcBMGr1NgAAAABJRU5ErkJggg== 2x, data:image/png;base64%2CiVBORw0KGgoAAAANSUhEUgAAAJYAAAA8CAIAAAAL5NQ9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2woaBQc4oLEFpAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAACMSURBVHja7dNBEYAgFEVRPhHMYgAzUIsmVnFvB/fsoQb+ObfBmzMvxneW1D1vzz2wFiEUQiFEKIRCKIQIhVAIhRChEAqhECIUQiEUQoRCKIRCiFAIhVAIEep3xTWTLzzu5oVCKIRCiFAIhVAIEQqhEAohQiEUQiFEKIRCKIQIhVAIhRChEAqhECLUZi3VEwcBMGr1NgAAAABJRU5ErkJggg== 1x">
 </body>
 </html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt b/LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt
new file mode 100644 (file)
index 0000000..60d7dba
--- /dev/null
@@ -0,0 +1,3 @@
+PASS document.getElementById("foo").clientWidth==200 is true
+This test passes if this img tag below is a green square regardless of the scale factor. It ensures that invalid inputs from srcset are ignored, and src is selected (since it's the only candidate left)
+
index a38c3779214247c4050d8b2f6af76b64a06bdcb9..b022c747367c62fd17365dfe211661536a6e059d 100644 (file)
@@ -1,13 +1,21 @@
 <html>
 <head>
+<script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
 <script>
-var targetScaleFactor = 1;
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    addEventListener("load", function() {
+        shouldBeTrue('document.getElementById("foo").clientWidth==200');
+    }, false);
 </script>
-<script src="resources/srcset-helper.js"></script>
 </head>
 
 <body id="body">
-    <div>This test passes if this img tag below is a green square when the scale factor is 1. It ensures that invalid inputs from srcset are ignored, and src is selected (when it makes sense)</div>
-    <img height="100" width="100" src="resources/green-200-px-square.png" srcset="1x,,  ,      , 2x ,,"></img>
+    <div>This test passes if this img tag below is a green square regardless of the scale factor. It ensures that invalid inputs
+    from srcset are ignored, and src is selected (since it's the only candidate left)</div>
+    <img id="foo" src="resources/green-200-px-square.png" srcset="1x,,  ,      , 2x ,,">
 </body>
 </html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt b/LayoutTests/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt
new file mode 100644 (file)
index 0000000..92d9c3f
--- /dev/null
@@ -0,0 +1,3 @@
+PASS document.getElementById("foo").clientWidth==200 is true
+This test passes if the img tag below is a green square regardless of the scale factor. It ensures that invalid inputs are ignored and well-formed images are chosen regardless of their qualifiers, once they are the only candidate left
+
index 459945e06d6a5278deb13c828349ddebfca9565d..38ab43de3f04f57807908241c8ccefc08eb059b3 100644 (file)
@@ -1,10 +1,20 @@
 <html>
 <head>
-<script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    addEventListener("load", function() {
+        shouldBeTrue('document.getElementById("foo").clientWidth==200');
+    }, false);
+</script>
 </head>
 
 <body id="body">
-    <div>This test passes if the img tag below is a green square when the scale factor is 2. It ensures that well-formed images are chosen and invalid inputs are ignored</div>
-    <img height="100" width="100" src="" srcset="1x,,  ,   x    , resources/green-200-px-square.png 2x, 2"></img>
+    <div>This test passes if the img tag below is a green square regardless of the scale factor. It ensures that invalid inputs are
+    ignored and well-formed images are chosen regardless of their qualifiers, once they are the only candidate left</div>
+    <img id="foo" src="" srcset="1x,,  ,   x    , resources/green-200-px-square.png 2x, 2">
 </body>
 </html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt b/LayoutTests/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt
new file mode 100644 (file)
index 0000000..e6d0ce0
--- /dev/null
@@ -0,0 +1,3 @@
+PASS document.getElementById("foo").clientWidth==200 is true
+This test passes if this img tag below is a green square. It ensures that attributes can be removed dynamically from javascript
+
index 70d285782cceb9abcc36fccc0319980b5df26e1a..2e2a3e0d54dc66088e2dab3b7f0db1983cbeee2b 100644 (file)
@@ -1,45 +1,31 @@
 <html>
 <head>
 <script>
+    window.targetScaleFactor = 1;
+</script>
+<script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
     function updateSrc() {
         var img = document.getElementById("foo");
+        // srcset must be set first, otherwise 'src' is loaded as well
         img.src = "";
     }
 
-    function runTest() {
-        if (!window.testRunner || !window.sessionStorage) {
-            updateSrc();
-            return;
-        }
-
-        if (!sessionStorage.scaleFactorIsSet) {
-            testRunner.waitUntilDone();
-            testRunner.setBackingScaleFactor(1, scaleFactorIsSet);
-        }
-
-        if (sessionStorage.pageReloaded && sessionStorage.scaleFactorIsSet) {
-            delete sessionStorage.pageReloaded;
-            delete sessionStorage.scaleFactorIsSet;
-            updateSrc();
-            testRunner.notifyDone();
-        } else {
-            // Right now there is a bug that srcset does not properly deal with dynamic changes to the scale factor,
-            // so to work around that, we must reload the page to get the 1x image.
-            sessionStorage.pageReloaded = true;
-            document.location.reload(true);
-        }
-    }
-
-    function scaleFactorIsSet() {
-        sessionStorage.scaleFactorIsSet = true;
-    }
-
-    window.onload = runTest;
+    addEventListener("DOMContentLoaded", function() {
+        updateSrc();
+    }, false);
+    addEventListener("load", function() {
+        shouldBeTrue('document.getElementById("foo").clientWidth==200');
+    }, false);
 </script>
 </head>
-
 <body id="body">
     <div>This test passes if this img tag below is a green square. It ensures that attributes can be removed dynamically from javascript</div>
-    <img id="foo" height="100" width="100" src="resources/blue-100-px-square.png" srcset="resources/green-200-px-square.png 2x"></img>
+    <img id="foo" src="resources/blue-100-px-square.png" srcset="resources/green-200-px-square.png 2x">
 </body>
 </html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt b/LayoutTests/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt
new file mode 100644 (file)
index 0000000..42ca765
--- /dev/null
@@ -0,0 +1,4 @@
+PASS internals.isPreloaded("resources/green-200-px-square.png") is false
+PASS document.getElementById("foo").clientWidth==100 is true
+This test passes if this img tag below is a blue square when the scale factor is 1. It ensures that when both source attributes has the same input alternative always the one from srcset is choosen
+
index 6d875f0855bc12e73b1b28a6e0981c4c95abe6ee..22a8afb09efba793973858e16fcbc04683097411 100644 (file)
@@ -1,13 +1,25 @@
 <html>
 <head>
 <script>
-var targetScaleFactor = 1;
+    window.targetScaleFactor = 1;
 </script>
 <script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    addEventListener("load", function() {
+        if (internals)
+            shouldBeFalse('internals.isPreloaded("resources/green-200-px-square.png")');
+        shouldBeTrue('document.getElementById("foo").clientWidth==100');
+    }, false);
+</script>
 </head>
 
 <body id="body">
     <div>This test passes if this img tag below is a blue square when the scale factor is 1. It ensures that when both source attributes has the same input alternative always the one from srcset is choosen</div>
-    <img height="100" width="100" src="resources/green-200-px-square.png" srcset="resources/blue-100-px-square.png 1x"></img>
+    <img id="foo" src="resources/green-200-px-square.png" srcset="resources/blue-100-px-square.png 1x">
 </body>
 </html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-simple-1x-expected.txt b/LayoutTests/fast/hidpi/image-srcset-simple-1x-expected.txt
new file mode 100644 (file)
index 0000000..e0c8316
--- /dev/null
@@ -0,0 +1,3 @@
+PASS document.getElementById("foo").clientWidth==400 is true
+This test passes if the image below says 1x with a reddish background when the deviceScaleFactor is 1, and if says 2x with a greenish background when the deviceScaleFactor is 2.
+
diff --git a/LayoutTests/fast/hidpi/image-srcset-simple-1x.html b/LayoutTests/fast/hidpi/image-srcset-simple-1x.html
new file mode 100644 (file)
index 0000000..b6c3f5f
--- /dev/null
@@ -0,0 +1,23 @@
+<html>
+<head>
+<script>
+    window.targetScaleFactor = 1;
+</script>
+<script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    addEventListener("load", function() {
+        shouldBeTrue('document.getElementById("foo").clientWidth==400');
+    }, false);
+</script>
+</head>
+
+<body id="body">
+    <div>This test passes if the image below says 1x with a reddish background when the deviceScaleFactor is 1, and if says 2x with a greenish background when the deviceScaleFactor is 2.</div>
+    <img id="foo" src="" srcset="resources/image-set-1x.png 1x, resources/deleteButton.png 3x, resources/image-set-2x.png 2x">
+</body>
+</html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-simple-2x-expected.txt b/LayoutTests/fast/hidpi/image-srcset-simple-2x-expected.txt
new file mode 100644 (file)
index 0000000..b55c696
--- /dev/null
@@ -0,0 +1,3 @@
+PASS document.getElementById("foo").clientWidth==800 is true
+This test passes if the image below says 1x with a reddish background when the deviceScaleFactor is 1, and if says 2x with a greenish background when the deviceScaleFactor is 2.
+
diff --git a/LayoutTests/fast/hidpi/image-srcset-simple-2x.html b/LayoutTests/fast/hidpi/image-srcset-simple-2x.html
new file mode 100644 (file)
index 0000000..73eeee3
--- /dev/null
@@ -0,0 +1,23 @@
+<html>
+<head>
+<script>
+    window.targetScaleFactor = 2;
+</script>
+<script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    addEventListener("load", function() {
+        shouldBeTrue('document.getElementById("foo").clientWidth==800');
+    }, false);
+</script>
+</head>
+
+<body id="body">
+    <div>This test passes if the image below says 1x with a reddish background when the deviceScaleFactor is 1, and if says 2x with a greenish background when the deviceScaleFactor is 2.</div>
+    <img id="foo" src="" srcset="resources/image-set-1x.png 1x, resources/deleteButton.png 3x, resources/image-set-2x.png 2x">
+</body>
+</html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-simple.html b/LayoutTests/fast/hidpi/image-srcset-simple.html
deleted file mode 100644 (file)
index 22ba1fd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
-<script src="resources/srcset-helper.js"></script>
-</head>
-
-<body id="body">
-    <div>This test passes if the image below says 1x with a reddish background when the deviceScaleFactor is 1, and if says 2x with a greenish background when the deviceScaleFactor is 2.</div>
-    <img height="100" width="100" src="" srcset="resources/image-set-1x.png 1x, resources/deleteButton.png 3x, resources/image-set-2x.png 2x"></img>
-</body>
-</html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-src-selection-1x-expected.txt b/LayoutTests/fast/hidpi/image-srcset-src-selection-1x-expected.txt
new file mode 100644 (file)
index 0000000..15da620
--- /dev/null
@@ -0,0 +1,3 @@
+PASS document.getElementById("foo").clientWidth==100 is true
+This test passes if the div below is a blue 100px square when the deviceScaleFactor is 1. It simply ensures that the src attribute is taken into account by the selection algorithm when this one is processing the images candidates
+
diff --git a/LayoutTests/fast/hidpi/image-srcset-src-selection-1x.html b/LayoutTests/fast/hidpi/image-srcset-src-selection-1x.html
new file mode 100644 (file)
index 0000000..d2a63aa
--- /dev/null
@@ -0,0 +1,23 @@
+<html>
+<head>
+<script>
+    window.targetScaleFactor = 1;
+</script>
+<script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    addEventListener("load", function() {
+        shouldBeTrue('document.getElementById("foo").clientWidth==100');
+    }, false);
+</script>
+</head>
+
+<body id="body">
+    <div>This test passes if the div below is a blue 100px square when the deviceScaleFactor is 1. It simply ensures that the src attribute is taken into account by the selection algorithm when this one is processing the images candidates</div>
+    <img id="foo" src="resources/blue-100-px-square.png" srcset="resources/green-200-px-square.png 2x">
+</body>
+</html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-src-selection-2x-expected.txt b/LayoutTests/fast/hidpi/image-srcset-src-selection-2x-expected.txt
new file mode 100644 (file)
index 0000000..4d2bb74
--- /dev/null
@@ -0,0 +1,3 @@
+PASS document.getElementById("foo").clientWidth==200 is true
+This test passes if the div below is a green 200px square when the deviceScaleFactor is 2. It simply ensures that the src attribute is taken into account by the selection algorithm when this one is processing the images candidates
+
diff --git a/LayoutTests/fast/hidpi/image-srcset-src-selection-2x.html b/LayoutTests/fast/hidpi/image-srcset-src-selection-2x.html
new file mode 100644 (file)
index 0000000..04be289
--- /dev/null
@@ -0,0 +1,23 @@
+<html>
+<head>
+<script>
+    window.targetScaleFactor = 2;
+</script>
+<script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    addEventListener("load", function() {
+        shouldBeTrue('document.getElementById("foo").clientWidth==200');
+    }, false);
+</script>
+</head>
+
+<body id="body">
+    <div>This test passes if the div below is a green 200px square when the deviceScaleFactor is 2. It simply ensures that the src attribute is taken into account by the selection algorithm when this one is processing the images candidates</div>
+    <img id="foo" src="resources/blue-100-px-square.png" srcset="resources/green-200-px-square.png 2x">
+</body>
+</html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-src-selection.html b/LayoutTests/fast/hidpi/image-srcset-src-selection.html
deleted file mode 100644 (file)
index c8931d0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<html>
-<head>
-<script>
-var targetScaleFactor = 1;
-</script>
-<script src="resources/srcset-helper.js"></script>
-</head>
-
-<body id="body">
-    <div>This test passes if the div below is a blue 100px square when the deviceScaleFactor is 1. It simply ensures that the src attribute is taken into account by the selection algorithm when this one is processing the images candidates</div>
-    <img height="100" width="100" src="resources/blue-100-px-square.png" srcset="resources/green-200-px-square.png 2x"></img>
-</body>
-</html>
diff --git a/LayoutTests/fast/hidpi/image-srcset-viewport-modifiers-expected.txt b/LayoutTests/fast/hidpi/image-srcset-viewport-modifiers-expected.txt
new file mode 100644 (file)
index 0000000..a95eb49
--- /dev/null
@@ -0,0 +1,3 @@
+PASS document.getElementById("foo").clientWidth==100 is true
+This test passes if the image below is a blue square, since the srcset is unhandled (uses a viewport modifier that we will skip)
+
index 4ef57d07c5c2df20a9d1766e62f52d5e0ff0b400..3d8c235c3442ec1316aa424f99976d7c810c95aa 100644 (file)
@@ -1,10 +1,23 @@
 <html>
 <head>
+<script>
+    window.targetScaleFactor = 2;
+</script>
 <script src="resources/srcset-helper.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    addEventListener("load", function() {
+        shouldBeTrue('document.getElementById("foo").clientWidth==100');
+    }, false);
+</script>
 </head>
 
 <body id="body">
     <div>This test passes if the image below is a blue square, since the srcset is unhandled (uses a viewport modifier that we will skip)</div>
-    <img height="100" width="100" src="resources/blue-100-px-square.png" srcset="resources/green-200-px-square.png 100w 2x">
+    <img id="foo" src="resources/blue-100-px-square.png" srcset="resources/green-200-px-square.png 100w 2x">
 </body>
 </html>
diff --git a/LayoutTests/platform/mac/fast/hidpi/image-srcset-change-dynamically-from-js-expected.txt b/LayoutTests/platform/mac/fast/hidpi/image-srcset-change-dynamically-from-js-expected.txt
deleted file mode 100644 (file)
index 6d0bd90..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x36
-        RenderText {#text} at (0,0) size 760x36
-          text run at (0,0) width 760: "This test passes if this img tag below is a green square when the scale factor is 1. It ensures that attributes can be changed"
-          text run at (0,18) width 175: "dynamically from javascript"
-      RenderBlock (anonymous) at (0,36) size 784x100
-        RenderImage {IMG} at (0,0) size 100x100
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/hidpi/image-srcset-data-src-expected.txt b/LayoutTests/platform/mac/fast/hidpi/image-srcset-data-src-expected.txt
deleted file mode 100644 (file)
index 55dc64a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 598x18
-          text run at (0,0) width 598: "This test passes if the image below looks like a 2x2 grid (yellow, gray, light green, dark green)."
-      RenderBlock (anonymous) at (0,18) size 784x100
-        RenderImage {IMG} at (0,0) size 100x100
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/hidpi/image-srcset-data-srcset-expected.txt b/LayoutTests/platform/mac/fast/hidpi/image-srcset-data-srcset-expected.txt
deleted file mode 100644 (file)
index f6de968..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x36
-        RenderText {#text} at (0,0) size 734x36
-          text run at (0,0) width 734: "This test passes if the image below looks like a 2x2 grid (yellow, gray, light green, dark green). In this case the srcset"
-          text run at (0,18) width 323: "attribute has a base64 url, with the comma escaped."
-      RenderBlock (anonymous) at (0,36) size 784x100
-        RenderImage {IMG} at (0,0) size 100x100
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt b/LayoutTests/platform/mac/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt
deleted file mode 100644 (file)
index 73850c8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x36
-        RenderText {#text} at (0,0) size 782x36
-          text run at (0,0) width 782: "This test passes if this img tag below is a green square when the scale factor is 1. It ensures that invalid inputs from srcset are"
-          text run at (0,18) width 312: "ignored, and src is selected (when it makes sense)"
-      RenderBlock (anonymous) at (0,36) size 784x100
-        RenderImage {IMG} at (0,0) size 100x100
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt b/LayoutTests/platform/mac/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt
deleted file mode 100644 (file)
index 2560670..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x36
-        RenderText {#text} at (0,0) size 746x36
-          text run at (0,0) width 746: "This test passes if the img tag below is a green square when the scale factor is 2. It ensures that well-formed images are"
-          text run at (0,18) width 235: "chosen and invalid inputs are ignored"
-      RenderBlock (anonymous) at (0,36) size 784x100
-        RenderImage {IMG} at (0,0) size 100x100
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt b/LayoutTests/platform/mac/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt
deleted file mode 100644 (file)
index bbbd464..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 778x18
-          text run at (0,0) width 778: "This test passes if this img tag below is a green square. It ensures that attributes can be removed dynamically from javascript"
-      RenderBlock (anonymous) at (0,18) size 784x100
-        RenderImage {IMG} at (0,0) size 100x100
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt b/LayoutTests/platform/mac/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt
deleted file mode 100644 (file)
index 2b5ce6f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x36
-        RenderText {#text} at (0,0) size 766x36
-          text run at (0,0) width 766: "This test passes if this img tag below is a blue square when the scale factor is 1. It ensures that when both source attributes"
-          text run at (0,18) width 426: "has the same input alternative always the one from srcset is choosen"
-      RenderBlock (anonymous) at (0,36) size 784x100
-        RenderImage {IMG} at (0,0) size 100x100
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/hidpi/image-srcset-simple-expected.txt b/LayoutTests/platform/mac/fast/hidpi/image-srcset-simple-expected.txt
deleted file mode 100644 (file)
index 68e7a90..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x36
-        RenderText {#text} at (0,0) size 775x36
-          text run at (0,0) width 775: "This test passes if the image below says 1x with a reddish background when the deviceScaleFactor is 1, and if says 2x with"
-          text run at (0,18) width 354: "a greenish background when the deviceScaleFactor is 2."
-      RenderBlock (anonymous) at (0,36) size 784x100
-        RenderImage {IMG} at (0,0) size 100x100
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/hidpi/image-srcset-src-selection-expected.txt b/LayoutTests/platform/mac/fast/hidpi/image-srcset-src-selection-expected.txt
deleted file mode 100644 (file)
index 2c80875..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x36
-        RenderText {#text} at (0,0) size 738x36
-          text run at (0,0) width 738: "This test passes if the div below is a blue 100px square when the deviceScaleFactor is 1. It simply ensures that the src"
-          text run at (0,18) width 668: "attribute is taken into account by the selection algorithm when this one is processing the images candidates"
-      RenderBlock (anonymous) at (0,36) size 784x100
-        RenderImage {IMG} at (0,0) size 100x100
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/hidpi/image-srcset-viewport-modifiers-expected.txt b/LayoutTests/platform/mac/fast/hidpi/image-srcset-viewport-modifiers-expected.txt
deleted file mode 100644 (file)
index 0d25c21..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 782x18
-          text run at (0,0) width 782: "This test passes if the image below is a blue square, since the srcset is unhandled (uses a viewport modifier that we will skip)"
-      RenderBlock (anonymous) at (0,18) size 784x100
-        RenderImage {IMG} at (0,0) size 100x100
-        RenderText {#text} at (0,0) size 0x0