| Index: third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js
|
| diff --git a/third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js b/third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js
|
| index c11861a1321ad0fb2cd6a5336233d5f9105bb0b8..f17927726f861685cec628f0659f5d7140250e23 100644
|
| --- a/third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js
|
| +++ b/third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js
|
| @@ -72,7 +72,13 @@ function createTestTree(node) {
|
| function attachShadowFromTemplate(template) {
|
| let parent = template.parentNode;
|
| parent.removeChild(template);
|
| - let shadowRoot = parent.attachShadow({mode: template.getAttribute('data-mode')});
|
| + let shadowRoot;
|
| + if (template.getAttribute('data-mode') === 'v0') {
|
| + // For legacy Shadow DOM
|
| + shadowRoot = parent.createShadowRoot();
|
| + } else {
|
| + shadowRoot = parent.attachShadow({mode: template.getAttribute('data-mode')});
|
| + }
|
| let id = template.id;
|
| if (id) {
|
| shadowRoot.id = id;
|
| @@ -158,6 +164,14 @@ function dispatchUAEventWithLog(nodes, target, eventType, callback) {
|
| return log;
|
| }
|
|
|
| +function makeExpectedEventPathLog(path) {
|
| + let expectedLog = [];
|
| + for (let i of path) {
|
| + expectedLog.push([i, null, path]);
|
| + }
|
| + return expectedLog;
|
| +}
|
| +
|
| // This function assumes that testharness.js is available.
|
| function assert_event_path_equals(actual, expected) {
|
| assert_equals(actual.length, expected.length);
|
|
|