Diff
Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (194118 => 194119)
--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog 2015-12-15 22:50:43 UTC (rev 194118)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog 2015-12-15 23:07:45 UTC (rev 194119)
@@ -1,3 +1,19 @@
+2015-12-15 Matthew Hanson <[email protected]>
+
+ Merge r192959. rdar://problem/23903291
+
+ 2015-12-02 David Hyatt <[email protected]>
+
+ Add some more picture element layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=151769
+
+ Reviewed by Dean Jackson.
+
+ * fast/picture/image-picture-invalid-expected.txt: Added.
+ * fast/picture/image-picture-invalid.html: Added.
+ * fast/picture/image-picture-nested-expected.txt: Added.
+ * fast/picture/image-picture-nested.html: Added.
+
2015-12-14 Matthew Hanson <[email protected]>
Merge r194001. rdar://problem/23814327
Added: branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-invalid-expected.txt (0 => 194119)
--- branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-invalid-expected.txt (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-invalid-expected.txt 2015-12-15 23:07:45 UTC (rev 194119)
@@ -0,0 +1,19 @@
+PASS document.getElementById("canary").clientWidth is 75
+PASS currentSrcFileName("canary") is "blue_rect.jpg?0"
+PASS document.getElementById("div_end_picture").clientWidth is 800
+PASS currentSrcFileName("div_end_picture") is "image-set-2x.png?2"
+PASS document.getElementById("div_multiple_end").clientWidth is 800
+PASS currentSrcFileName("div_multiple_end") is "image-set-2x.png?2"
+PASS document.getElementById("source_in_div").clientWidth is 75
+PASS currentSrcFileName("source_in_div") is "blue_rect.jpg"
+PASS document.getElementById("not_in_picture").clientWidth is 75
+PASS currentSrcFileName("not_in_picture") is "blue_rect.jpg"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
+
+
Added: branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-invalid.html (0 => 194119)
--- branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-invalid.html (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-invalid.html 2015-12-15 23:07:45 UTC (rev 194119)
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+ <script src=""
+<script src=""
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ addEventListener("load", function() {
+ shouldBe('document.getElementById("canary").clientWidth', '75');
+ shouldBe('currentSrcFileName("canary")', '"blue_rect.jpg?0"');
+ shouldBe('document.getElementById("div_end_picture").clientWidth', '800');
+ shouldBe('currentSrcFileName("div_end_picture")', '"image-set-2x.png?2"');
+ shouldBe('document.getElementById("div_multiple_end").clientWidth', '800');
+ shouldBe('currentSrcFileName("div_multiple_end")', '"image-set-2x.png?2"');
+ shouldBe('document.getElementById("source_in_div").clientWidth', '75');
+ shouldBe('currentSrcFileName("source_in_div")', '"blue_rect.jpg"');
+ shouldBe('document.getElementById("not_in_picture").clientWidth', '75');
+ shouldBe('currentSrcFileName("not_in_picture")', '"blue_rect.jpg"');
+ }, false);
+ </script>
+ <!-- A canary image to see that the test is actually working -->
+ <img id="canary" src=""
+ <!-- Invalid nesting tests -->
+ <!-- In the following tests, nesting shouldn't mess up the selection algorithm -->
+ <picture>
+ <picture>
+ <source sizes="800px" srcset="../hidpi/resources/image-set-1x.png?2 400w, ../hidpi/resources/image-set-2x.png?2 800w,
+ resources/image-set-4x.png?2 1600w">
+ <div>
+ </picture>
+ </div>
+ <img id="div_end_picture" src=""
+ </picture>
+ </picture>
+ <picture>
+ <div>
+ </picture>
+ </picture>
+ </picture>
+ </div>
+ <source sizes="800px" srcset="../hidpi/resources/image-set-1x.png?2 400w, ../hidpi/resources/image-set-2x.png?2 800w,
+ resources/image-set-4x.png?2 1600w">
+ <img id="div_multiple_end" src=""
+ </picture>
+ <!-- In the following tests, nesting messes up the selection algorithm -->
+ <picture>
+ <div>
+ <picture>
+ <div>
+ <source sizes="400px" srcset="resources/base-image1.png?4 200w, resources/base-image3.png?4 400w, resources/base-image2.png?4 800w">
+ </div>
+ <img id="source_in_div" src=""
+ </picture>
+ </div>
+ </picture>
+ <picture>
+ <div>
+ <picture>
+ <div>
+ <source sizes="400px" srcset="resources/base-image1.png?5 200w, resources/base-image3.png?5 400w, resources/base-image2.png?5 800w">
+ <img id="not_in_picture" src=""
+ </div>
+ </picture>
+ </div>
+ </picture>
\ No newline at end of file
Added: branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-nested-expected.txt (0 => 194119)
--- branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-nested-expected.txt (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-nested-expected.txt 2015-12-15 23:07:45 UTC (rev 194119)
@@ -0,0 +1,25 @@
+PASS document.getElementById("canary").clientWidth is 75
+PASS currentSrcFileName("canary") is "blue_rect.jpg?0"
+PASS document.getElementById("picture_in_picture").clientWidth is 800
+PASS currentSrcFileName("picture_in_picture") is "image-set-2x.png?2"
+PASS document.getElementById("picture_in_div_in_picture").clientWidth is 800
+PASS currentSrcFileName("picture_in_div_in_picture") is "image-set-2x.png?2"
+PASS document.getElementById("picture_in_div_with_source_above").clientWidth is 800
+PASS currentSrcFileName("picture_in_div_with_source_above") is "image-set-2x.png?2"
+PASS document.getElementById("picture_in_the_way").clientWidth is 800
+PASS currentSrcFileName("picture_in_the_way") is "image-set-2x.png?2"
+PASS document.getElementById("picture_in_picture_1").clientWidth is 800
+PASS currentSrcFileName("picture_in_picture_1") is "image-set-2x.png?2"
+PASS document.getElementById("picture_in_picture_2").clientWidth is 800
+PASS currentSrcFileName("picture_in_picture_2") is "image-set-2x.png?2"
+PASS document.getElementById("picture_at_end").clientWidth is 75
+PASS currentSrcFileName("picture_at_end") is "blue_rect.jpg?52"
+PASS document.getElementById("picture_no_source").clientWidth is 75
+PASS currentSrcFileName("picture_no_source") is "blue_rect.jpg?6"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
Added: branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-nested.html (0 => 194119)
--- branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-nested.html (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/picture/image-picture-nested.html 2015-12-15 23:07:45 UTC (rev 194119)
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+ <script src=""
+ <script src=""
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ addEventListener("load", function() {
+ shouldBe('document.getElementById("canary").clientWidth', '75');
+ shouldBe('currentSrcFileName("canary")', '"blue_rect.jpg?0"');
+ shouldBe('document.getElementById("picture_in_picture").clientWidth', '800');
+ shouldBe('currentSrcFileName("picture_in_picture")', '"image-set-2x.png?2"');
+ shouldBe('document.getElementById("picture_in_div_in_picture").clientWidth', '800');
+ shouldBe('currentSrcFileName("picture_in_div_in_picture")', '"image-set-2x.png?2"');
+ shouldBe('document.getElementById("picture_in_div_with_source_above").clientWidth', '800');
+ shouldBe('currentSrcFileName("picture_in_div_with_source_above")', '"image-set-2x.png?2"');
+ shouldBe('document.getElementById("picture_in_the_way").clientWidth', '800');
+ shouldBe('currentSrcFileName("picture_in_the_way")', '"image-set-2x.png?2"');
+ shouldBe('document.getElementById("picture_in_picture_1").clientWidth', '800');
+ shouldBe('currentSrcFileName("picture_in_picture_1")', '"image-set-2x.png?2"');
+ shouldBe('document.getElementById("picture_in_picture_2").clientWidth', '800');
+ shouldBe('currentSrcFileName("picture_in_picture_2")', '"image-set-2x.png?2"');
+ shouldBe('document.getElementById("picture_at_end").clientWidth', '75');
+ shouldBe('currentSrcFileName("picture_at_end")', '"blue_rect.jpg?52"');
+ shouldBe('document.getElementById("picture_no_source").clientWidth', '75');
+ shouldBe('currentSrcFileName("picture_no_source")', '"blue_rect.jpg?6"');
+ }, false);
+ </script>
+ <!-- A canary image to see that the test is actually working -->
+ <img id="canary" src=""
+ <!-- nested element tests -->
+ <picture>
+ <picture>
+ <source sizes="800px" srcset="../hidpi/resources/image-set-1x.png?2 400w, ../hidpi/resources/image-set-2x.png?2 800w,
+ resources/image-set-4x.png?2 1600w">
+ <img id="picture_in_picture" src=""
+ </picture>
+ </picture>
+ <picture>
+ <div>
+ <picture>
+ <source sizes="800px" srcset="../hidpi/resources/image-set-1x.png?2 400w, ../hidpi/resources/image-set-2x.png?2 800w,
+ resources/image-set-4x.png?2 1600w">
+ <img id="picture_in_div_in_picture" src=""
+ </picture>
+ </div>
+ </picture>
+ <picture>
+ <source sizes="800px" srcset="../hidpi/resources/image-set-1x.png?2 400w, ../hidpi/resources/image-set-2x.png?2 800w,
+ resources/image-set-4x.png?2 1600w">
+ <div>
+ <picture>
+ <source sizes="800px" srcset="../hidpi/resources/image-set-1x.png?2 400w, ../hidpi/resources/image-set-2x.png?2 800w,
+ resources/image-set-4x.png?2 1600w">
+ <img id="picture_in_div_with_source_above" src=""
+ </picture>
+ </div>
+ <img id="picture_in_the_way" src=""
+ </picture>
+ <picture>
+ <picture>
+ <source sizes="800px" srcset="../hidpi/resources/image-set-1x.png?2 400w, ../hidpi/resources/image-set-2x.png?2 800w,
+ resources/image-set-4x.png?2 1600w">
+ <img id="picture_in_picture_1" src=""
+ <img id="picture_in_picture_2" src=""
+ </picture>
+ <img id="picture_at_end" src=""
+ </picture>
+ <picture>
+ <img id="picture_no_source" src=""
+ </picture>
+
\ No newline at end of file