| 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 bbed4dad3cc1f8ad009ca8ad98ca0cfe4276e6c5..7b4841fb571d55c4bb83db470d6140107bb12278 100644
|
| --- a/third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js
|
| +++ b/third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js
|
| @@ -130,3 +130,13 @@ function dispatchEventWithLog(nodes, target, event) {
|
| target.dispatchEvent(event);
|
| return log;
|
| }
|
| +
|
| +// This function assumes that testharness.js is available.
|
| +function assert_event_path_equals(actual, expected) {
|
| + assert_equals(actual.length, expected.length);
|
| + for (let i = 0; i < actual.length; ++i) {
|
| + assert_equals(actual[i][0], expected[i][0], 'currentTarget at ' + i + ' should be same');
|
| + assert_equals(actual[i][1], expected[i][1], 'relatedTarget at ' + i + ' should be same');
|
| + assert_array_equals(actual[i][2], expected[i][2], 'composedPath at ' + i + ' should be same');
|
| + }
|
| +}
|
|
|