Index: third_party/WebKit/LayoutTests/shadow-dom/event-composed-path.html |
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/event-composed-path.html b/third_party/WebKit/LayoutTests/shadow-dom/event-composed-path.html |
index 4b184a0e68be4e88cb2cc962a8839953085ccd80..1eb31f978e122edba210deabac97960f38e83091 100644 |
--- a/third_party/WebKit/LayoutTests/shadow-dom/event-composed-path.html |
+++ b/third_party/WebKit/LayoutTests/shadow-dom/event-composed-path.html |
@@ -13,7 +13,11 @@ |
test(() => { |
let n = createTestTree(test1); |
let log = dispatchEventWithLog(n, n.target, new Event('my-event', { bubbles: true, composed: true })); |
- assert_event_path_equals(log, makeExpectedEventPathLog(['target', 'd1', 'test1'])); |
+ let path = ['target', 'd1', 'test1']; |
+ assert_event_path_equals(log, |
+ [['target', 'target', null, path], |
+ ['d1', 'target', null, path], |
+ ['test1', 'target', null, path]]); |
}, 'Event Path without ShadowRoots.'); |
</script> |
@@ -29,7 +33,12 @@ test(() => { |
test(() => { |
let n = createTestTree(test2); |
let log = dispatchEventWithLog(n, n.target, new Event('my-event', { bubbles: true, composed: true })); |
- assert_event_path_equals(log, makeExpectedEventPathLog(['target', 'sr', 'host', 'test2'])); |
+ let path = ['target', 'sr', 'host', 'test2']; |
+ assert_event_path_equals(log, |
+ [['target', 'target', null, path], |
+ ['sr', 'target', null, path], |
+ ['host', 'host', null, path], |
+ ['test2', 'host', null, path]]); |
}, 'Event Path with an open ShadowRoot.'); |
</script> |
@@ -47,10 +56,10 @@ test(() => { |
let log = dispatchEventWithLog(n, n.target, new Event('my-event', { bubbles: true, composed: true })); |
let path = ['target','sr', 'host', 'test3']; |
let path1 = ['host', 'test3']; |
- assert_event_path_equals(log, [['target', null, path], |
- ['sr', null, path], |
- ['host', null, path1], |
- ['test3', null, path1]]); |
+ assert_event_path_equals(log, [['target', 'target', null, path], |
+ ['sr', 'target', null, path], |
+ ['host', 'host', null, path1], |
+ ['test3', 'host', null, path1]]); |
}, 'Event Path with a closed ShadowRoot.'); |
</script> |
@@ -70,7 +79,13 @@ test(() => { |
test(() => { |
let n = createTestTree(test4); |
let log = dispatchEventWithLog(n, n.target, new Event('my-event', { bubbles: true, composed: true })); |
- assert_event_path_equals(log, makeExpectedEventPathLog(['target', 'sr2', 'host2', 'sr1', 'host1', 'test4'])); |
+ let path = ['target', 'sr2', 'host2', 'sr1', 'host1', 'test4']; |
+ assert_event_path_equals(log, [['target', 'target', null, path], |
+ ['sr2', 'target', null, path], |
+ ['host2', 'host2', null, path], |
+ ['sr1', 'host2', null, path], |
+ ['host1', 'host1', null, path], |
+ ['test4', 'host1', null, path]]); |
}, 'Event Path with nested ShadowRoots: open > open.'); |
</script> |
@@ -92,12 +107,12 @@ test(() => { |
let log = dispatchEventWithLog(n, n.target, new Event('my-event', { bubbles: true, composed: true })); |
let path = ['target', 'sr2', 'host2', 'sr1', 'host1', 'test5']; |
let path1 = ['host2', 'sr1', 'host1', 'test5']; |
- assert_event_path_equals(log, [['target', null, path], |
- ['sr2', null, path], |
- ['host2', null, path1], |
- ['sr1', null, path1], |
- ['host1', null, path1], |
- ['test5', null, path1]]); |
+ assert_event_path_equals(log, [['target', 'target', null, path], |
+ ['sr2', 'target', null, path], |
+ ['host2', 'host2', null, path1], |
+ ['sr1', 'host2', null, path1], |
+ ['host1', 'host1', null, path1], |
+ ['test5', 'host1', null, path1]]); |
}, 'Event Path with nested ShadowRoots: open > closed.'); |
</script> |
@@ -119,12 +134,12 @@ test(() => { |
let log = dispatchEventWithLog(n, n.target, new Event('my-event', { bubbles: true, composed: true })); |
let path = ['target', 'sr2', 'host2', 'sr1', 'host1', 'test6']; |
let path1 = ['host1', 'test6']; |
- assert_event_path_equals(log, [['target', null, path], |
- ['sr2', null, path], |
- ['host2', null, path], |
- ['sr1', null, path], |
- ['host1', null, path1], |
- ['test6', null, path1]]); |
+ assert_event_path_equals(log, [['target', 'target', null, path], |
+ ['sr2', 'target', null, path], |
+ ['host2', 'host2', null, path], |
+ ['sr1', 'host2', null, path], |
+ ['host1', 'host1', null, path1], |
+ ['test6', 'host1', null, path1]]); |
}, 'Event Path with nested ShadowRoots: closed > open.'); |
</script> |
@@ -147,12 +162,12 @@ test(() => { |
let path = ['target', 'sr2', 'host2', 'sr1', 'host1', 'test7']; |
let path1 = ['host2', 'sr1', 'host1', 'test7']; |
let path2 = ['host1', 'test7']; |
- assert_event_path_equals(log, [['target', null, path], |
- ['sr2', null, path], |
- ['host2', null, path1], |
- ['sr1', null, path1], |
- ['host1', null, path2], |
- ['test7', null, path2]]); |
+ assert_event_path_equals(log, [['target', 'target', null, path], |
+ ['sr2', 'target', null, path], |
+ ['host2', 'host2', null, path1], |
+ ['sr1', 'host2', null, path1], |
+ ['host1', 'host1', null, path2], |
+ ['test7', 'host1', null, path2]]); |
}, 'Event Path with nested ShadowRoots: closed > closed.'); |
</script> |
@@ -169,8 +184,12 @@ test(() => { |
test(() => { |
let n = createTestTree(test8); |
let log = dispatchEventWithLog(n, n.target, new Event('my-event', { bubbles: true, composed: true })); |
- let path = ['target', 'slot', 'sr1', 'host1', 'test8']; |
- assert_event_path_equals(log, makeExpectedEventPathLog(path)); |
+ let path = ['target','slot', 'sr1', 'host1', 'test8']; |
+ assert_event_path_equals(log, [['target', 'target', null, path], |
+ ['slot', 'target', null, path], |
+ ['sr1', 'target', null, path], |
+ ['host1', 'target', null, path], |
+ ['test8', 'target', null, path]]); |
}, 'Event Path with a slot in an open Shadow Root.'); |
</script> |
@@ -189,11 +208,11 @@ test(() => { |
let log = dispatchEventWithLog(n, n.target, new Event('my-event', { bubbles: true, composed: true })); |
let path = ['target', 'slot', 'sr1', 'host1', 'test9']; |
let path1 = ['target', 'host1', 'test9']; |
- assert_event_path_equals(log, [['target', null, path1], |
- ['slot', null, path], |
- ['sr1', null, path], |
- ['host1', null, path1], |
- ['test9', null, path1]]); |
+ assert_event_path_equals(log, [['target', 'target', null, path1], |
+ ['slot', 'target', null, path], |
+ ['sr1', 'target', null, path], |
+ ['host1', 'target', null, path1], |
+ ['test9', 'target', null, path1]]); |
}, 'Event Path with a slot in a closed Shadow Root.'); |
</script> |
@@ -215,8 +234,15 @@ test(() => { |
test(() => { |
let n = createTestTree(test10); |
let log = dispatchEventWithLog(n, n.target, new Event('my-event', { bubbles: true, composed: true })); |
- let path = ['target', 'slot1', 'slot2', 'sr2', 'host2', 'sr1', 'host1', 'test10']; |
- assert_event_path_equals(log, makeExpectedEventPathLog(path)); |
+ let path = ['target','slot1', 'slot2', 'sr2', 'host2', 'sr1', 'host1', 'test10']; |
+ assert_event_path_equals(log, [['target', 'target', null, path], |
+ ['slot1', 'target', null, path], |
+ ['slot2', 'target', null, path], |
+ ['sr2', 'target', null, path], |
+ ['host2', 'target', null, path], |
+ ['sr1', 'target', null, path], |
+ ['host1', 'target', null, path], |
+ ['test10', 'target', null, path]]); |
}, 'Event Path with slots in nested ShadowRoots: open > open.'); |
</script> |
@@ -241,13 +267,13 @@ test(() => { |
let path = ['target', 'slot1', 'slot2', 'sr2', 'host2', 'sr1', 'host1', 'test11']; |
let path1 = ['target', 'slot1', 'host2', 'sr1', 'host1', 'test11']; |
let path2 = ['target', 'host1', 'test11']; |
- assert_event_path_equals(log, [['target', null, path2], |
- ['slot1', null, path1], |
- ['slot2', null, path], |
- ['sr2', null, path], |
- ['host2', null, path1], |
- ['sr1', null, path1], |
- ['host1', null, path2], |
- ['test11', null, path2]]); |
+ assert_event_path_equals(log, [['target', 'target', null, path2], |
+ ['slot1', 'target', null, path1], |
+ ['slot2', 'target', null, path], |
+ ['sr2', 'target', null, path], |
+ ['host2', 'target', null, path1], |
+ ['sr1', 'target', null, path1], |
+ ['host1', 'target', null, path2], |
+ ['test11', 'target', null, path2]]); |
}, 'Event Path with slots in nested ShadowRoots: closed > closed.'); |
</script> |