Changeset 257137 in webkit


Ignore:
Timestamp:
Feb 21, 2020 9:06:43 AM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Update WPT tests for Intersection Observer
https://bugs.webkit.org/show_bug.cgi?id=208053

Patch by Frederic Wang <fwang@igalia.com> on 2020-02-21
Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

  • web-platform-tests/intersection-observer/bounding-box.html:
  • web-platform-tests/intersection-observer/client-rect.html:
  • web-platform-tests/intersection-observer/containing-block.html:
  • web-platform-tests/intersection-observer/cross-origin-iframe.sub-expected.txt: Added.
  • web-platform-tests/intersection-observer/cross-origin-iframe.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/intersection-observer/cross-origin-iframe.html.
  • web-platform-tests/intersection-observer/disconnect.html:
  • web-platform-tests/intersection-observer/display-none.html:
  • web-platform-tests/intersection-observer/document-scrolling-element-root-expected.txt: Added.
  • web-platform-tests/intersection-observer/document-scrolling-element-root.html: Added.
  • web-platform-tests/intersection-observer/edge-inclusive-intersection.html:
  • web-platform-tests/intersection-observer/empty-root-margin.html:
  • web-platform-tests/intersection-observer/iframe-no-root-with-wrapping-scroller-expected.txt: Added.
  • web-platform-tests/intersection-observer/iframe-no-root-with-wrapping-scroller.html: Copied from LayoutTests/imported/w3c/web-platform-tests/intersection-observer/iframe-no-root.html.
  • web-platform-tests/intersection-observer/iframe-no-root.html:
  • web-platform-tests/intersection-observer/initial-observation-with-threshold.html:
  • web-platform-tests/intersection-observer/inline-client-rect.html:
  • web-platform-tests/intersection-observer/isIntersecting-change-events.html:
  • web-platform-tests/intersection-observer/isIntersecting-threshold-expected.txt: Added.
  • web-platform-tests/intersection-observer/isIntersecting-threshold.html: Added.
  • web-platform-tests/intersection-observer/multiple-targets.html:
  • web-platform-tests/intersection-observer/multiple-thresholds.html:
  • web-platform-tests/intersection-observer/nested-cross-origin-iframe.sub-expected.txt: Added.
  • web-platform-tests/intersection-observer/nested-cross-origin-iframe.sub.html: Added.
  • web-platform-tests/intersection-observer/observer-attributes.html:
  • web-platform-tests/intersection-observer/observer-exceptions.html:
  • web-platform-tests/intersection-observer/observer-in-iframe.html:
  • web-platform-tests/intersection-observer/observer-without-js-reference.html:
  • web-platform-tests/intersection-observer/remove-element.html:
  • web-platform-tests/intersection-observer/resources/cross-origin-child-iframe.sub.html: Added.
  • web-platform-tests/intersection-observer/resources/cross-origin-subframe.html:
  • web-platform-tests/intersection-observer/resources/intersection-observer-test-utils.js:

