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

Side by Side Diff: test/inspector/runtime/console-spec.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.addScript(` 5 let {session, contextGroup, Protocol} = InspectorTest.start('Tests console objec t and it\'s prototype');
6
7 contextGroup.addScript(`
6 var self = this; 8 var self = this;
7 function checkPrototype() { 9 function checkPrototype() {
8 const prototype1 = Object.getPrototypeOf(console); 10 const prototype1 = Object.getPrototypeOf(console);
9 const prototype2 = Object.getPrototypeOf(prototype1); 11 const prototype2 = Object.getPrototypeOf(prototype1);
10 if (Object.getOwnPropertyNames(prototype1).length !== 0) 12 if (Object.getOwnPropertyNames(prototype1).length !== 0)
11 return "false: The [[Prototype]] must have no properties"; 13 return "false: The [[Prototype]] must have no properties";
12 if (prototype2 !== Object.prototype) 14 if (prototype2 !== Object.prototype)
13 return "false: The [[Prototype]]'s [[Prototype]] must be %ObjectPrototype%"; 15 return "false: The [[Prototype]]'s [[Prototype]] must be %ObjectPrototype%";
14 return "true"; 16 return "true";
15 } 17 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 InspectorTest.log(message.result.result.value); 51 InspectorTest.log(message.result.result.value);
50 }, 52 },
51 53
52 async function consoleMethodPropertyDescriptor() { 54 async function consoleMethodPropertyDescriptor() {
53 let message = await Protocol.Runtime.evaluate({ 55 let message = await Protocol.Runtime.evaluate({
54 expression: 'Object.getOwnPropertyDescriptor(console, \'log\')', 56 expression: 'Object.getOwnPropertyDescriptor(console, \'log\')',
55 returnByValue: true}); 57 returnByValue: true});
56 InspectorTest.logObject(message.result.result.value); 58 InspectorTest.logObject(message.result.result.value);
57 } 59 }
58 ]); 60 ]);
OLDNEW
« no previous file with comments | « test/inspector/runtime/console-methods.js ('k') | test/inspector/runtime/console-spec-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698