Chromium Code Reviews| Index: LayoutTests/inspector/domdebugger/domdebugger-getEventListeners-jquery2.html |
| diff --git a/LayoutTests/inspector/domdebugger/domdebugger-getEventListeners-jquery2.html b/LayoutTests/inspector/domdebugger/domdebugger-getEventListeners-jquery2.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3694197968f97b5d779bc95cefc74f353b5cdd74 |
| --- /dev/null |
| +++ b/LayoutTests/inspector/domdebugger/domdebugger-getEventListeners-jquery2.html |
| @@ -0,0 +1,42 @@ |
| +<html> |
| +<head> |
| +<script src="../../http/tests/inspector/inspector-test.js"></script> |
| +<script src="resources/jquery-2.1.4.min.js"></script> |
| +<script> |
| +function test() |
| +{ |
| + var divWithJQueryHandlers; |
| + |
| + InspectorTest.runTestSuite([ |
| + function testSetUp(next) |
| + { |
| + InspectorTest.RuntimeAgent.evaluate("document.getElementById(\"jquery-handlers\")", "get-event-listeners-test", step1); |
|
yurys
2015/08/11 21:10:24
Do we still need changes to the test above they lo
kozy
2015/08/12 18:02:22
It checks support for jquery-2.x, previous for jqu
|
| + function step1(error, result, wasThrown) |
| + { |
| + divWithJQueryHandlers = InspectorTest.runtimeModel.createRemoteObject(result); |
| + next(); |
| + } |
| + }, |
| + function testDivJQueryEventListeners(next) |
| + { |
| + divWithJQueryHandlers.eventListeners().then(InspectorTest.dumpEventListeners.bind(this, next)); |
| + } |
| + ]); |
| +} |
| +</script> |
| +</head> |
| +<body> |
| +<p> |
| +Tests RemoteObject.eventListeners. |
| +</p> |
| +<div id="jquery-handlers"></div> |
| +<script> |
| + var node = $("#jquery-handlers")[0]; |
| + $("#jquery-handlers").click(function(){ console.log("first jquery"); }); |
| + $("#jquery-handlers").click(function(){ console.log("second jquery"); }); |
| + node.addEventListener("click", function() { console.log("addEventListener"); }); |
| + node.onclick = function() { console.log("onclick"); }; |
| + runTest(); |
| +</script> |
| +</body> |
| +</html> |