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

Side by Side Diff: LayoutTests/inspector/domdebugger/domdebugger-getEventListeners.html

Issue 1319613002: [DevTools] Refactor WebInspector.EventListener (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/inspector/domdebugger/domdebugger-getEventListeners-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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> 4 <script>
5 function test() 5 function test()
6 { 6 {
7 var windowObject; 7 var windowObject;
8 var divWithHandlers; 8 var divWithHandlers;
9 var divWithoutHandlers; 9 var divWithoutHandlers;
10 10
11 function dumpListeners(next, listeners) 11 function dumpListeners(next, listeners)
12 { 12 {
13 for (var i = 0; i < listeners.length; ++i) { 13 for (var i = 0; i < listeners.length; ++i) {
14 delete listeners[i]._location.scriptId; 14 delete listeners[i]._location.scriptId;
15 var sourceName = listeners[i]._sourceName; 15 var sourceURL = listeners[i]._sourceURL;
16 sourceName = sourceName.substr(sourceName.lastIndexOf('/') + 1); 16 sourceURL = sourceURL.substr(sourceURL.lastIndexOf('/') + 1);
17 listeners[i]._sourceName = sourceName; 17 listeners[i]._sourceURL = sourceURL;
18 18
19 InspectorTest.addResult("type: " + listeners[i].type()); 19 InspectorTest.addResult("type: " + listeners[i].type());
20 InspectorTest.addResult("useCapture: " + listeners[i].useCapture()); 20 InspectorTest.addResult("useCapture: " + listeners[i].useCapture());
21 InspectorTest.addResult("location: " + listeners[i].location().colum nNumber + ", " + listeners[i].location().lineNumber); 21 InspectorTest.addResult("location: " + listeners[i].location().colum nNumber + ", " + listeners[i].location().lineNumber);
22 InspectorTest.addResult("handler: " + listeners[i].handler().descrip tion); 22 InspectorTest.addResult("handler: " + listeners[i].handler().descrip tion);
23 InspectorTest.addResult("sourceName: " + listeners[i].sourceName()); 23 InspectorTest.addResult("sourceURL: " + listeners[i].sourceURL());
24 InspectorTest.addResult(""); 24 InspectorTest.addResult("");
25 } 25 }
26 next(); 26 next();
27 } 27 }
28 28
29 InspectorTest.runTestSuite([ 29 InspectorTest.runTestSuite([
30 function testSetUp(next) 30 function testSetUp(next)
31 { 31 {
32 InspectorTest.RuntimeAgent.evaluate("window", "get-event-listeners-t est", step1); 32 InspectorTest.RuntimeAgent.evaluate("window", "get-event-listeners-t est", step1);
33 33
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 <script> 78 <script>
79 function foo() {} 79 function foo() {}
80 function boo() {} 80 function boo() {}
81 window.addEventListener("scroll", foo, true); 81 window.addEventListener("scroll", foo, true);
82 document.getElementById("with-handlers").addEventListener("click", boo, true ); 82 document.getElementById("with-handlers").addEventListener("click", boo, true );
83 document.getElementById("with-handlers").addEventListener("mouseout", foo, f alse); 83 document.getElementById("with-handlers").addEventListener("mouseout", foo, f alse);
84 runTest(); 84 runTest();
85 </script> 85 </script>
86 </body> 86 </body>
87 </html> 87 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/domdebugger/domdebugger-getEventListeners-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698