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

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

Issue 2560043005: DevTools: Remove unused variables. Disallow unused variables with eslint (Closed)
Patch Set: A new unused variable was born Created 4 years 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // Wait until all scripts are added to the debugger. 295 // Wait until all scripts are added to the debugger.
296 this.takeControl(); 296 this.takeControl();
297 }; 297 };
298 298
299 /** 299 /**
300 * Tests that scripts are not duplicaed on Scripts tab switch. 300 * Tests that scripts are not duplicaed on Scripts tab switch.
301 */ 301 */
302 TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch = function() { 302 TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch = function() {
303 var test = this; 303 var test = this;
304 304
305 // There should be two scripts: one for the main page and another
306 // one which is source of console API(see
307 // InjectedScript._ensureCommandLineAPIInstalled).
308 var expectedScriptsCount = 2;
309 var parsedScripts = [];
310
311 function switchToElementsTab() { 305 function switchToElementsTab() {
312 test.showPanel('elements').then(function() { 306 test.showPanel('elements').then(function() {
313 setTimeout(switchToScriptsTab, 0); 307 setTimeout(switchToScriptsTab, 0);
314 }); 308 });
315 } 309 }
316 310
317 function switchToScriptsTab() { 311 function switchToScriptsTab() {
318 test.showPanel('sources').then(function() { 312 test.showPanel('sources').then(function() {
319 setTimeout(checkScriptsPanel, 0); 313 setTimeout(checkScriptsPanel, 0);
320 }); 314 });
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 this.evaluateInConsole_('globalVar', didEvaluateInConsole.bind(this)); 560 this.evaluateInConsole_('globalVar', didEvaluateInConsole.bind(this));
567 this.takeControl(); 561 this.takeControl();
568 }; 562 };
569 563
570 TestSuite.prototype.testPauseInSharedWorkerInitialization1 = function() { 564 TestSuite.prototype.testPauseInSharedWorkerInitialization1 = function() {
571 // Make sure the worker is loaded. 565 // Make sure the worker is loaded.
572 this.takeControl(); 566 this.takeControl();
573 this._waitForTargets(2, callback.bind(this)); 567 this._waitForTargets(2, callback.bind(this));
574 568
575 function callback() { 569 function callback() {
576 var target = SDK.targetManager.targets(SDK.Target.Capability.JS)[0];
577 InspectorBackendClass.deprecatedRunAfterPendingDispatches(this.releaseCont rol.bind(this)); 570 InspectorBackendClass.deprecatedRunAfterPendingDispatches(this.releaseCont rol.bind(this));
578 } 571 }
579 }; 572 };
580 573
581 TestSuite.prototype.testPauseInSharedWorkerInitialization2 = function() { 574 TestSuite.prototype.testPauseInSharedWorkerInitialization2 = function() {
582 this.takeControl(); 575 this.takeControl();
583 this._waitForTargets(2, callback.bind(this)); 576 this._waitForTargets(2, callback.bind(this));
584 577
585 function callback() { 578 function callback() {
586 var target = SDK.targetManager.targets(SDK.Target.Capability.JS)[0]; 579 var target = SDK.targetManager.targets(SDK.Target.Capability.JS)[0];
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 if (runtimeModel.executionContexts().length >= n) 1103 if (runtimeModel.executionContexts().length >= n)
1111 callback.call(null); 1104 callback.call(null);
1112 else 1105 else
1113 this.addSniffer(SDK.RuntimeModel.prototype, '_executionContextCreated', checkForExecutionContexts.bind(this)); 1106 this.addSniffer(SDK.RuntimeModel.prototype, '_executionContextCreated', checkForExecutionContexts.bind(this));
1114 } 1107 }
1115 }; 1108 };
1116 1109
1117 1110
1118 window.uiTests = new TestSuite(window.domAutomationController); 1111 window.uiTests = new TestSuite(window.domAutomationController);
1119 })(window); 1112 })(window);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698