This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta: merge node/master into node-chakracore/master
Merge a4f44ac as of 2017-12-21 This commit was automatically generated. For any problems, please contact jackhorton Reviewed-By: Taylor Woll <tawoll@ntdev.microsoft.com>
- Loading branch information
Showing
35 changed files
with
1,066 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
deps/v8/test/inspector/runtime/runtime-global-lexical-scope-names-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Test for Runtime.globalLexicalScopeVariablesNames | ||
Running 'let a = 1' | ||
Values: | ||
a = 1 | ||
|
||
Running 'let b = 2' | ||
Values: | ||
a = 1 | ||
b = 2 | ||
|
||
Running 'let b = 3' | ||
Values: | ||
a = 1 | ||
b = 2 | ||
|
||
Running 'const c = 4' | ||
Values: | ||
a = 1 | ||
b = 2 | ||
c = 4 | ||
|
||
Running 'var d = 5' | ||
(should not be in list of scoped variables) | ||
Values: | ||
a = 1 | ||
b = 2 | ||
c = 4 | ||
|
||
Running 'class Foo{}' | ||
Values: | ||
a = 1 | ||
b = 2 | ||
c = 4 | ||
Foo = | ||
{ | ||
className : Function | ||
description : class Foo{} | ||
objectId : <objectId> | ||
type : function | ||
} | ||
|
||
Adding script with scope variables | ||
Values: | ||
a = 1 | ||
b = 2 | ||
c = 4 | ||
Foo = | ||
{ | ||
className : Function | ||
description : class Foo{} | ||
objectId : <objectId> | ||
type : function | ||
} | ||
e = 1 | ||
f = 2 | ||
g = 3 | ||
Boo = | ||
{ | ||
className : Function | ||
description : class Boo {} | ||
objectId : <objectId> | ||
type : function | ||
} | ||
|
59 changes: 59 additions & 0 deletions
59
deps/v8/test/inspector/runtime/runtime-global-lexical-scope-names.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright 2017 the V8 project authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
let {session, contextGroup, Protocol} = | ||
InspectorTest.start('Test for Runtime.globalLexicalScopeVariablesNames'); | ||
|
||
(async function test() { | ||
InspectorTest.log('Running \'let a = 1\''); | ||
Protocol.Runtime.evaluate({expression: 'let a = 1'}); | ||
await dumpGlobalScopeVariables(); | ||
|
||
InspectorTest.log('Running \'let b = 2\''); | ||
Protocol.Runtime.evaluate({expression: 'let b = 2'}); | ||
await dumpGlobalScopeVariables(); | ||
|
||
InspectorTest.log('Running \'let b = 3\''); | ||
Protocol.Runtime.evaluate({expression: 'let b = 3'}); | ||
await dumpGlobalScopeVariables(); | ||
|
||
InspectorTest.log('Running \'const c = 4\''); | ||
Protocol.Runtime.evaluate({expression: 'const c = 4'}); | ||
await dumpGlobalScopeVariables(); | ||
|
||
InspectorTest.log('Running \'var d = 5\''); | ||
InspectorTest.log('(should not be in list of scoped variables)'); | ||
Protocol.Runtime.evaluate({expression: 'var d = 5'}); | ||
await dumpGlobalScopeVariables(); | ||
|
||
InspectorTest.log('Running \'class Foo{}\''); | ||
Protocol.Runtime.evaluate({expression: 'class Foo{}'}); | ||
await dumpGlobalScopeVariables(); | ||
|
||
InspectorTest.log('Adding script with scope variables'); | ||
contextGroup.addScript(` | ||
let e = 1; | ||
const f = 2; | ||
const g = 3; | ||
class Boo {}; | ||
`); | ||
await dumpGlobalScopeVariables(); | ||
InspectorTest.completeTest(); | ||
})(); | ||
|
||
async function dumpGlobalScopeVariables() { | ||
let {result:{names}} = | ||
await Protocol.Runtime.globalLexicalScopeNames(); | ||
InspectorTest.log('Values:'); | ||
for (let name of names) { | ||
let {result:{result}} = await Protocol.Runtime.evaluate({expression: name}); | ||
if (result.value) { | ||
InspectorTest.log(`${name} = ${result.value}`); | ||
} else { | ||
InspectorTest.log(`${name} =`); | ||
InspectorTest.logMessage(result); | ||
} | ||
} | ||
InspectorTest.log(''); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.