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

Side by Side Diff: LayoutTests/inspector/elements/event-listener-sidebar.html

Issue 1042853004: [DevTools] Event Listeners Sidebar shows window listeners (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../http/tests/inspector/elements-test.js"></script>
5 <script> 5 <script>
6 function documentClickHandler(event) { console.log("click - document - attribute "); } 6 function documentClickHandler(event) { console.log("click - document - attribute "); }
7 7
8 function setupEventListeners() 8 function setupEventListeners()
9 { 9 {
10 function f() {} 10 function f() {}
(...skipping 12 matching lines...) Expand all
23 document.body.addEventListener("custom event", f, true); 23 document.body.addEventListener("custom event", f, true);
24 24
25 function ObjectHandler() { document.addEventListener("click", this, true); } 25 function ObjectHandler() { document.addEventListener("click", this, true); }
26 ObjectHandler.prototype.toString = function() { return "ObjectHandler"; } 26 ObjectHandler.prototype.toString = function() { return "ObjectHandler"; }
27 new ObjectHandler(); 27 new ObjectHandler();
28 28
29 function EventListenerImpl() { document.addEventListener("click", this, true ); } 29 function EventListenerImpl() { document.addEventListener("click", this, true ); }
30 EventListenerImpl.prototype.toString = function() { return "EventListenerImp l"; } 30 EventListenerImpl.prototype.toString = function() { return "EventListenerImp l"; }
31 EventListenerImpl.prototype.handleEvent = function() { console.log("click - document - handleEvent"); } 31 EventListenerImpl.prototype.handleEvent = function() { console.log("click - document - handleEvent"); }
32 new EventListenerImpl(); 32 new EventListenerImpl();
33
34 function scrollHandler(event) { console.log("scroll - window"); }
35 window.addEventListener("scroll", scrollHandler);
33 } 36 }
34 37
35 function test() 38 function test()
36 { 39 {
37 var sidebarPane = WebInspector.panels.elements.sidebarPanes.eventListeners; 40 var sidebarPane = WebInspector.panels.elements.sidebarPanes.eventListeners;
38 41
39 WebInspector.settings.eventListenersFilter.set("all"); 42 WebInspector.settings.eventListenersFilter.set("all");
40 InspectorTest.selectNodeWithId("node", step1); 43 InspectorTest.selectNodeWithId("node", step1);
41 44
42 function step1() 45 function step1()
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 <p> 79 <p>
77 Tests event listeners output in the Elements sidebar panel. 80 Tests event listeners output in the Elements sidebar panel.
78 </p> 81 </p>
79 82
80 <button id="node">Inspect Me</button> 83 <button id="node">Inspect Me</button>
81 84
82 <div id="node-without-listeners"></div> 85 <div id="node-without-listeners"></div>
83 86
84 </body> 87 </body>
85 </html> 88 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/elements/event-listener-sidebar-expected.txt » ('j') | Source/devtools/protocol.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698