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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/command-line-api-getEventListeners.html

Issue 1779033003: DevTools: always use 16bit strings for inspector protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/console-test.js"></script> 4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script> 5 <script>
6 6
7 var test = function() 7 var test = function()
8 { 8 {
9 InspectorTest.evaluateInConsole("runTestsInPage(getEventListeners)", Inspect orTest.completeTest.bind(InspectorTest)); 9 InspectorTest.evaluateInConsole("runTestsInPage(getEventListeners)", Inspect orTest.completeTest.bind(InspectorTest));
10 } 10 }
(...skipping 29 matching lines...) Expand all
40 window.addEventListener("popstate", listener1, false); 40 window.addEventListener("popstate", listener1, false);
41 41
42 function dumpObject(object, prefix) 42 function dumpObject(object, prefix)
43 { 43 {
44 if (!object) { 44 if (!object) {
45 output("FAIL: object is " + object); 45 output("FAIL: object is " + object);
46 return; 46 return;
47 } 47 }
48 prefix = prefix || ""; 48 prefix = prefix || "";
49 var keys = Object.keys(object); 49 var keys = Object.keys(object);
50 keys.sort();
50 for (var i = 0; i < keys.length; ++i) { 51 for (var i = 0; i < keys.length; ++i) {
51 var value = object[keys[i]]; 52 var value = object[keys[i]];
52 var nameWithPrefix = prefix + keys[i] + ": "; 53 var nameWithPrefix = prefix + keys[i] + ": ";
53 switch (typeof(value)) { 54 switch (typeof(value)) {
54 case "object": 55 case "object":
55 if (value === null) { 56 if (value === null) {
56 output(nameWithPrefix + "null"); 57 output(nameWithPrefix + "null");
57 break; 58 break;
58 } 59 }
59 output(nameWithPrefix + "{"); 60 output(nameWithPrefix + "{");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 output(typeof getEventListeners({})); 98 output(typeof getEventListeners({}));
98 output("- null -"); 99 output("- null -");
99 output(typeof getEventListeners(null)); 100 output(typeof getEventListeners(null));
100 output("- undefined -"); 101 output("- undefined -");
101 output(typeof getEventListeners(undefined)); 102 output(typeof getEventListeners(undefined));
102 } 103 }
103 104
104 </script> 105 </script>
105 </body> 106 </body>
106 </html> 107 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698