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

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

Issue 2080173003: DevTools: pass theme name to the extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test rebaselined Created 4 years, 5 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 function extensionFunctions() 1 function extensionFunctions()
2 { 2 {
3 var functions = ""; 3 var functions = "";
4 4
5 for (symbol in window) { 5 for (symbol in window) {
6 if (/^extension_/.exec(symbol) && typeof window[symbol] === "function") 6 if (/^extension_/.exec(symbol) && typeof window[symbol] === "function")
7 functions += window[symbol].toString(); 7 functions += window[symbol].toString();
8 } 8 }
9 return functions; 9 return functions;
10 } 10 }
11 11
12 var initialize_ExtensionsTest = function() 12 var initialize_ExtensionsTest = function()
13 { 13 {
14 14
15 WebInspector.extensionServer._overridePlatformExtensionAPIForTest = function(ext ensionInfo, inspectedTabId) 15 WebInspector.extensionServer._overridePlatformExtensionAPIForTest = function(ext ensionInfo, inspectedTabId, themeName)
16 { 16 {
17 WebInspector.extensionServer._registerHandler("evaluateForTestInFrontEnd", o nEvaluate); 17 WebInspector.extensionServer._registerHandler("evaluateForTestInFrontEnd", o nEvaluate);
18 18
19 function platformExtensionAPI(coreAPI) 19 function platformExtensionAPI(coreAPI)
20 { 20 {
21 window.webInspector = coreAPI; 21 window.webInspector = coreAPI;
22 window._extensionServerForTests = extensionServer; 22 window._extensionServerForTests = extensionServer;
23 coreAPI.panels.themeName = "themeNameForTest";
23 } 24 }
24 return platformExtensionAPI.toString(); 25 return platformExtensionAPI.toString();
25 } 26 }
26 27
27 InspectorTest._replyToExtension = function(requestId, port) 28 InspectorTest._replyToExtension = function(requestId, port)
28 { 29 {
29 WebInspector.extensionServer._dispatchCallback(requestId, port); 30 WebInspector.extensionServer._dispatchCallback(requestId, port);
30 } 31 }
31 32
32 function onEvaluate(message, port) 33 function onEvaluate(message, port)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 71
71 function extension_showPanel(panelId, callback) 72 function extension_showPanel(panelId, callback)
72 { 73 {
73 evaluateOnFrontend("InspectorTest.showPanel(unescape('" + escape(panelId) + "')).then(function() { reply(); });", callback); 74 evaluateOnFrontend("InspectorTest.showPanel(unescape('" + escape(panelId) + "')).then(function() { reply(); });", callback);
74 } 75 }
75 76
76 var test = function() 77 var test = function()
77 { 78 {
78 InspectorTest.runExtensionTests(); 79 InspectorTest.runExtensionTests();
79 } 80 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698