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

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

Issue 2440503003: Version 5.6.123.1 (cherry-pick) (Closed)
Patch Set: Created 4 years, 2 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
(Empty)
1 // Copyright 2016 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
8 function checkPrototype() {
9 const prototype1 = Object.getPrototypeOf(console);
10 const prototype2 = Object.getPrototypeOf(prototype1);
11 if (Object.getOwnPropertyNames(prototype1).length !== 0)
12 return "false: The [[Prototype]] must have no properties";
13 if (prototype2 !== Object.prototype)
14 return "false: The [[Prototype]]'s [[Prototype]] must be %ObjectPrototype%";
15 return "true";
16 }
17 `);
18
19 InspectorTest.runTestSuite([
20 function consoleExistsOnGlobal(next) {
21 Protocol.Runtime.evaluate({ expression: "self.hasOwnProperty(\"console\")", returnByValue: true})
22 .then(message => InspectorTest.log(message.result.result.value))
23 .then(next);
24 },
25
26 function consoleHasRightPropertyDescriptor(next) {
27 Protocol.Runtime.evaluate({ expression: "Object.getOwnPropertyDescriptor(sel f, \"console\")", returnByValue: true})
28 .then(dumpDescriptor)
29 .then(next);
30
31 function dumpDescriptor(message) {
32 var value = message.result.result.value;
33 value.value = "<value>";
34 InspectorTest.logObject(value);
35 }
36 },
37
38 function ConsoleNotExistsOnGlobal(next) {
39 Protocol.Runtime.evaluate({ expression: "\"Console\" in self", returnByValue : true})
40 .then(message => InspectorTest.log(message.result.result.value))
41 .then(next);
42 },
43
44 function prototypeChainMustBeCorrect(next) {
45 Protocol.Runtime.evaluate({ expression: "checkPrototype()", returnByValue: t rue })
46 .then(message => InspectorTest.log(message.result.result.value))
47 .then(next);
48 }
49 ]);
OLDNEW
« no previous file with comments | « src/inspector/inspected-context.cc ('k') | test/inspector/console/console-follow-spec-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698