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

Side by Side Diff: test/inspector/runtime/console-time-end-format.js

Issue 2891213002: [inspector] Refactor protocol-test.js (Closed)
Patch Set: comments addressed Created 3 years, 7 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 // Copyright 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 the V8 project 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 InspectorTest.log('Checks format of console.timeEnd output'); 5 let {session, contextGroup, Protocol} = InspectorTest.start('Checks format of co nsole.timeEnd output');
6 6
7 Protocol.Runtime.enable(); 7 Protocol.Runtime.enable();
8 Protocol.Runtime.onConsoleAPICalled(message => { 8 Protocol.Runtime.onConsoleAPICalled(message => {
9 InspectorTest.log(message.params.args[0].value); 9 InspectorTest.log(message.params.args[0].value);
10 }); 10 });
11 11
12 InspectorTest.runTestSuite([ 12 InspectorTest.runTestSuite([
13 function zero(next) { 13 function zero(next) {
14 checkInterval(0.0).then(next); 14 checkInterval(0.0).then(next);
15 }, 15 },
(...skipping 20 matching lines...) Expand all
36 function checkInterval(time) { 36 function checkInterval(time) {
37 utils.setCurrentTimeMSForTest(0.0); 37 utils.setCurrentTimeMSForTest(0.0);
38 return Protocol.Runtime.evaluate({ 38 return Protocol.Runtime.evaluate({
39 expression: `console.log('js: ' + ${time} + 'ms')`}) 39 expression: `console.log('js: ' + ${time} + 'ms')`})
40 .then(() => Protocol.Runtime.evaluate({ 40 .then(() => Protocol.Runtime.evaluate({
41 expression: 'console.time(\'timeEnd\')'})) 41 expression: 'console.time(\'timeEnd\')'}))
42 .then(() => utils.setCurrentTimeMSForTest(time)) 42 .then(() => utils.setCurrentTimeMSForTest(time))
43 .then(() => Protocol.Runtime.evaluate({ 43 .then(() => Protocol.Runtime.evaluate({
44 expression: 'console.timeEnd(\'timeEnd\')'})); 44 expression: 'console.timeEnd(\'timeEnd\')'}));
45 } 45 }
OLDNEW
« no previous file with comments | « test/inspector/runtime/console-spec-expected.txt ('k') | test/inspector/runtime/console-timestamp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698