| Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-getEventListeners.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-getEventListeners.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-getEventListeners.html
|
| index a6eda1f6860aeba5c9e864813a7a37993884aa73..68ffac5c05cc0c8828a8b72b17dbba248bce03f0 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-getEventListeners.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/domdebugger-getEventListeners.html
|
| @@ -83,10 +83,28 @@ function test()
|
| function callbackListenersWindow(result)
|
| {
|
| logGetListenersResult("window", result);
|
| - return {callback: calbackStartDivWithListeners};
|
| + return {callback: callbackGetWindowWithDescendants};
|
| }
|
| -
|
| - function calbackStartDivWithListeners()
|
| + function callbackGetWindowWithDescendants()
|
| + {
|
| + var expression = "window";
|
| + return { command: "Runtime.evaluate", params: {expression: expression, objectGroup: "event-listeners-test"}, callback: callbackEvalWindowWithDescendants };
|
| + }
|
| + function callbackEvalWindowWithDescendants(result)
|
| + {
|
| + var id = result.result.objectId;
|
| + if (id === undefined)
|
| + throw new Error("objectId is expected");
|
| + return {
|
| + command: "DOMDebugger.getEventListeners", params: {objectId: id, descendants: true}, callback: callbackListenersWindowWithDescendants
|
| + };
|
| + }
|
| + function callbackListenersWindowWithDescendants(result)
|
| + {
|
| + logGetListenersResult("window & descendants", result);
|
| + return {callback: callbackStartDivWithListeners};
|
| + }
|
| + function callbackStartDivWithListeners()
|
| {
|
| var expression = "(function(){\n\
|
| var div = document.getElementById(\"listeners1\");\n\
|
| @@ -109,10 +127,28 @@ function test()
|
| function callbackListenersDivWithListeners(result)
|
| {
|
| logGetListenersResult("div#listeners1", result);
|
| - return {callback: calbackStartDivWithoutListeners};
|
| + return {callback: callbackStartDivWithListenersAndDescendants};
|
| }
|
| -
|
| - function calbackStartDivWithoutListeners()
|
| + function callbackStartDivWithListenersAndDescendants()
|
| + {
|
| + var expression = "document.getElementById(\"listeners1\")";
|
| + return { command: "Runtime.evaluate", params: {expression: expression, objectGroup: "event-listeners-test"}, callback: callbackEvalDivWithListenersAndDescendants };
|
| + }
|
| + function callbackEvalDivWithListenersAndDescendants(result)
|
| + {
|
| + var id = result.result.objectId;
|
| + if (id === undefined)
|
| + throw new Error("objectId is expected");
|
| + return {
|
| + command: "DOMDebugger.getEventListeners", params: {objectId: id, descendants: true}, callback: callbackListenersDivWithListenersAndDescendants
|
| + };
|
| + }
|
| + function callbackListenersDivWithListenersAndDescendants(result)
|
| + {
|
| + logGetListenersResult("div#listeners1 and descendants", result);
|
| + return {callback: callbackStartDivWithoutListeners};
|
| + }
|
| + function callbackStartDivWithoutListeners()
|
| {
|
| var expression = "(function(){\n\
|
| return document.getElementById(\"listeners2\");\n\
|
| @@ -160,7 +196,9 @@ function test()
|
| }
|
| </script>
|
| </head>
|
| -<div id="listeners1" onload="return 42;"></div>
|
| +<div id="listeners1" onload="return 42;">
|
| + <div id="listeners1-child" onblur="return 50;"></div>
|
| +</div>
|
| <div id="listeners2"></div>
|
| <body onLoad="runTest();">
|
| </body>
|
|
|