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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/Tests.js

Issue 2916743002: [DevTools] Introduce Common.List used as a backend for list controls (Closed)
Patch Set: addressed comments Created 3 years, 6 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 this.fail(text); 840 this.fail(text);
841 }; 841 };
842 842
843 TestSuite.prototype.testConsoleContextNames = function() { 843 TestSuite.prototype.testConsoleContextNames = function() {
844 var test = this; 844 var test = this;
845 test.takeControl(); 845 test.takeControl();
846 this.showPanel('console').then(() => this._waitForExecutionContexts(2, onExe cutionContexts.bind(this))); 846 this.showPanel('console').then(() => this._waitForExecutionContexts(2, onExe cutionContexts.bind(this)));
847 847
848 function onExecutionContexts() { 848 function onExecutionContexts() {
849 var consoleView = Console.ConsoleView.instance(); 849 var consoleView = Console.ConsoleView.instance();
850 var items = consoleView._consoleContextSelector._list._items; 850 var items = consoleView._consoleContextSelector._items;
851 var values = []; 851 var values = [];
852 for (var i = 0; i < items.length; ++i) 852 for (var i = 0; i < items.length(); ++i)
853 values.push(consoleView._consoleContextSelector._titleFor(items[i])); 853 values.push(consoleView._consoleContextSelector._titleFor(items.itemAtIn dex(i)));
854 test.assertEquals('top', values[0]); 854 test.assertEquals('top', values[0]);
855 test.assertEquals('Simple content script', values[1]); 855 test.assertEquals('Simple content script', values[1]);
856 test.releaseControl(); 856 test.releaseControl();
857 } 857 }
858 }; 858 };
859 859
860 TestSuite.prototype.testDevToolsSharedWorker = function() { 860 TestSuite.prototype.testDevToolsSharedWorker = function() {
861 this.takeControl(); 861 this.takeControl();
862 Bindings.TempFile.ensureTempStorageCleared().then(() => this.releaseControl( )); 862 Bindings.TempFile.ensureTempStorageCleared().then(() => this.releaseControl( ));
863 }; 863 };
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 if (runtimeModel.executionContexts().length >= n) 1100 if (runtimeModel.executionContexts().length >= n)
1101 callback.call(null); 1101 callback.call(null);
1102 else 1102 else
1103 this.addSniffer(SDK.RuntimeModel.prototype, '_executionContextCreated', checkForExecutionContexts.bind(this)); 1103 this.addSniffer(SDK.RuntimeModel.prototype, '_executionContextCreated', checkForExecutionContexts.bind(this));
1104 } 1104 }
1105 }; 1105 };
1106 1106
1107 1107
1108 window.uiTests = new TestSuite(window.domAutomationController); 1108 window.uiTests = new TestSuite(window.domAutomationController);
1109 })(window); 1109 })(window);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698