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

Side by Side Diff: LayoutTests/http/tests/inspector/extensions-test.js

Issue 6282016: Merge 76683 - 2011-01-26 Pavel Feldman <pfeldman@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 11 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/http/tests/inspector/inspector-test2.js » ('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 log(message) 1 function log(message)
2 { 2 {
3 output(message); 3 output(message);
4 } 4 }
5 5
6 function extensionFunctions() 6 function extensionFunctions()
7 { 7 {
8 var functions = ""; 8 var functions = "";
9 9
10 for (symbol in window) { 10 for (symbol in window) {
(...skipping 16 matching lines...) Expand all
27 window.removeEventListener("message", onMessage, false); 27 window.removeEventListener("message", onMessage, false);
28 var port = event.ports && event.ports[0]; 28 var port = event.ports && event.ports[0];
29 if (callback(event.data, port) && port) 29 if (callback(event.data, port) && port)
30 port.postMessage(""); 30 port.postMessage("");
31 } 31 }
32 window.addEventListener("message", onMessage, false); 32 window.addEventListener("message", onMessage, false);
33 } 33 }
34 34
35 InspectorTest.runExtensionTests = function() 35 InspectorTest.runExtensionTests = function()
36 { 36 {
37 InspectorBackend.evaluate("location.href", "console", function(result) { 37 InspectorBackend.evaluate("location.href", "console", false, function(result ) {
38 var pageURL = result.description; 38 var pageURL = result.description;
39 var extensionURL = (/^https?:/.test(pageURL) ? 39 var extensionURL = (/^https?:/.test(pageURL) ?
40 pageURL.replace(/^(https?:\/\/[^/]*\/).*$/,"$1") : 40 pageURL.replace(/^(https?:\/\/[^/]*\/).*$/,"$1") :
41 pageURL.replace(/\/inspector\/[^/]*$/, "/http/tests")) + 41 pageURL.replace(/\/inspector\/[^/]*$/, "/http/tests")) +
42 "/inspector/resources/extension-main.html"; 42 "/inspector/resources/extension-main.html";
43 WebInspector.addExtensions([{ startPage: extensionURL }]); 43 WebInspector.addExtensions([{ startPage: extensionURL }]);
44 }); 44 });
45 } 45 }
46 46
47 InspectorTest.dispatchOnMessage("extension-tests-done", InspectorTest.completeTe st, true); 47 InspectorTest.dispatchOnMessage("extension-tests-done", InspectorTest.completeTe st, true);
(...skipping 23 matching lines...) Expand all
71 }); 71 });
72 } 72 }
73 InspectorTest.dispatchOnMessage("reload", reloadPage, true); 73 InspectorTest.dispatchOnMessage("reload", reloadPage, true);
74 74
75 } 75 }
76 76
77 var test = function() 77 var test = function()
78 { 78 {
79 InspectorTest.runExtensionTests(); 79 InspectorTest.runExtensionTests();
80 } 80 }
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/inspector-test2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698