OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="resources/jquery-2.1.4.min.js"></script> |
| 5 <script> |
| 6 var initialize_AdditionalPreload = function() { |
| 7 InspectorTest.preloadModule("frameworks_support"); |
| 8 } |
| 9 |
| 10 function test() |
| 11 { |
| 12 var divWithJQueryHandlers; |
| 13 InspectorTest.runTestSuite([ |
| 14 function testSetUp(next) |
| 15 { |
| 16 InspectorTest.RuntimeAgent.evaluate(WebInspector.FrameworksSupport.e
ventListenersSetupFunction(), step1); |
| 17 |
| 18 function step1() { |
| 19 InspectorTest.RuntimeAgent.evaluate("document.getElementById(\"j
query-handlers\")", "get-event-listeners-test", step2); |
| 20 } |
| 21 |
| 22 function step2(error, result, wasThrown) |
| 23 { |
| 24 divWithJQueryHandlers = InspectorTest.runtimeModel.createRemoteO
bject(result); |
| 25 next(); |
| 26 } |
| 27 }, |
| 28 |
| 29 function testDivJQueryEventListeners(next) |
| 30 { |
| 31 divWithJQueryHandlers.eventListeners().then(InspectorTest.dumpEventL
isteners.bind(this, next)); |
| 32 } |
| 33 ]); |
| 34 } |
| 35 </script> |
| 36 </head> |
| 37 <body> |
| 38 <p> |
| 39 Tests RemoteObject.eventListeners resolving for jQuery 2.x. |
| 40 </p> |
| 41 <div id="jquery-handlers"></div> |
| 42 <script> |
| 43 var node = $("#jquery-handlers")[0]; |
| 44 $("#jquery-handlers").click(function(){ console.log("first jquery"); }); |
| 45 $("#jquery-handlers").click(function(){ console.log("second jquery"); }); |
| 46 node.addEventListener("click", function() { console.log("addEventListener");
}); |
| 47 node.onclick = function() { console.log("onclick"); }; |
| 48 runTest(); |
| 49 </script> |
| 50 </body> |
| 51 </html> |
OLD | NEW |