Bug 1497331 [wpt PR 13370] - Add elementsFromPoint() tests for non-atomic inlines., a=testonly
authorMorten Stenshorne <mstensho@chromium.org>
Thu, 11 Oct 2018 09:30:49 +0000
changeset 489241 73f3a0ec3ee83eeb084e9138badb4c45298f1c90
parent 489240 a798aebf9902cbc103a71142c8d9119b3b8b6a41
child 489242 778947aa35feb8fd5ae1e8d192d98e1bec585bd3
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewerstestonly
bugs1497331, 13370, 1261436, 597027
milestone64.0a1
Bug 1497331 [wpt PR 13370] - Add elementsFromPoint() tests for non-atomic inlines., a=testonly Automatic update from web-platform-testsAdd elementsFromPoint() tests for non-atomic inlines. Added a comment to LayoutInline, pointing out that LayoutNG is doing the right thing already, while legacy is wrong. Cq-Include-Trybots: luci.chromium.try‚Äč:linux_layout_tests_layout_ng Change-Id: I026404af70c33b0a94900773636d5e138a725976 Reviewed-on: https://chromium-review.googlesource.com/c/1261436 Reviewed-by: Aleks Totic <atotic@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#597027} -- wpt-commits: 0d90b8b3faaf4c786f359beb5d77bcd894cb9a47 wpt-pr: 13370
testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-htb-ltr.html
testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-htb-rtl.html
testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html
testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html
testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html
testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-htb-ltr.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:horizontal-tb; direction:ltr;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(15, 15);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-htb-rtl.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:horizontal-tb; direction:rtl;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(200, 15);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:vertical-lr; direction:ltr;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(15, 15);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:vertical-lr; direction:rtl;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(15, 200);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:vertical-rl; direction:ltr;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(200, 15);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:vertical-rl; direction:rtl;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(200, 200);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>