Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: LayoutTests/inspector/domdebugger/domdebugger-getEventListeners-jquery2.html

Issue 1268353005: [DevTools] Support JQuery event listeners (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698