Changeset 271234 in webkit
- Timestamp:
- Jan 7, 2021, 2:38:53 AM (6 years ago)
- Location:
- trunk/LayoutTests/imported/w3c
- Files:
-
- 8 added
- 9 edited
-
ChangeLog (modified) (1 diff)
-
web-platform-tests/intersection-observer/cross-document-root-expected.txt (added)
-
web-platform-tests/intersection-observer/cross-document-root.html (added)
-
web-platform-tests/intersection-observer/explicit-root-different-document.tentative-expected.txt (added)
-
web-platform-tests/intersection-observer/explicit-root-different-document.tentative.html (added)
-
web-platform-tests/intersection-observer/intersection-ratio-ib-split.html (modified) (1 diff)
-
web-platform-tests/intersection-observer/not-in-containing-block-chain.tentative-expected.txt (added)
-
web-platform-tests/intersection-observer/not-in-containing-block-chain.tentative.html (added)
-
web-platform-tests/intersection-observer/observer-attributes-expected.txt (modified) (1 diff)
-
web-platform-tests/intersection-observer/observer-attributes.html (modified) (1 diff)
-
web-platform-tests/intersection-observer/resources/cross-origin-child-iframe.sub.html (modified) (1 diff)
-
web-platform-tests/intersection-observer/resources/same-origin-grand-child-iframe.html (modified) (1 diff)
-
web-platform-tests/intersection-observer/same-document-with-document-root-expected.txt (added)
-
web-platform-tests/intersection-observer/same-document-with-document-root.html (added)
-
web-platform-tests/intersection-observer/same-origin-grand-child-iframe.sub.html (modified) (2 diffs)
-
web-platform-tests/intersection-observer/target-in-different-window.html (modified) (1 diff)
-
web-platform-tests/intersection-observer/w3c-import.log (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r271196 r271234 1 2021-01-07 Cathie Chen <cathiechen@igalia.com> 2 3 Update WPT test suite for intersection-observer 4 https://bugs.webkit.org/show_bug.cgi?id=220403 5 6 Reviewed by Rob Buis. 7 8 Sync WPT intersection-observer tests with 5a3a1b414d32952355eae7c949c109424979b988. 9 10 * web-platform-tests/intersection-observer/cross-document-root-expected.txt: Added. 11 * web-platform-tests/intersection-observer/cross-document-root.html: Added. 12 * web-platform-tests/intersection-observer/explicit-root-different-document.tentative-expected.txt: Added. 13 * web-platform-tests/intersection-observer/explicit-root-different-document.tentative.html: Added. 14 * web-platform-tests/intersection-observer/intersection-ratio-ib-split.html: 15 * web-platform-tests/intersection-observer/not-in-containing-block-chain.tentative-expected.txt: Added. 16 * web-platform-tests/intersection-observer/not-in-containing-block-chain.tentative.html: Added. 17 * web-platform-tests/intersection-observer/observer-attributes-expected.txt: 18 * web-platform-tests/intersection-observer/observer-attributes.html: 19 * web-platform-tests/intersection-observer/resources/cross-origin-child-iframe.sub.html: 20 * web-platform-tests/intersection-observer/resources/same-origin-grand-child-iframe.html: 21 * web-platform-tests/intersection-observer/same-document-with-document-root-expected.txt: Added. 22 * web-platform-tests/intersection-observer/same-document-with-document-root.html: Added. 23 * web-platform-tests/intersection-observer/same-origin-grand-child-iframe.sub.html: 24 * web-platform-tests/intersection-observer/target-in-different-window.html: 25 * web-platform-tests/intersection-observer/w3c-import.log: 26 1 27 2021-01-06 Youenn Fablet <youenn@apple.com> 2 28 -
trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-ib-split.html
r265294 r271234 27 27 assert_true(entries[0].isIntersecting, element.nodeName + ": Should be intersecting"); 28 28 assert_equals(entries[0].intersectionRatio, 1, element.nodeName + ": Should be fully intersecting"); 29 30 function assert_rects_equal(r1, r2, label) { 31 assert_equals(r1.top, r2.top, label + ": top should be equal"); 32 assert_equals(r1.right, r2.right, label + ": right should be equal"); 33 assert_equals(r1.bottom, r2.bottom, label + ": bottom should be equal"); 34 assert_equals(r1.left, r2.left, label + ": left should be equal"); 35 } 36 37 assert_rects_equal(entries[0].boundingClientRect, element.getBoundingClientRect(), element.nodeName + ": boundingClientRect should match"); 38 assert_rects_equal(entries[0].intersectionRect, entries[0].boundingClientRect, element.nodeName + ": intersectionRect should match entry.boundingClientRect"); 29 39 } 30 40 }, "IntersectionObserver on an IB split gets the right intersection ratio"); -
trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-attributes-expected.txt
r267647 r271234 1 1 2 PASS Observer attribute getters.2 FAIL Observer attribute getters. Failed to construct 'IntersectionObserver': rootMargin must be specified in pixels or percent. 3 3 PASS observer.root 4 4 PASS observer.thresholds 5 5 PASS observer.rootMargin 6 PASS set observer.root7 PASS set observer.thresholds8 PASS set observer.rootMargin9 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-attributes.html
r257137 r271234 16 16 "observer.rootMargin"); 17 17 18 observer = new IntersectionObserver(function(e) {}, { 19 rootMargin: " ", 20 threshold: [] 21 }); 22 test(function() { assert_array_equals(observer.thresholds, [0]) }, 23 "empty observer.thresholds"); 24 test(function() { assert_equals(observer.rootMargin, "0px 0px 0px 0px") }, 25 "whitespace observer.rootMargin"); 26 18 27 var rootDiv = document.getElementById("root"); 19 28 observer = new IntersectionObserver(function(e) {}, { -
trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/cross-origin-child-iframe.sub.html
r257137 r271234 1 1 <!DOCTYPE html> 2 2 <script src="/common/get-host-info.sub.js"></script> 3 <iframe id="iframe"></iframe>3 <iframe scrolling="no" frameborder="0" id="iframe"></iframe> 4 4 <script> 5 5 iframe.src = -
trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/same-origin-grand-child-iframe.html
r257137 r271234 1 1 <!DOCTYPE html> 2 <div id="target"></div> 2 <!-- 3 target should be fully vertically in-viewport as 100px is way less than the 4 default iframe height. 5 6 right: 0 makes sure that we're occluded by 8px by the intermediate iframe. 7 --> 8 <div id="target" style="width: 100px; height: 100px; position: absolute; right: 0"></div> 3 9 <script> 4 10 const observer = new IntersectionObserver(records => { 5 window.top.postMessage(records[0].rootBounds, "*"); 11 if (records[0].isIntersecting) { 12 let { rootBounds, intersectionRect } = records[0]; 13 window.top.postMessage({ rootBounds, intersectionRect }, "*"); 14 } 6 15 }, {}); 7 observer.observe( target);16 observer.observe(document.getElementById("target")); 8 17 </script> -
trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-origin-grand-child-iframe.sub.html
r257137 r271234 6 6 <script src="/common/get-host-info.sub.js"></script> 7 7 <script src="./resources/intersection-observer-test-utils.js"></script> 8 <iframe id="iframe"></iframe>8 <iframe scrolling="no" frameborder="0" id="iframe"></iframe> 9 9 <script> 10 10 promise_test(async t => { … … 12 12 get_host_info().HTTP_NOTSAMESITE_ORIGIN + "/intersection-observer/resources/cross-origin-child-iframe.sub.html"; 13 13 14 const rootBounds= await new Promise(resolve => {14 const { rootBounds, intersectionRect } = await new Promise(resolve => { 15 15 window.addEventListener("message", event => resolve(event.data)); 16 16 }, { once: true } ); 17 18 // 300px = iframe viewport width 19 // 8px = default body margin 20 // (intersectionRect is in the coordinate space of the target iframe) 21 assert_equals(intersectionRect.top, 8); 22 assert_equals(intersectionRect.left, 200); 23 assert_equals(intersectionRect.right, 300 - 8); 24 assert_equals(intersectionRect.width, 100 - 8); 25 assert_equals(intersectionRect.height, 100); 17 26 18 27 assert_equals(rootBounds.left, 0); -
trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/target-in-different-window.html
r257137 r271234 1 1 <!DOCTYPE html> 2 2 <meta name="viewport" content="width=device-width,initial-scale=1"> 3 <!-- 4 NOTE(emilio): This tests Chrome's behavior but it's not clear that's what the 5 spec asks for, see https://github.com/w3c/IntersectionObserver/issues/456 6 --> 3 7 <script src="/resources/testharness.js"></script> 4 8 <script src="/resources/testharnessreport.js"></script> -
trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/w3c-import.log
r265294 r271234 19 19 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/client-rect.html 20 20 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/containing-block.html 21 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/cross-document-root.html 21 22 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/cross-origin-iframe.sub.html 22 23 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/disconnect.html … … 25 26 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/edge-inclusive-intersection.html 26 27 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/empty-root-margin.html 28 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/explicit-root-different-document.tentative.html 27 29 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/idlharness.window.js 28 30 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/iframe-no-root-with-wrapping-scroller.html … … 37 39 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/multiple-thresholds.html 38 40 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/nested-cross-origin-iframe.sub.html 41 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/not-in-containing-block-chain.tentative.html 39 42 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-attributes.html 40 43 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-callback-arguments.html … … 49 52 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-no-root.html 50 53 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-root.html 54 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-with-document-root.html 51 55 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-zero-size-target.html 52 56 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-origin-grand-child-iframe.sub.html
Note:
See TracChangeset
for help on using the changeset viewer.