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

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

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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 if (window.GCController) 1 if (window.GCController)
2 GCController.collectAll(); 2 GCController.collectAll();
3 var initialize_InspectorTest = function() { 3 var initialize_InspectorTest = function() {
4 4
5 var results = []; 5 var results = [];
6 6
7 function consoleOutputHook(messageType) 7 function consoleOutputHook(messageType)
8 { 8 {
9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1)); 9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1));
10 } 10 }
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 for (var i = 0; i < treeElement.childCount(); ++i) { 314 for (var i = 0; i < treeElement.childCount(); ++i) {
315 var property = treeElement.childAt(i).property; 315 var property = treeElement.childAt(i).property;
316 var key = property.name; 316 var key = property.name;
317 var value = property.value._description; 317 var value = property.value._description;
318 InspectorTest.addResult(" " + key + ": " + value); 318 InspectorTest.addResult(" " + key + ": " + value);
319 } 319 }
320 } 320 }
321 321
322 InspectorTest.expandAndDumpEventListeners = function(eventListenersView, callbac k) 322 InspectorTest.expandAndDumpEventListeners = function(eventListenersView, callbac k)
323 { 323 {
324 InspectorTest.addSniffer(WebInspector.EventListenersView.prototype, "_eventL istenersArrivedForTest", listenersArrived); 324 InspectorTest.addSniffer(Components.EventListenersView.prototype, "_eventLis tenersArrivedForTest", listenersArrived);
325 325
326 function listenersArrived() 326 function listenersArrived()
327 { 327 {
328 var listenerTypes = eventListenersView._treeOutline.rootElement().childr en(); 328 var listenerTypes = eventListenersView._treeOutline.rootElement().childr en();
329 for (var i = 0; i < listenerTypes.length; ++i) { 329 for (var i = 0; i < listenerTypes.length; ++i) {
330 listenerTypes[i].expand(); 330 listenerTypes[i].expand();
331 var listenerItems = listenerTypes[i].children(); 331 var listenerItems = listenerTypes[i].children();
332 for (var j = 0; j < listenerItems.length; ++j) 332 for (var j = 0; j < listenerItems.length; ++j)
333 listenerItems[j].expand(); 333 listenerItems[j].expand();
334 } 334 }
(...skipping 23 matching lines...) Expand all
358 { 358 {
359 dumpNavigatorTreeOutline(navigatorView._scriptsTree); 359 dumpNavigatorTreeOutline(navigatorView._scriptsTree);
360 360
361 function dumpNavigatorTreeElement(prefix, treeElement) 361 function dumpNavigatorTreeElement(prefix, treeElement)
362 { 362 {
363 var titleText; 363 var titleText;
364 if (treeElement.title instanceof Element) 364 if (treeElement.title instanceof Element)
365 titleText = treeElement.title.firstChild.textContent + " [mapped]"; 365 titleText = treeElement.title.firstChild.textContent + " [mapped]";
366 else 366 else
367 titleText = treeElement.title; 367 titleText = treeElement.title;
368 if (treeElement._nodeType === WebInspector.NavigatorView.Types.FileSyste m || treeElement._nodeType === WebInspector.NavigatorView.Types.FileSystemFolder ) { 368 if (treeElement._nodeType === Sources.NavigatorView.Types.FileSystem || treeElement._nodeType === Sources.NavigatorView.Types.FileSystemFolder) {
369 var hasMappedFiles = treeElement.listItemElement.classList.contains( "has-mapped-files"); 369 var hasMappedFiles = treeElement.listItemElement.classList.contains( "has-mapped-files");
370 if (!hasMappedFiles) 370 if (!hasMappedFiles)
371 titleText += " [dimmed]"; 371 titleText += " [dimmed]";
372 } 372 }
373 InspectorTest.addResult(prefix + titleText); 373 InspectorTest.addResult(prefix + titleText);
374 treeElement.expand(); 374 treeElement.expand();
375 var children = treeElement.children(); 375 var children = treeElement.children();
376 for (var i = 0; i < children.length; ++i) 376 for (var i = 0; i < children.length; ++i)
377 dumpNavigatorTreeElement(prefix + " ", children[i]); 377 dumpNavigatorTreeElement(prefix + " ", children[i]);
378 } 378 }
379 379
380 function dumpNavigatorTreeOutline(treeOutline) 380 function dumpNavigatorTreeOutline(treeOutline)
381 { 381 {
382 var children = treeOutline.rootElement().children(); 382 var children = treeOutline.rootElement().children();
383 for (var i = 0; i < children.length; ++i) 383 for (var i = 0; i < children.length; ++i)
384 dumpNavigatorTreeElement("", children[i]); 384 dumpNavigatorTreeElement("", children[i]);
385 } 385 }
386 } 386 }
387 387
388 InspectorTest.dumpNavigatorViewInAllModes = function(view) 388 InspectorTest.dumpNavigatorViewInAllModes = function(view)
389 { 389 {
390 ["frame", "frame/domain", "frame/domain/folder", "domain", "domain/folder"]. forEach(InspectorTest.dumpNavigatorViewInMode.bind(InspectorTest, view)); 390 ["frame", "frame/domain", "frame/domain/folder", "domain", "domain/folder"]. forEach(InspectorTest.dumpNavigatorViewInMode.bind(InspectorTest, view));
391 } 391 }
392 392
393 InspectorTest.dumpNavigatorViewInMode = function(view, mode) 393 InspectorTest.dumpNavigatorViewInMode = function(view, mode)
394 { 394 {
395 InspectorTest.addResult(view instanceof WebInspector.SourcesNavigatorView ? "Sources:" : "Content Scripts:"); 395 InspectorTest.addResult(view instanceof Sources.SourcesNavigatorView ? "Sour ces:" : "Content Scripts:");
396 view._groupByFrame = mode.includes("frame"); 396 view._groupByFrame = mode.includes("frame");
397 view._groupByDomain = mode.includes("domain"); 397 view._groupByDomain = mode.includes("domain");
398 view._groupByFolder = mode.includes("folder"); 398 view._groupByFolder = mode.includes("folder");
399 view._resetForTest(); 399 view._resetForTest();
400 InspectorTest.addResult("-------- Setting mode: [" + mode + "]"); 400 InspectorTest.addResult("-------- Setting mode: [" + mode + "]");
401 InspectorTest.dumpNavigatorView(view); 401 InspectorTest.dumpNavigatorView(view);
402 } 402 }
403 403
404 InspectorTest.assertGreaterOrEqual = function(a, b, message) 404 InspectorTest.assertGreaterOrEqual = function(a, b, message)
405 { 405 {
(...skipping 14 matching lines...) Expand all
420 420
421 InspectorTest.reloadPage = function(callback, scriptToEvaluateOnLoad, scriptPrep rocessor) 421 InspectorTest.reloadPage = function(callback, scriptToEvaluateOnLoad, scriptPrep rocessor)
422 { 422 {
423 InspectorTest._innerReloadPage(false, callback, scriptToEvaluateOnLoad, scri ptPreprocessor); 423 InspectorTest._innerReloadPage(false, callback, scriptToEvaluateOnLoad, scri ptPreprocessor);
424 } 424 }
425 425
426 InspectorTest._innerReloadPage = function(hardReload, callback, scriptToEvaluate OnLoad, scriptPreprocessor) 426 InspectorTest._innerReloadPage = function(hardReload, callback, scriptToEvaluate OnLoad, scriptPreprocessor)
427 { 427 {
428 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback); 428 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback);
429 429
430 if (WebInspector.panels.network) 430 if (UI.panels.network)
431 WebInspector.panels.network._networkLogView.reset(); 431 UI.panels.network._networkLogView.reset();
432 InspectorTest.PageAgent.reload(hardReload, scriptToEvaluateOnLoad, scriptPre processor); 432 InspectorTest.PageAgent.reload(hardReload, scriptToEvaluateOnLoad, scriptPre processor);
433 } 433 }
434 434
435 InspectorTest.pageLoaded = function() 435 InspectorTest.pageLoaded = function()
436 { 436 {
437 InspectorTest.addResult("Page reloaded."); 437 InspectorTest.addResult("Page reloaded.");
438 if (InspectorTest._pageLoadedCallback) { 438 if (InspectorTest._pageLoadedCallback) {
439 var callback = InspectorTest._pageLoadedCallback; 439 var callback = InspectorTest._pageLoadedCallback;
440 delete InspectorTest._pageLoadedCallback; 440 delete InspectorTest._pageLoadedCallback;
441 callback(); 441 callback();
442 } 442 }
443 } 443 }
444 444
445 InspectorTest.runWhenPageLoads = function(callback) 445 InspectorTest.runWhenPageLoads = function(callback)
446 { 446 {
447 var oldCallback = InspectorTest._pageLoadedCallback; 447 var oldCallback = InspectorTest._pageLoadedCallback;
448 function chainedCallback() 448 function chainedCallback()
449 { 449 {
450 if (oldCallback) 450 if (oldCallback)
451 oldCallback(); 451 oldCallback();
452 callback(); 452 callback();
453 } 453 }
454 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(chainedCallback); 454 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(chainedCallback);
455 } 455 }
456 456
457 InspectorTest.deprecatedRunAfterPendingDispatches = function(callback) 457 InspectorTest.deprecatedRunAfterPendingDispatches = function(callback)
458 { 458 {
459 var barrier = new CallbackBarrier(); 459 var barrier = new CallbackBarrier();
460 var targets = WebInspector.targetManager.targets(); 460 var targets = SDK.targetManager.targets();
461 for (var i = 0; i < targets.length; ++i) 461 for (var i = 0; i < targets.length; ++i)
462 targets[i]._deprecatedRunAfterPendingDispatches(barrier.createCallback() ); 462 targets[i]._deprecatedRunAfterPendingDispatches(barrier.createCallback() );
463 barrier.callWhenDone(InspectorTest.safeWrap(callback)); 463 barrier.callWhenDone(InspectorTest.safeWrap(callback));
464 } 464 }
465 465
466 InspectorTest.createKeyEvent = function(key, ctrlKey, altKey, shiftKey, metaKey) 466 InspectorTest.createKeyEvent = function(key, ctrlKey, altKey, shiftKey, metaKey)
467 { 467 {
468 return new KeyboardEvent("keydown", {key: key, bubbles: true, cancelable: tr ue, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey, metaKey: metaKey}); 468 return new KeyboardEvent("keydown", {key: key, bubbles: true, cancelable: tr ue, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey, metaKey: metaKey});
469 } 469 }
470 470
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 } catch (e) { 589 } catch (e) {
590 reject("Exception in overriden method '" + methodName + "': " + e); 590 reject("Exception in overriden method '" + methodName + "': " + e);
591 } 591 }
592 return result; 592 return result;
593 }; 593 };
594 }); 594 });
595 } 595 }
596 596
597 InspectorTest.addConsoleSniffer = function(override, opt_sticky) 597 InspectorTest.addConsoleSniffer = function(override, opt_sticky)
598 { 598 {
599 InspectorTest.addSniffer(WebInspector.ConsoleModel.prototype, "addMessage", override, opt_sticky); 599 InspectorTest.addSniffer(SDK.ConsoleModel.prototype, "addMessage", override, opt_sticky);
600 } 600 }
601 601
602 InspectorTest.override = function(receiver, methodName, override, opt_sticky) 602 InspectorTest.override = function(receiver, methodName, override, opt_sticky)
603 { 603 {
604 override = InspectorTest.safeWrap(override); 604 override = InspectorTest.safeWrap(override);
605 605
606 var original = receiver[methodName]; 606 var original = receiver[methodName];
607 if (typeof original !== "function") 607 if (typeof original !== "function")
608 throw ("Cannot find method to override: " + methodName); 608 throw ("Cannot find method to override: " + methodName);
609 609
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 InspectorTest.clearSpecificInfoFromStackFrames = function(text) 674 InspectorTest.clearSpecificInfoFromStackFrames = function(text)
675 { 675 {
676 var buffer = text.replace(/\(file:\/\/\/(?:[^)]+\)|[\w\/:-]+)/g, "(...)"); 676 var buffer = text.replace(/\(file:\/\/\/(?:[^)]+\)|[\w\/:-]+)/g, "(...)");
677 buffer = buffer.replace(/\(<anonymous>:[^)]+\)/g, "(...)"); 677 buffer = buffer.replace(/\(<anonymous>:[^)]+\)/g, "(...)");
678 buffer = buffer.replace(/VM\d+/g, "VM"); 678 buffer = buffer.replace(/VM\d+/g, "VM");
679 return buffer.replace(/\s*at[^()]+\(native\)/g, ""); 679 return buffer.replace(/\s*at[^()]+\(native\)/g, "");
680 } 680 }
681 681
682 InspectorTest.hideInspectorView = function() 682 InspectorTest.hideInspectorView = function()
683 { 683 {
684 WebInspector.inspectorView.element.setAttribute("style", "display:none !impo rtant"); 684 UI.inspectorView.element.setAttribute("style", "display:none !important");
685 } 685 }
686 686
687 InspectorTest.mainFrame = function() 687 InspectorTest.mainFrame = function()
688 { 688 {
689 return WebInspector.ResourceTreeModel.fromTarget(InspectorTest.mainTarget).m ainFrame; 689 return SDK.ResourceTreeModel.fromTarget(InspectorTest.mainTarget).mainFrame;
690 } 690 }
691 691
692 InspectorTest.StringOutputStream = function(callback) 692 InspectorTest.StringOutputStream = function(callback)
693 { 693 {
694 this._callback = callback; 694 this._callback = callback;
695 this._buffer = ""; 695 this._buffer = "";
696 }; 696 };
697 697
698 InspectorTest.StringOutputStream.prototype = { 698 InspectorTest.StringOutputStream.prototype = {
699 open: function(fileName, callback) 699 open: function(fileName, callback)
(...skipping 27 matching lines...) Expand all
727 set: function(value) { 727 set: function(value) {
728 this._value = value; 728 this._value = value;
729 } 729 }
730 }; 730 };
731 731
732 732
733 /** 733 /**
734 * @constructor 734 * @constructor
735 * @param {!string} dirPath 735 * @param {!string} dirPath
736 * @param {!string} name 736 * @param {!string} name
737 * @param {!function(?WebInspector.TempFile)} callback 737 * @param {!function(?Bindings.TempFile)} callback
738 */ 738 */
739 InspectorTest.TempFileMock = function(dirPath, name) 739 InspectorTest.TempFileMock = function(dirPath, name)
740 { 740 {
741 this._chunks = []; 741 this._chunks = [];
742 this._name = name; 742 this._name = name;
743 } 743 }
744 744
745 InspectorTest.TempFileMock.prototype = { 745 InspectorTest.TempFileMock.prototype = {
746 /** 746 /**
747 * @param {!Array.<string>} chunks 747 * @param {!Array.<string>} chunks
(...skipping 30 matching lines...) Expand all
778 reader = new FileReader(); 778 reader = new FileReader();
779 var self = this; 779 var self = this;
780 reader.onloadend = function() 780 reader.onloadend = function()
781 { 781 {
782 callback(reader.result); 782 callback(reader.result);
783 } 783 }
784 reader.readAsText(blob); 784 reader.readAsText(blob);
785 }, 785 },
786 786
787 /** 787 /**
788 * @param {!WebInspector.OutputStream} outputStream 788 * @param {!Common.OutputStream} outputStream
789 * @param {!WebInspector.OutputStreamDelegate} delegate 789 * @param {!Bindings.OutputStreamDelegate} delegate
790 */ 790 */
791 copyToOutputStream: function(outputStream, delegate) 791 copyToOutputStream: function(outputStream, delegate)
792 { 792 {
793 var name = this._name; 793 var name = this._name;
794 var text = this._chunks.join(""); 794 var text = this._chunks.join("");
795 var chunkedReaderMock = { 795 var chunkedReaderMock = {
796 loadedSize: function() 796 loadedSize: function()
797 { 797 {
798 return text.length; 798 return text.length;
799 }, 799 },
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 873
874 fireAllTimers: function() 874 fireAllTimers: function()
875 { 875 {
876 for (var timeoutId in this._timeoutIdToProcess) 876 for (var timeoutId in this._timeoutIdToProcess)
877 this._timeoutIdToProcess[timeoutId].call(window); 877 this._timeoutIdToProcess[timeoutId].call(window);
878 this._timeoutIdToProcess = {}; 878 this._timeoutIdToProcess = {};
879 this._timeoutIdToMillis = {}; 879 this._timeoutIdToMillis = {};
880 } 880 }
881 } 881 }
882 882
883 WebInspector.targetManager.observeTargets({ 883 SDK.targetManager.observeTargets({
884 targetAdded: function(target) 884 targetAdded: function(target)
885 { 885 {
886 if (InspectorTest.CSSAgent) 886 if (InspectorTest.CSSAgent)
887 return; 887 return;
888 InspectorTest.CSSAgent = target.cssAgent(); 888 InspectorTest.CSSAgent = target.cssAgent();
889 InspectorTest.DeviceOrientationAgent = target.deviceOrientationAgent(); 889 InspectorTest.DeviceOrientationAgent = target.deviceOrientationAgent();
890 InspectorTest.DOMAgent = target.domAgent(); 890 InspectorTest.DOMAgent = target.domAgent();
891 InspectorTest.DOMDebuggerAgent = target.domdebuggerAgent(); 891 InspectorTest.DOMDebuggerAgent = target.domdebuggerAgent();
892 InspectorTest.DebuggerAgent = target.debuggerAgent(); 892 InspectorTest.DebuggerAgent = target.debuggerAgent();
893 InspectorTest.EmulationAgent = target.emulationAgent(); 893 InspectorTest.EmulationAgent = target.emulationAgent();
894 InspectorTest.HeapProfilerAgent = target.heapProfilerAgent(); 894 InspectorTest.HeapProfilerAgent = target.heapProfilerAgent();
895 InspectorTest.InspectorAgent = target.inspectorAgent(); 895 InspectorTest.InspectorAgent = target.inspectorAgent();
896 InspectorTest.NetworkAgent = target.networkAgent(); 896 InspectorTest.NetworkAgent = target.networkAgent();
897 InspectorTest.PageAgent = target.pageAgent(); 897 InspectorTest.PageAgent = target.pageAgent();
898 InspectorTest.ProfilerAgent = target.profilerAgent(); 898 InspectorTest.ProfilerAgent = target.profilerAgent();
899 InspectorTest.RuntimeAgent = target.runtimeAgent(); 899 InspectorTest.RuntimeAgent = target.runtimeAgent();
900 InspectorTest.TargetAgent = target.targetAgent(); 900 InspectorTest.TargetAgent = target.targetAgent();
901 901
902 InspectorTest.consoleModel = target.consoleModel; 902 InspectorTest.consoleModel = target.consoleModel;
903 InspectorTest.networkManager = WebInspector.NetworkManager.fromTarget(ta rget); 903 InspectorTest.networkManager = SDK.NetworkManager.fromTarget(target);
904 InspectorTest.securityOriginManager = WebInspector.SecurityOriginManager .fromTarget(target); 904 InspectorTest.securityOriginManager = SDK.SecurityOriginManager.fromTarg et(target);
905 InspectorTest.resourceTreeModel = WebInspector.ResourceTreeModel.fromTar get(target); 905 InspectorTest.resourceTreeModel = SDK.ResourceTreeModel.fromTarget(targe t);
906 InspectorTest.networkLog = WebInspector.NetworkLog.fromTarget(target); 906 InspectorTest.networkLog = SDK.NetworkLog.fromTarget(target);
907 InspectorTest.debuggerModel = WebInspector.DebuggerModel.fromTarget(targ et); 907 InspectorTest.debuggerModel = SDK.DebuggerModel.fromTarget(target);
908 InspectorTest.runtimeModel = target.runtimeModel; 908 InspectorTest.runtimeModel = target.runtimeModel;
909 InspectorTest.domModel = WebInspector.DOMModel.fromTarget(target); 909 InspectorTest.domModel = SDK.DOMModel.fromTarget(target);
910 InspectorTest.cssModel = WebInspector.CSSModel.fromTarget(target); 910 InspectorTest.cssModel = SDK.CSSModel.fromTarget(target);
911 InspectorTest.powerProfiler = target.powerProfiler; 911 InspectorTest.powerProfiler = target.powerProfiler;
912 InspectorTest.cpuProfilerModel = target.cpuProfilerModel; 912 InspectorTest.cpuProfilerModel = target.cpuProfilerModel;
913 InspectorTest.heapProfilerModel = target.heapProfilerModel; 913 InspectorTest.heapProfilerModel = target.heapProfilerModel;
914 InspectorTest.animationModel = target.animationModel; 914 InspectorTest.animationModel = target.animationModel;
915 InspectorTest.serviceWorkerCacheModel = target.serviceWorkerCacheModel; 915 InspectorTest.serviceWorkerCacheModel = target.serviceWorkerCacheModel;
916 InspectorTest.serviceWorkerManager = target.serviceWorkerManager; 916 InspectorTest.serviceWorkerManager = target.serviceWorkerManager;
917 InspectorTest.tracingManager = target.tracingManager; 917 InspectorTest.tracingManager = target.tracingManager;
918 InspectorTest.mainTarget = target; 918 InspectorTest.mainTarget = target;
919 }, 919 },
920 920
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 1036
1037 // 1. Preload panels. 1037 // 1. Preload panels.
1038 var lastLoadedPanel; 1038 var lastLoadedPanel;
1039 1039
1040 var promises = []; 1040 var promises = [];
1041 for (var moduleName of InspectorTest._modulesToPreload) 1041 for (var moduleName of InspectorTest._modulesToPreload)
1042 promises.push(self.runtime.loadModulePromise(moduleName)); 1042 promises.push(self.runtime.loadModulePromise(moduleName));
1043 1043
1044 for (var i = 0; i < InspectorTest._panelsToPreload.length; ++i) { 1044 for (var i = 0; i < InspectorTest._panelsToPreload.length; ++i) {
1045 lastLoadedPanel = InspectorTest._panelsToPreload[i]; 1045 lastLoadedPanel = InspectorTest._panelsToPreload[i];
1046 promises.push(WebInspector.inspectorView.panel(lastLoadedPanel)); 1046 promises.push(UI.inspectorView.panel(lastLoadedPanel));
1047 } 1047 }
1048 1048
1049 var testPath = WebInspector.settings.createSetting("testPath", "").get() ; 1049 var testPath = Common.settings.createSetting("testPath", "").get();
1050 1050
1051 // 2. Show initial panel based on test path. 1051 // 2. Show initial panel based on test path.
1052 var initialPanelByFolder = { 1052 var initialPanelByFolder = {
1053 "animation": "elements", 1053 "animation": "elements",
1054 "audits": "audits", 1054 "audits": "audits",
1055 "console": "console", 1055 "console": "console",
1056 "elements": "elements", 1056 "elements": "elements",
1057 "editor": "sources", 1057 "editor": "sources",
1058 "layers": "layers", 1058 "layers": "layers",
1059 "network": "network", 1059 "network": "network",
1060 "profiler": "profiles", 1060 "profiler": "profiles",
1061 "resource-tree": "resources", 1061 "resource-tree": "resources",
1062 "search": "sources", 1062 "search": "sources",
1063 "security": "security", 1063 "security": "security",
1064 "service-workers": "resources", 1064 "service-workers": "resources",
1065 "sources": "sources", 1065 "sources": "sources",
1066 "timeline": "timeline", 1066 "timeline": "timeline",
1067 "tracing": "timeline", 1067 "tracing": "timeline",
1068 } 1068 }
1069 var initialPanelShown = false; 1069 var initialPanelShown = false;
1070 for (var folder in initialPanelByFolder) { 1070 for (var folder in initialPanelByFolder) {
1071 if (testPath.indexOf(folder + "/") !== -1) { 1071 if (testPath.indexOf(folder + "/") !== -1) {
1072 lastLoadedPanel = initialPanelByFolder[folder]; 1072 lastLoadedPanel = initialPanelByFolder[folder];
1073 promises.push(WebInspector.inspectorView.panel(lastLoadedPanel)) ; 1073 promises.push(UI.inspectorView.panel(lastLoadedPanel));
1074 break; 1074 break;
1075 } 1075 }
1076 } 1076 }
1077 1077
1078 // 3. Run test function. 1078 // 3. Run test function.
1079 Promise.all(promises).then(() => { 1079 Promise.all(promises).then(() => {
1080 if (lastLoadedPanel) 1080 if (lastLoadedPanel)
1081 WebInspector.inspectorView.showPanel(lastLoadedPanel).then(testF unction); 1081 UI.inspectorView.showPanel(lastLoadedPanel).then(testFunction);
1082 else 1082 else
1083 testFunction(); 1083 testFunction();
1084 }).catch(function(e) { 1084 }).catch(function(e) {
1085 console.error(e); 1085 console.error(e);
1086 InspectorTest.completeTest(); 1086 InspectorTest.completeTest();
1087 }); 1087 });
1088 } 1088 }
1089 1089
1090 var initializationFunctions = [ String(initialize_InspectorTest) ]; 1090 var initializationFunctions = [ String(initialize_InspectorTest) ];
1091 for (var name in window) { 1091 for (var name in window) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 _output("[page] " + text); 1162 _output("[page] " + text);
1163 } 1163 }
1164 1164
1165 function _output(result) 1165 function _output(result)
1166 { 1166 {
1167 if (!outputElement) 1167 if (!outputElement)
1168 createOutputElement(); 1168 createOutputElement();
1169 outputElement.appendChild(document.createTextNode(result)); 1169 outputElement.appendChild(document.createTextNode(result));
1170 outputElement.appendChild(document.createElement("br")); 1170 outputElement.appendChild(document.createElement("br"));
1171 } 1171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698