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..fe237125ba41154d9606e7cb88ca948c147c3bb8 |
--- /dev/null |
+++ b/LayoutTests/inspector/domdebugger/domdebugger-getEventListeners-jquery2.html |
@@ -0,0 +1,51 @@ |
+<html> |
+<head> |
+<script src="../../http/tests/inspector/inspector-test.js"></script> |
+<script src="resources/jquery-2.1.4.min.js"></script> |
+<script> |
+var initialize_AdditionalPreload = function() { |
+ InspectorTest.preloadModule("frameworks_support"); |
+} |
+ |
+function test() |
+{ |
+ var divWithJQueryHandlers; |
+ InspectorTest.runTestSuite([ |
+ function testSetUp(next) |
+ { |
+ InspectorTest.RuntimeAgent.evaluate(WebInspector.FrameworksSupport.eventListenersSetupFunction(), step1); |
+ |
+ function step1() { |
+ InspectorTest.RuntimeAgent.evaluate("document.getElementById(\"jquery-handlers\")", "get-event-listeners-test", step2); |
+ } |
+ |
+ function step2(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 resolving for jQuery 2.x. |
+</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> |