Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(912)

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/events/event-dispatch/test-003.html

Issue 1899623002: Import latest web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: handle new failures Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/events/event-dispatch/test-003.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/events/event-dispatch/test-003.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/events/event-dispatch/test-003.html
index c69ee74a419f0896327a14b836cae0af81d70ac1..ea4a5caa6ff64d2a93118809d44f6619d00b80a8 100644
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/events/event-dispatch/test-003.html
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/events/event-dispatch/test-003.html
@@ -16,7 +16,8 @@ policies and contribution forms [3].
<meta name="assert" content="Event Path Trimming: In cases where both relatedTarget and target of a trusted event are part of the same shadow tree, the conforming UAs must stop events at the shadow root to avoid the appearance of spurious mouseover and mouseout events firing from the same node.">
<script src="../../../../../../resources/testharness.js"></script>
<script src="../../../../../../resources/testharnessreport.js"></script>
-<script src="../../testcommon.js"></script>
+<script src="../../../../html/resources/common.js"></script>
+<script src="../../../resources/shadow-dom-utils.js"></script>
</head>
<body>
<div id="log"></div>
@@ -32,7 +33,7 @@ A_05_05_03_T01.step(unit(function (ctx) {
d.body.appendChild(host);
//Shadow root to play with
- var s = host.createShadowRoot();
+ var s = host.attachShadow({mode: 'open'});
s.id = 'shadow';
var input1 = d.createElement('input');
@@ -44,20 +45,20 @@ A_05_05_03_T01.step(unit(function (ctx) {
s.appendChild(input2);
input1.addEventListener('focusin', A_05_05_03_T01.step_func(function(event) {
- assert_equals(event.deepPath.length, 7);
- assert_equals(event.deepPath[0].id, 'input1');
- assert_equals(event.deepPath[1].id, 'shadow');
- assert_equals(event.deepPath[2].id, 'host');
- assert_equals(event.deepPath[3].tagName, 'BODY');
- assert_equals(event.deepPath[4].tagName, 'HTML');
- assert_equals(event.deepPath[5], d);
- assert_equals(event.deepPath[6], ctx.iframes[0].contentWindow);
+ assert_equals(event.deepPath().length, 7);
+ assert_equals(event.deepPath()[0].id, 'input1');
+ assert_equals(event.deepPath()[1].id, 'shadow');
+ assert_equals(event.deepPath()[2].id, 'host');
+ assert_equals(event.deepPath()[3].tagName, 'BODY');
+ assert_equals(event.deepPath()[4].tagName, 'HTML');
+ assert_equals(event.deepPath()[5], d);
+ assert_equals(event.deepPath()[6], ctx.iframes[0].contentWindow);
}), false);
input2.addEventListener('focusin', A_05_05_03_T01.step_func(function(event) {
- assert_equals(event.deepPath.length, 2);
- assert_equals(event.deepPath[0].id, 'input2');
- assert_equals(event.deepPath[1].id, 'shadow');
+ assert_equals(event.deepPath().length, 2);
+ assert_equals(event.deepPath()[0].id, 'input2');
+ assert_equals(event.deepPath()[1].id, 'shadow');
A_05_05_03_T01.done();
}), false);
@@ -69,7 +70,7 @@ A_05_05_03_T01.step(unit(function (ctx) {
// In this case, original relatedTarget is #input1, and original target
// is #input2.
// It should be viewed outside the shadow as "target == relatedTarget"
- // after event retargeting, therefore, event.deepPath above the shadow
+ // after event retargeting, therefore, event.deepPath() above the shadow
// host will be trimmed.
// Expected event path for #input2:
// <input>, #shadow-root

Powered by Google App Engine
This is Rietveld 408576698