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

Side by Side Diff: test/inspector/runtime/console-spec.js

Issue 2795003003: Revert of [inspector] move console to builtins (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « test/inspector/inspector-impl.cc ('k') | test/inspector/runtime/console-spec-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 InspectorTest.addScript(`
6 var self = this;
7 function checkPrototype() {
8 const prototype1 = Object.getPrototypeOf(console);
9 const prototype2 = Object.getPrototypeOf(prototype1);
10 if (Object.getOwnPropertyNames(prototype1).length !== 0)
11 return "false: The [[Prototype]] must have no properties";
12 if (prototype2 !== Object.prototype)
13 return "false: The [[Prototype]]'s [[Prototype]] must be %ObjectPrototype%";
14 return "true";
15 }
16 `);
17
18 InspectorTest.runAsyncTestSuite([
19 async function consoleExistsOnGlobal() {
20 let message = await Protocol.Runtime.evaluate({
21 expression: 'self.hasOwnProperty(\'console\')', returnByValue: true});
22 InspectorTest.log(message.result.result.value);
23 },
24
25 async function consoleHasRightPropertyDescriptor() {
26 let message = await Protocol.Runtime.evaluate({
27 expression: 'Object.getOwnPropertyDescriptor(self, \'console\')',
28 returnByValue: true});
29 let result = message.result.result.value;
30 result.value = '<value>';
31 InspectorTest.logObject(result);
32 },
33
34 async function ConsoleNotExistsOnGlobal() {
35 let message = await Protocol.Runtime.evaluate({
36 expression: '\'Console\' in self', returnByValue: true})
37 InspectorTest.log(message.result.result.value);
38 },
39
40 async function prototypeChainMustBeCorrect() {
41 let message = await Protocol.Runtime.evaluate({
42 expression: "checkPrototype()", returnByValue: true });
43 InspectorTest.log(message.result.result.value);
44 }
45 ]);
OLDNEW
« no previous file with comments | « test/inspector/inspector-impl.cc ('k') | test/inspector/runtime/console-spec-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698