| Index: test/inspector/type-profile/collect-type-profile.js
|
| diff --git a/test/inspector/type-profile/collect-type-profile.js b/test/inspector/type-profile/collect-type-profile.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5f16c0bcceb8057d323ef962b34d44b7e180e252
|
| --- /dev/null
|
| +++ b/test/inspector/type-profile/collect-type-profile.js
|
| @@ -0,0 +1,38 @@
|
| +// Copyright 2016 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.
|
| +
|
| +// Flags: --type-profile --turbo
|
| +
|
| +const expression = `
|
| +function test(param) {
|
| + var my_var1 = param;
|
| + var my_var2 = 17;
|
| +}
|
| +
|
| +test({});
|
| +test(123);
|
| +test('hello');
|
| +test(123);
|
| +test(undefined);
|
| +test('hello');
|
| +test({x: 12});
|
| +test({x: 12});
|
| +
|
| +class MyClass {
|
| + constructor() {}
|
| +}
|
| +
|
| +
|
| +function testConstructorNames(param) {
|
| + var my_var = param;
|
| +}
|
| +
|
| +testConstructorNames(new MyClass());
|
| +testConstructorNames({});
|
| +testConstructorNames(2);
|
| +`;
|
| +
|
| +
|
| +Protocol.Runtime.evaluate({ expression: expression })
|
| + .then(function() {InspectorTest.completeTest();});
|
|
|