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

Side by Side Diff: LayoutTests/http/tests/inspector/resources/extension-main.js

Issue 971703002: DevTools: fix co-existance of multiple DevTools extensions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector/extensions/multiple-extensions.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function trimURL(url) 1 function trimURL(url)
2 { 2 {
3 if (!url) 3 if (!url)
4 return; 4 return;
5 if (/^data:/.test(url)) 5 if (/^data:/.test(url))
6 return url.replace(/,.*$/, "..."); 6 return url.replace(/,.*$/, "...");
7 return url.replace(/.*\//, ".../"); 7 return url.replace(/.*\//, ".../");
8 } 8 }
9 9
10 function dumpObject(object, nondeterministicProps, prefix, firstLinePrefix) 10 function dumpObject(object, nondeterministicProps, prefix, firstLinePrefix)
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 function runTests() 75 function runTests()
76 { 76 {
77 output("Running tests..."); 77 output("Running tests...");
78 var tests = []; 78 var tests = [];
79 for (var symbol in this) { 79 for (var symbol in this) {
80 if (/^extension_test/.test(symbol) && typeof this[symbol] === "function" ) 80 if (/^extension_test/.test(symbol) && typeof this[symbol] === "function" )
81 tests.push(symbol); 81 tests.push(symbol);
82 } 82 }
83 tests = tests.sort(); 83 tests = tests.sort();
84 var testChain = onTestsDone; 84 var testChain = extension_onTestsDone;
85 for (var test = tests.pop(); test; test = tests.pop()) 85 for (var test = tests.pop(); test; test = tests.pop())
86 testChain = bind(runTest, this, bind(this[test], this, testChain), test) ; 86 testChain = bind(runTest, this, bind(this[test], this, testChain), test) ;
87 testChain(); 87 testChain();
88 } 88 }
89 89
90 function onTestsDone() 90 function extension_onTestsDone()
91 { 91 {
92 output("All tests done."); 92 output("All tests done.");
93 evaluateOnFrontend("InspectorTest.completeTest();"); 93 evaluateOnFrontend("InspectorTest.completeTest();");
94 } 94 }
95 95
96 function runTest(test, name) 96 function runTest(test, name)
97 { 97 {
98 output("RUNNING TEST: " + name); 98 output("RUNNING TEST: " + name);
99 try { 99 try {
100 test(); 100 test();
(...skipping 10 matching lines...) Expand all
111 nextTest.call(this); 111 nextTest.call(this);
112 } 112 }
113 return callbackWrapper; 113 return callbackWrapper;
114 } 114 }
115 115
116 function bind(func, thisObject) 116 function bind(func, thisObject)
117 { 117 {
118 var args = Array.prototype.slice.call(arguments, 2); 118 var args = Array.prototype.slice.call(arguments, 2);
119 return function() { return func.apply(thisObject, args.concat(Array.prototyp e.slice.call(arguments, 0))); }; 119 return function() { return func.apply(thisObject, args.concat(Array.prototyp e.slice.call(arguments, 0))); };
120 } 120 }
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/extensions/multiple-extensions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698