| Index: LayoutTests/fast/dom/shadow/event-path.html
|
| diff --git a/LayoutTests/fast/dom/shadow/event-path.html b/LayoutTests/fast/dom/shadow/event-path.html
|
| index c6d2f31b71e35ba72617375ca5d72c96c4c3db8f..1172e79b95a057b2450689cbfb824148004db773 100644
|
| --- a/LayoutTests/fast/dom/shadow/event-path.html
|
| +++ b/LayoutTests/fast/dom/shadow/event-path.html
|
| @@ -1,13 +1,6 @@
|
| <!DOCTYPE html>
|
| -<html>
|
| -<head>
|
| -<script src="../../../resources/js-test.js"></script>
|
| -<script src="resources/shadow-dom.js"></script>
|
| -</head>
|
| -<body>
|
| -<p id="description"></p>
|
| -<div id="sandbox"></div>
|
| -<pre id="console"></pre>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| <div id='a'>
|
| <div id='b'>
|
| <div id='c'>
|
| @@ -18,18 +11,33 @@
|
| var b = document.getElementById('b');
|
| b.addEventListener('click', function(event) {
|
| var path = event.path;
|
| - debug(dumpNodeList(path));
|
| - debug('Makes sure that event.path returns static NodeList.');
|
| + test(function () {
|
| + assert_event_path_for_b(path);
|
| + }, "event.path in click event");
|
| path[1] = '';
|
| - debug(dumpNodeList(event.path));
|
| + test(function () {
|
| + assert_event_path_for_b(event.path);
|
| + }, "Make sure that event.path returns static NodeList.");
|
| });
|
| var clickEvent = document.createEvent("MouseEvents");
|
| -debug("Makes sure that event.path is empty before dispatching the event.");
|
| -debug(dumpNodeList(clickEvent.path));
|
| +test(function () {
|
| + assert_equals(clickEvent.path.length, 0);
|
| +}, "Make sure that event.path is empty before dispatching the event.");
|
| +
|
| clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
| b.dispatchEvent(clickEvent);
|
| -debug("Makes sure that event.path isn't emptified after dispatching the event.");
|
| -debug(dumpNodeList(clickEvent.path));
|
| +
|
| +function assert_event_path_for_b(path) {
|
| + assert_equals(path.length, 6);
|
| + assert_equals(path[0], b);
|
| + assert_equals(path[1], a);
|
| + assert_equals(path[2], document.body);
|
| + assert_equals(path[3], document.documentElement);
|
| + assert_equals(path[4], document);
|
| + assert_equals(path[5], window);
|
| +}
|
| +
|
| +test(function () {
|
| + assert_event_path_for_b(clickEvent.path);
|
| +}, "Make sure that event.path isn't emptified after dispatching the event.");
|
| </script>
|
| -</body>
|
| -</html>
|
|
|