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

Side by Side Diff: test/inspector/runtime/console-memory.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 console.memory'); 5 let {session, contextGroup, Protocol} = InspectorTest.start('Checks console.memo ry');
6 6
7 InspectorTest.runAsyncTestSuite([ 7 InspectorTest.runAsyncTestSuite([
8 async function testWithoutMemory() { 8 async function testWithoutMemory() {
9 InspectorTest.logMessage( 9 InspectorTest.logMessage(
10 await Protocol.Runtime.evaluate({expression: 'console.memory'})); 10 await Protocol.Runtime.evaluate({expression: 'console.memory'}));
11 }, 11 },
12 12
13 async function testSetterInStrictMode() { 13 async function testSetterInStrictMode() {
14 // crbug.com/468611 14 // crbug.com/468611
15 InspectorTest.logMessage( 15 InspectorTest.logMessage(
16 await Protocol.Runtime.evaluate({ 16 await Protocol.Runtime.evaluate({
17 expression: '"use strict"\nconsole.memory = {};undefined' })); 17 expression: '"use strict"\nconsole.memory = {};undefined' }));
18 }, 18 },
19 19
20 async function testWithMemory() { 20 async function testWithMemory() {
21 utils.setMemoryInfoForTest(239); 21 utils.setMemoryInfoForTest(239);
22 InspectorTest.logMessage( 22 InspectorTest.logMessage(
23 await Protocol.Runtime.evaluate({expression: 'console.memory'})); 23 await Protocol.Runtime.evaluate({expression: 'console.memory'}));
24 }, 24 },
25 25
26 async function testSetterDoesntOverride() { 26 async function testSetterDoesntOverride() {
27 utils.setMemoryInfoForTest(42); 27 utils.setMemoryInfoForTest(42);
28 await Protocol.Runtime.evaluate({expression: 'console.memory = 0'}); 28 await Protocol.Runtime.evaluate({expression: 'console.memory = 0'});
29 InspectorTest.logMessage( 29 InspectorTest.logMessage(
30 await Protocol.Runtime.evaluate({expression: 'console.memory'})); 30 await Protocol.Runtime.evaluate({expression: 'console.memory'}));
31 } 31 }
32 ]); 32 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698