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

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

Issue 460323002: DevTools: Allow dynamic module registration only in tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/http/tests/inspector/layers-test.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 var initialize_InspectorTest = function() { 1 var initialize_InspectorTest = function() {
2 2
3 var results = []; 3 var results = [];
4 var resultsSynchronized = false; 4 var resultsSynchronized = false;
5 5
6 function consoleOutputHook(messageType) 6 function consoleOutputHook(messageType)
7 { 7 {
8 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1)); 8 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1));
9 } 9 }
10 10
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 else 233 else
234 InspectorTest.addResult(prefixWithName + value); 234 InspectorTest.addResult(prefixWithName + value);
235 } 235 }
236 236
237 InspectorTest.assertGreaterOrEqual = function(a, b, message) 237 InspectorTest.assertGreaterOrEqual = function(a, b, message)
238 { 238 {
239 if (a < b) 239 if (a < b)
240 InspectorTest.addResult("FAILED: " + (message ? message + ": " : "") + a + " < " + b); 240 InspectorTest.addResult("FAILED: " + (message ? message + ": " : "") + a + " < " + b);
241 } 241 }
242 242
243 InspectorTest.registerModule = function(moduleName, loadImmediately)
244 {
245 runtime._registerModule(moduleName);
246 if (loadImmediately)
247 runtime.loadModule(moduleName);
248 }
249
243 InspectorTest.navigate = function(url, callback) 250 InspectorTest.navigate = function(url, callback)
244 { 251 {
245 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback); 252 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback);
246 253
247 WebInspector.inspectorView.panel("network")._reset(); 254 WebInspector.inspectorView.panel("network")._reset();
248 InspectorTest.evaluateInConsole("window.location = '" + url + "'"); 255 InspectorTest.evaluateInConsole("window.location = '" + url + "'");
249 } 256 }
250 257
251 InspectorTest.recordNetwork = function() 258 InspectorTest.recordNetwork = function()
252 { 259 {
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 evaluateInWebInspector: function(callId, script) 845 evaluateInWebInspector: function(callId, script)
839 { 846 {
840 window.opener.postMessage(["evaluateInWebInspector", callId, script], "* "); 847 window.opener.postMessage(["evaluateInWebInspector", callId, script], "* ");
841 }, 848 },
842 849
843 display: function() { } 850 display: function() { }
844 } 851 }
845 852
846 if (!window.testRunner && window.opener) 853 if (!window.testRunner && window.opener)
847 window.testRunner = new StandaloneTestRunnerStub(); 854 window.testRunner = new StandaloneTestRunnerStub();
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/layers-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698