(waitForNotification):
(waitForFrame):
(runTestCycle):
(checkJsonEntry):

  • web-platform-tests/intersection-observer/resources/nested-cross-origin-child-iframe.sub.html: Added.
  • web-platform-tests/intersection-observer/resources/nested-cross-origin-grand-child-iframe.html: Added.
  • web-platform-tests/intersection-observer/resources/same-origin-grand-child-iframe.html: Added.
  • web-platform-tests/intersection-observer/resources/scaled-target-subframe.html: Added.
  • web-platform-tests/intersection-observer/resources/v2-subframe.html: Added.
  • web-platform-tests/intersection-observer/resources/w3c-import.log:
  • web-platform-tests/intersection-observer/root-margin-rounding-expected.txt: Added.
  • web-platform-tests/intersection-observer/root-margin-rounding.html: Added.
  • web-platform-tests/intersection-observer/root-margin.html:
  • web-platform-tests/intersection-observer/rtl-clipped-root-expected.txt: Added.
  • web-platform-tests/intersection-observer/rtl-clipped-root.html: Added.
  • web-platform-tests/intersection-observer/same-document-no-root.html:
  • web-platform-tests/intersection-observer/same-document-root.html:
  • web-platform-tests/intersection-observer/same-document-zero-size-target.html:
  • web-platform-tests/intersection-observer/same-origin-grand-child-iframe.sub-expected.txt: Added.
  • web-platform-tests/intersection-observer/same-origin-grand-child-iframe.sub.html: Added.
  • web-platform-tests/intersection-observer/shadow-content.html:
  • web-platform-tests/intersection-observer/target-in-different-window.html:
  • web-platform-tests/intersection-observer/text-target.html:
  • web-platform-tests/intersection-observer/timestamp.html:
  • web-platform-tests/intersection-observer/unclipped-root.html:
  • web-platform-tests/intersection-observer/v2/animated-occlusion-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/animated-occlusion.html: Added.
  • web-platform-tests/intersection-observer/v2/blur-filter-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/blur-filter.html: Added.
  • web-platform-tests/intersection-observer/v2/box-shadow-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/box-shadow.html: Added.
  • web-platform-tests/intersection-observer/v2/cross-origin-effects.sub-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/cross-origin-occlusion.sub-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/delay-test-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/delay-test.html: Added.
  • web-platform-tests/intersection-observer/v2/drop-shadow-filter-vertical-rl-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/drop-shadow-filter-vertical-rl.html: Added.
  • web-platform-tests/intersection-observer/v2/iframe-target-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/iframe-target.html: Added.
  • web-platform-tests/intersection-observer/v2/inline-occlusion-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/inline-occlusion.html: Added.
  • web-platform-tests/intersection-observer/v2/position-relative-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/position-relative.html: Added.
  • web-platform-tests/intersection-observer/v2/scaled-target-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/scaled-target.html: Added.
  • web-platform-tests/intersection-observer/v2/simple-effects-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/simple-effects.html: Added.
  • web-platform-tests/intersection-observer/v2/simple-occlusion-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/simple-occlusion-svg-foreign-object-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/simple-occlusion-svg-foreign-object.html: Added.
  • web-platform-tests/intersection-observer/v2/simple-occlusion.html: Added.
  • web-platform-tests/intersection-observer/v2/text-editor-occlusion-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/text-editor-occlusion.html: Added.
  • web-platform-tests/intersection-observer/v2/text-shadow-expected.txt: Added.
  • web-platform-tests/intersection-observer/v2/text-shadow.html: Added.
  • web-platform-tests/intersection-observer/v2/w3c-import.log: Added.
  • web-platform-tests/intersection-observer/w3c-import.log:
  • web-platform-tests/intersection-observer/zero-area-element-hidden.html:
  • web-platform-tests/intersection-observer/zero-area-element-visible.html:
  • web-platform-tests/intersection-observer/v2/cross-origin-effects.sub.html: Added.
  • web-platform-tests/intersection-observer/v2/cross-origin-occlusion.sub.html: Added.

LayoutTests:

Add iOS expectations and skip new tests timing out.

  • TestExpectations:
  • platform/ios/imported/w3c/web-platform-tests/intersection-observer/cross-origin-iframe.sub-expected.txt: Added.
  • platform/ios/imported/w3c/web-platform-tests/intersection-observer/iframe-no-root-with-wrapping-scroller-expected.txt: Added.
  • platform/ios/imported/w3c/web-platform-tests/intersection-observer/nested-cross-origin-iframe.sub-expected.txt: Remamed from platform/ios/imported/w3c/web-platform-tests/intersection-observer/nested-cross-origin-iframe.sub.txt.
