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

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

Issue 2563553002: DevTools: Disallow console.log statements with eslint (Closed)
Patch Set: fix tests 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /* eslint-disable no-console */
6
5 /** @type {!{notifyDone: function()}|undefined} */ 7 /** @type {!{notifyDone: function()}|undefined} */
6 self.testRunner; 8 self.testRunner;
7 9
8 TestRunner.executeTestScript = function() { 10 TestRunner.executeTestScript = function() {
9 fetch(`${Runtime.queryParam('test')}`) 11 fetch(`${Runtime.queryParam('test')}`)
10 .then((data) => data.text()) 12 .then((data) => data.text())
11 .then((testScript) => eval(`(function(){${testScript}})()`)) 13 .then((testScript) => eval(`(function(){${testScript}})()`))
12 .catch((error) => { 14 .catch((error) => {
13 TestRunner.addResult(`Unable to execute test script because of error: ${ error}`); 15 TestRunner.addResult(`Unable to execute test script because of error: ${ error}`);
14 TestRunner.completeTest(); 16 TestRunner.completeTest();
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 * @param {number} colno 144 * @param {number} colno
143 * @param {!Error} error 145 * @param {!Error} error
144 */ 146 */
145 function completeTestOnError(message, source, lineno, colno, error) { 147 function completeTestOnError(message, source, lineno, colno, error) {
146 TestRunner.addResult('TEST ENDED IN ERROR: ' + error.stack); 148 TestRunner.addResult('TEST ENDED IN ERROR: ' + error.stack);
147 TestRunner.completeTest(); 149 TestRunner.completeTest();
148 } 150 }
149 151
150 self['onerror'] = completeTestOnError; 152 self['onerror'] = completeTestOnError;
151 })(); 153 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698