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 function test() | |
7 { | |
8 var divWithJQueryHandlers; | |
9 | |
10 InspectorTest.runTestSuite([ | |
11 function testSetUp(next) | |
12 { | |
13 InspectorTest.RuntimeAgent.evaluate("document.getElementById(\"jquer y-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
| |
14 function step1(error, result, wasThrown) | |
15 { | |
16 divWithJQueryHandlers = InspectorTest.runtimeModel.createRemoteO bject(result); | |
17 next(); | |
18 } | |
19 }, | |
20 function testDivJQueryEventListeners(next) | |
21 { | |
22 divWithJQueryHandlers.eventListeners().then(InspectorTest.dumpEventL isteners.bind(this, next)); | |
23 } | |
24 ]); | |
25 } | |
26 </script> | |
27 </head> | |
28 <body> | |
29 <p> | |
30 Tests RemoteObject.eventListeners. | |
31 </p> | |
32 <div id="jquery-handlers"></div> | |
33 <script> | |
34 var node = $("#jquery-handlers")[0]; | |
35 $("#jquery-handlers").click(function(){ console.log("first jquery"); }); | |
36 $("#jquery-handlers").click(function(){ console.log("second jquery"); }); | |
37 node.addEventListener("click", function() { console.log("addEventListener"); }); | |
38 node.onclick = function() { console.log("onclick"); }; | |
39 runTest(); | |
40 </script> | |
41 </body> | |
42 </html> | |
OLD | NEW |