Location:
trunk/LayoutTests
Files:
54 added
36 edited
1 copied
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r257136 r257137  
     12020-02-21  Frederic Wang  <fwang@igalia.com>
     2
     3        Update WPT tests for Intersection Observer
     4        https://bugs.webkit.org/show_bug.cgi?id=208053
     5
     6        Reviewed by Daniel Bates.
     7
     8        Add iOS expectations and skip new tests timing out.
     9
     10        * TestExpectations:
     11        * platform/ios/imported/w3c/web-platform-tests/intersection-observer/cross-origin-iframe.sub-expected.txt: Added.
     12        * platform/ios/imported/w3c/web-platform-tests/intersection-observer/iframe-no-root-with-wrapping-scroller-expected.txt: Added.
     13        * platform/ios/imported/w3c/web-platform-tests/intersection-observer/nested-cross-origin-iframe.sub-expected.txt: Remamed from platform/ios/imported/w3c/web-platform-tests/intersection-observer/nested-cross-origin-iframe.sub.txt.
     14
    1152020-02-21  Jason Lawrence  <lawrence.j@apple.com>
    216
  • trunk/LayoutTests/TestExpectations

    r257129 r257137  
    33513351
    33523352webkit.org/b/206676 imported/w3c/web-platform-tests/requestidlecallback/callback-xhr-sync.html [ Pass Failure ]
     3353
     3354# wpt intersection-observer failures
     3355webkit.org/b/208052 imported/w3c/web-platform-tests/intersection-observer/v2/cross-origin-effects.sub.html [ Timeout ]
     3356webkit.org/b/208052 imported/w3c/web-platform-tests/intersection-observer/v2/cross-origin-occlusion.sub.html [ Timeout ]
    33533357
    33543358# wpt css-backgrounds failures
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r257132 r257137  
     12020-02-21  Frederic Wang  <fwang@igalia.com>
     2
     3        Update WPT tests for Intersection Observer
     4        https://bugs.webkit.org/show_bug.cgi?id=208053
     5
     6        Reviewed by Daniel Bates.
     7
     8        * web-platform-tests/intersection-observer/bounding-box.html:
     9        * web-platform-tests/intersection-observer/client-rect.html:
     10        * web-platform-tests/intersection-observer/containing-block.html:
     11        * web-platform-tests/intersection-observer/cross-origin-iframe.sub-expected.txt: Added.
     12        * web-platform-tests/intersection-observer/cross-origin-iframe.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/intersection-observer/cross-origin-iframe.html.
     13        * web-platform-tests/intersection-observer/disconnect.html:
     14        * web-platform-tests/intersection-observer/display-none.html:
     15        * web-platform-tests/intersection-observer/document-scrolling-element-root-expected.txt: Added.
     16        * web-platform-tests/intersection-observer/document-scrolling-element-root.html: Added.
     17        * web-platform-tests/intersection-observer/edge-inclusive-intersection.html:
     18        * web-platform-tests/intersection-observer/empty-root-margin.html:
     19        * web-platform-tests/intersection-observer/iframe-no-root-with-wrapping-scroller-expected.txt: Added.
     20        * web-platform-tests/intersection-observer/iframe-no-root-with-wrapping-scroller.html: Copied from LayoutTests/imported/w3c/web-platform-tests/intersection-observer/iframe-no-root.html.
     21        * web-platform-tests/intersection-observer/iframe-no-root.html:
     22        * web-platform-tests/intersection-observer/initial-observation-with-threshold.html:
     23        * web-platform-tests/intersection-observer/inline-client-rect.html:
     24        * web-platform-tests/intersection-observer/isIntersecting-change-events.html:
     25        * web-platform-tests/intersection-observer/isIntersecting-threshold-expected.txt: Added.
     26        * web-platform-tests/intersection-observer/isIntersecting-threshold.html: Added.
     27        * web-platform-tests/intersection-observer/multiple-targets.html:
     28        * web-platform-tests/intersection-observer/multiple-thresholds.html:
     29        * web-platform-tests/intersection-observer/nested-cross-origin-iframe.sub-expected.txt: Added.
     30        * web-platform-tests/intersection-observer/nested-cross-origin-iframe.sub.html: Added.
     31        * web-platform-tests/intersection-observer/observer-attributes.html:
     32        * web-platform-tests/intersection-observer/observer-exceptions.html:
     33        * web-platform-tests/intersection-observer/observer-in-iframe.html:
     34        * web-platform-tests/intersection-observer/observer-without-js-reference.html:
     35        * web-platform-tests/intersection-observer/remove-element.html:
     36        * web-platform-tests/intersection-observer/resources/cross-origin-child-iframe.sub.html: Added.
     37        * web-platform-tests/intersection-observer/resources/cross-origin-subframe.html:
     38        * web-platform-tests/intersection-observer/resources/intersection-observer-test-utils.js:
     39        (waitForNotification):
     40        (waitForFrame):
     41        (runTestCycle):
     42        (checkJsonEntry):
     43        * web-platform-tests/intersection-observer/resources/nested-cross-origin-child-iframe.sub.html: Added.
     44        * web-platform-tests/intersection-observer/resources/nested-cross-origin-grand-child-iframe.html: Added.
     45        * web-platform-tests/intersection-observer/resources/same-origin-grand-child-iframe.html: Added.
     46        * web-platform-tests/intersection-observer/resources/scaled-target-subframe.html: Added.
     47        * web-platform-tests/intersection-observer/resources/v2-subframe.html: Added.
     48        * web-platform-tests/intersection-observer/resources/w3c-import.log:
     49        * web-platform-tests/intersection-observer/root-margin-rounding-expected.txt: Added.
     50        * web-platform-tests/intersection-observer/root-margin-rounding.html: Added.
     51        * web-platform-tests/intersection-observer/root-margin.html:
     52        * web-platform-tests/intersection-observer/rtl-clipped-root-expected.txt: Added.
     53        * web-platform-tests/intersection-observer/rtl-clipped-root.html: Added.
     54        * web-platform-tests/intersection-observer/same-document-no-root.html:
     55        * web-platform-tests/intersection-observer/same-document-root.html:
     56        * web-platform-tests/intersection-observer/same-document-zero-size-target.html:
     57        * web-platform-tests/intersection-observer/same-origin-grand-child-iframe.sub-expected.txt: Added.
     58        * web-platform-tests/intersection-observer/same-origin-grand-child-iframe.sub.html: Added.
     59        * web-platform-tests/intersection-observer/shadow-content.html:
     60        * web-platform-tests/intersection-observer/target-in-different-window.html:
     61        * web-platform-tests/intersection-observer/text-target.html:
     62        * web-platform-tests/intersection-observer/timestamp.html:
     63        * web-platform-tests/intersection-observer/unclipped-root.html:
     64        * web-platform-tests/intersection-observer/v2/animated-occlusion-expected.txt: Added.
     65        * web-platform-tests/intersection-observer/v2/animated-occlusion.html: Added.
     66        * web-platform-tests/intersection-observer/v2/blur-filter-expected.txt: Added.
     67        * web-platform-tests/intersection-observer/v2/blur-filter.html: Added.
     68        * web-platform-tests/intersection-observer/v2/box-shadow-expected.txt: Added.
     69        * web-platform-tests/intersection-observer/v2/box-shadow.html: Added.
     70        * web-platform-tests/intersection-observer/v2/cross-origin-effects.sub-expected.txt: Added.
     71        * web-platform-tests/intersection-observer/v2/cross-origin-occlusion.sub-expected.txt: Added.
     72        * web-platform-tests/intersection-observer/v2/delay-test-expected.txt: Added.
     73        * web-platform-tests/intersection-observer/v2/delay-test.html: Added.
     74        * web-platform-tests/intersection-observer/v2/drop-shadow-filter-vertical-rl-expected.txt: Added.
     75        * web-platform-tests/intersection-observer/v2/drop-shadow-filter-vertical-rl.html: Added.
     76        * web-platform-tests/intersection-observer/v2/iframe-target-expected.txt: Added.
     77        * web-platform-tests/intersection-observer/v2/iframe-target.html: Added.
     78        * web-platform-tests/intersection-observer/v2/inline-occlusion-expected.txt: Added.
     79        * web-platform-tests/intersection-observer/v2/inline-occlusion.html: Added.
     80        * web-platform-tests/intersection-observer/v2/position-relative-expected.txt: Added.
     81        * web-platform-tests/intersection-observer/v2/position-relative.html: Added.
     82        * web-platform-tests/intersection-observer/v2/scaled-target-expected.txt: Added.
     83        * web-platform-tests/intersection-observer/v2/scaled-target.html: Added.
     84        * web-platform-tests/intersection-observer/v2/simple-effects-expected.txt: Added.
     85        * web-platform-tests/intersection-observer/v2/simple-effects.html: Added.
     86        * web-platform-tests/intersection-observer/v2/simple-occlusion-expected.txt: Added.
     87        * web-platform-tests/intersection-observer/v2/simple-occlusion-svg-foreign-object-expected.txt: Added.
     88        * web-platform-tests/intersection-observer/v2/simple-occlusion-svg-foreign-object.html: Added.
     89        * web-platform-tests/intersection-observer/v2/simple-occlusion.html: Added.
     90        * web-platform-tests/intersection-observer/v2/text-editor-occlusion-expected.txt: Added.
     91        * web-platform-tests/intersection-observer/v2/text-editor-occlusion.html: Added.
     92        * web-platform-tests/intersection-observer/v2/text-shadow-expected.txt: Added.
     93        * web-platform-tests/intersection-observer/v2/text-shadow.html: Added.
     94        * web-platform-tests/intersection-observer/v2/w3c-import.log: Added.
     95        * web-platform-tests/intersection-observer/w3c-import.log:
     96        * web-platform-tests/intersection-observer/zero-area-element-hidden.html:
     97        * web-platform-tests/intersection-observer/zero-area-element-visible.html:
     98        * web-platform-tests/intersection-observer/v2/cross-origin-effects.sub.html: Added.
     99        * web-platform-tests/intersection-observer/v2/cross-origin-occlusion.sub.html: Added.
     100
    11012020-02-21  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    2102
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/bounding-box.html

    r237829 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/client-rect.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/containing-block.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/cross-origin-iframe.sub.html

    r257136 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
     
    2122
    2223<div class="spacer"></div>
    23 <iframe src="resources/cross-origin-subframe.html" sandbox="allow-scripts"></iframe>
     24<iframe src="http://{{hosts[alt][]}}:{{ports[http][0]}}/intersection-observer/resources/cross-origin-subframe.html" sandbox="allow-scripts"></iframe>
    2425<div class="spacer"></div>
    2526
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/disconnect.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/display-none.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/edge-inclusive-intersection.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/empty-root-margin.html

    r238610 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/iframe-no-root-with-wrapping-scroller.html

    r257136 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
     
    2021
    2122<div class="spacer"></div>
    22 <iframe id="target-iframe" src="resources/iframe-no-root-subframe.html"></iframe>
     23<div style="overflow: hidden">
     24  <iframe id="target-iframe" src="resources/iframe-no-root-subframe.html"></iframe>
     25</div>
    2326<div class="spacer"></div>
    2427
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/iframe-no-root.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/initial-observation-with-threshold.html

    r235923 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/inline-client-rect.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-change-events.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
     
    9293
    9394function step2() {
    94   assert_equals(entries.length, 4, "Has 3 total notifications because 4th element was added.");
     95  assert_equals(entries.length, 4, "Has 4 total notifications because 4th element was added.");
    9596  checkRect(entries[3].boundingClientRect, [0, 100, 300, 400], "Check 4th entry rect");
    9697  assert_equals(entries[3].target.id, 'target4', "Check 4th entry target id.");
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/multiple-targets.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/multiple-thresholds.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-attributes.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-exceptions.html

    r234818 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
     
    56<script>
    67test(function () {
    7   assert_throws(RangeError(), function() {
     8  assert_throws_js(RangeError, function() {
    89    new IntersectionObserver(e => {}, {threshold: [1.1]})
    910  })
     
    1112
    1213test(function () {
    13   assert_throws(TypeError(), function() {
     14  assert_throws_js(TypeError, function() {
    1415    new IntersectionObserver(e => {}, {threshold: ["foo"]})
    1516  })
     
    1718
    1819test(function () {
    19   assert_throws("SYNTAX_ERR", function() {
     20  assert_throws_dom("SYNTAX_ERR", function() {
    2021    new IntersectionObserver(e => {}, {rootMargin: "1"})
    2122  })
     
    2324
    2425test(function () {
    25   assert_throws("SYNTAX_ERR", function() {
     26  assert_throws_dom("SYNTAX_ERR", function() {
    2627    new IntersectionObserver(e => {}, {rootMargin: "2em"})
    2728  })
     
    2930
    3031test(function () {
    31   assert_throws("SYNTAX_ERR", function() {
     32  assert_throws_dom("SYNTAX_ERR", function() {
    3233    new IntersectionObserver(e => {}, {rootMargin: "auto"})
    3334  })
     
    3536
    3637test(function () {
    37   assert_throws("SYNTAX_ERR", function() {
     38  assert_throws_dom("SYNTAX_ERR", function() {
    3839    new IntersectionObserver(e => {}, {rootMargin: "calc(1px + 2px)"})
    3940  })
     
    4142
    4243test(function () {
    43   assert_throws("SYNTAX_ERR", function() {
     44  assert_throws_dom("SYNTAX_ERR", function() {
    4445    new IntersectionObserver(e => {}, {rootMargin: "1px !important"})
    4546  })
     
    4748
    4849test(function () {
    49   assert_throws("SYNTAX_ERR", function() {
     50  assert_throws_dom("SYNTAX_ERR", function() {
    5051    new IntersectionObserver(e => {}, {rootMargin: "1px 1px 1px 1px 1px"})
    5152  })
     
    5354
    5455test(function () {
    55   assert_throws(TypeError(), function() {
     56  assert_throws_js(TypeError, function() {
    5657    let observer = new IntersectionObserver(c => {}, {});
    5758    observer.observe("foo");
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-in-iframe.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<style>
    34pre, #log {
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-without-js-reference.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/remove-element.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/cross-origin-subframe.html

    r234723 r257137  
    22<div style="height: 200px; width: 100px;"></div>
    33<div id="target" style="background-color: green; width:100px; height:100px"></div>
     4<div id="empty-target" style="width: 100px"></div>
    45<div style="height: 200px; width: 100px;"></div>
    56
     
    78var port;
    89var entries = [];
    9 var target = document.getElementById('target');
     10var target = document.getElementById("target");
     11var emptyTarget = document.getElementById("empty-target");
    1012var scroller = document.scrollingElement;
    1113var nextStep;
     
    2729    intersectionRect: clientRectToJson(entry.intersectionRect),
    2830    rootBounds: clientRectToJson(entry.rootBounds),
     31    isIntersecting: entry.isIntersecting,
    2932    target: entry.target.id
    30   };
    31 }
    32 
    33 function coordinatesToClientRectJson(top, right, bottom, left) {
    34   return {
    35     top: top,
    36     right: right,
    37     bottom: bottom,
    38     left: left
    3933  };
    4034}
     
    4943}, { rootMargin: "7px" });
    5044observer.observe(target);
     45observer.observe(emptyTarget);
    5146
    5247function step0() {
     
    5449  nextStep = step1;
    5550  var expected = [{
    56     boundingClientRect: coordinatesToClientRectJson(8, 208, 108, 308),
    57     intersectionRect: coordinatesToClientRectJson(0, 0, 0, 0),
     51    boundingClientRect: [8, 108, 208, 308],
     52    intersectionRect: [0, 0, 0, 0],
    5853    rootBounds: "null",
     54    isIntersecting: false,
    5955    target: target.id
     56  }, {
     57    boundingClientRect: [8, 108, 308, 308],
     58    intersectionRect: [0, 0, 0, 0],
     59    rootBounds: "null",
     60    isIntersecting: false,
     61    target: emptyTarget.id
    6062  }];
    6163  port.postMessage({
     
    8486  entries = entries.concat(observer.takeRecords());
    8587  var expected = [{
    86     boundingClientRect: coordinatesToClientRectJson(-42, 108, 58, 8),
    87     intersectionRect: coordinatesToClientRectJson(0, 108, 58, 8),
     88    boundingClientRect: [8, 108, -42, 58],
     89    intersectionRect: [8, 108, 0, 58],
    8890    rootBounds: "null",
     91    isIntersecting: true,
    8992    target: target.id
     93  }, {
     94    boundingClientRect: [8, 108, 58, 58],
     95    intersectionRect: [8, 108, 58, 58],
     96    rootBounds: "null",
     97    isIntersecting: true,
     98    target: emptyTarget.id
    9099  }];
    91100  port.postMessage({
     
    102111  entries = entries.concat(observer.takeRecords());
    103112  var expected = [{
    104     boundingClientRect: coordinatesToClientRectJson(-42, 108, 58, 8),
    105     intersectionRect: coordinatesToClientRectJson(0, 0, 0, 0),
     113    boundingClientRect: [8, 108, -42, 58],
     114    intersectionRect: [0, 0, 0, 0],
    106115    rootBounds: "null",
     116    isIntersecting: false,
    107117    target: target.id
     118  }, {
     119    boundingClientRect: [8, 108, 58, 58],
     120    intersectionRect: [0, 0, 0, 0],
     121    rootBounds: "null",
     122    isIntersecting: false,
     123    target: emptyTarget.id
    108124  }];
    109125  port.postMessage({
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/intersection-observer-test-utils.js

    r235923 r257137  
    7373function waitForNotification(t, f) {
    7474  requestAnimationFrame(function() {
    75     requestAnimationFrame(function() { t.step_timeout(f); });
     75    requestAnimationFrame(function() { t.step_timeout(f, 0); });
     76  });
     77}
     78
     79// If you need to wait until the IntersectionObserver algorithm has a chance
     80// to run, but don't need to wait for delivery of the notifications...
     81function waitForFrame(t, f) {
     82  requestAnimationFrame(function() {
     83    t.step_timeout(f, 0);
    7684  });
    7785}
     
    8694// Following these rules will ensure that the test suite will not abort before
    8795// all test steps have run.
    88 function runTestCycle(f, description) {
     96//
     97// If the 'delay' parameter to the IntersectionObserver constructor is used,
     98// tests will need to add the same delay to their runTestCycle invocations, to
     99// wait for notifications to be generated and delivered.
     100function runTestCycle(f, description, delay) {
    89101  async_test(function(t) {
    90     waitForNotification(t, t.step_func_done(f));
     102    if (delay) {
     103      step_timeout(() => {
     104        waitForNotification(t, t.step_func_done(f));
     105      }, delay);
     106    } else {
     107      waitForNotification(t, t.step_func_done(f));
     108    }
    91109  }, description);
    92110}
     
    161179  else
    162180    checkRect(actual.rootBounds, expected.rootBounds, 'entry.rootBounds');
     181  assert_equals(actual.isIntersecting, expected.isIntersecting);
    163182  assert_equals(actual.target, expected.target);
    164183}
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/w3c-import.log

    r234723 r257137  
    1515------------------------------------------------------------------------
    1616List of files:
     17/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/cross-origin-child-iframe.sub.html
    1718/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/cross-origin-subframe.html
    1819/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/iframe-no-root-subframe.html
    1920/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/intersection-observer-test-utils.js
     21/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/nested-cross-origin-child-iframe.sub.html
     22/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/nested-cross-origin-grand-child-iframe.html
    2023/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/observer-in-iframe-subframe.html
     24/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/same-origin-grand-child-iframe.html
     25/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/scaled-target-subframe.html
    2126/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/timestamp-subframe.html
     27/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/v2-subframe.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-no-root.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-root.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-zero-size-target.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/shadow-content.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/target-in-different-window.html

    r237829 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/text-target.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/timestamp.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/unclipped-root.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/w3c-import.log

    r237829 r257137  
    1919/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/client-rect.html
    2020/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/containing-block.html
    21 /LayoutTests/imported/w3c/web-platform-tests/intersection-observer/cross-origin-iframe.html
     21/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/cross-origin-iframe.sub.html
    2222/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/disconnect.html
    2323/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/display-none.html
     24/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/document-scrolling-element-root.html
    2425/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/edge-inclusive-intersection.html
     26/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/empty-root-margin.html
    2527/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/idlharness.window.js
     28/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/iframe-no-root-with-wrapping-scroller.html
    2629/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/iframe-no-root.html
    2730/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/initial-observation-with-threshold.html
    2831/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/inline-client-rect.html
     32/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/inline-with-block-child-client-rect.html
    2933/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-change-events.html
     34/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/isIntersecting-threshold.html
    3035/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/multiple-targets.html
    3136/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/multiple-thresholds.html
     37/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/nested-cross-origin-iframe.sub.html
    3238/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-attributes.html
    3339/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-exceptions.html
     
    3541/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-without-js-reference.html
    3642/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/remove-element.html
     43/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin-root-element.html
     44/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin-rounding.html
    3745/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin.html
     46/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/rtl-clipped-root.html
    3847/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-no-root.html
    3948/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-root.html
    4049/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-document-zero-size-target.html
     50/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/same-origin-grand-child-iframe.sub.html
    4151/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/shadow-content.html
    4252/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/target-in-different-window.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/zero-area-element-hidden.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/zero-area-element-visible.html

    r234723 r257137  
    11<!DOCTYPE html>
     2<meta name="viewport" content="width=device-width,initial-scale=1">
    23<script src="/resources/testharness.js"></script>
    34<script src="/resources/testharnessreport.js"></script>
  • trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/intersection-observer/cross-origin-iframe.sub-expected.txt

    r257136 r257137  
    44PASS First rAF
    55PASS topDocument.scrollingElement.scrollTop = 200
    6 FAIL iframeDocument.scrollingElement.scrollTop = 250 assert_equals: expected 1 but got 0
    7 FAIL topDocument.scrollingElement.scrollTop = 100 assert_equals: expected 1 but got 0
     6FAIL iframeDocument.scrollingElement.scrollTop = 250 assert_equals: expected 2 but got 0
     7FAIL topDocument.scrollingElement.scrollTop = 100 assert_equals: expected 2 but got 0
    88
Note: See TracChangeset for help on using the changeset viewer.