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..9535292ab18e7963a5aa197346ebca1b0b700089 |
--- /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("framework_support"); |
+} |
+ |
+function test() |
+{ |
+ var divWithJQueryHandlers; |
+ InspectorTest.runTestSuite([ |
+ function testSetUp(next) |
+ { |
+ WebInspector.EventListenersFrameworkSupport.initializeOnContext(WebInspector.context.flavor(WebInspector.ExecutionContext)).then(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> |