summaryrefslogtreecommitdiff
path: root/deps/v8/test/inspector
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2021-11-21 15:58:15 +0100
committerMichaël Zasso <targos@protonmail.com>2021-11-21 16:04:41 +0100
commit3e9939e38cb4ecc7c8a9bd7cff64baca3a897eb3 (patch)
tree036ca0e8d0971c009a181a0ad3a7a158ea7f7e86 /deps/v8/test/inspector
parent42543bcf478debf7a10f1f291e227ad57b0a38b6 (diff)
downloadnode-new-3e9939e38cb4ecc7c8a9bd7cff64baca3a897eb3.tar.gz
deps: update V8 to 9.6.180.14
PR-URL: https://github.com/nodejs/node/pull/40488 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/v8/test/inspector')
-rw-r--r--deps/v8/test/inspector/debugger/async-for-await-of-promise-stack-expected.txt12
-rw-r--r--deps/v8/test/inspector/debugger/async-function-step-out-expected.txt111
-rw-r--r--deps/v8/test/inspector/debugger/async-stack-await-expected.txt15
-rw-r--r--deps/v8/test/inspector/debugger/continue-to-location-target-call-frames-expected.txt6
-rw-r--r--deps/v8/test/inspector/debugger/get-properties-paused-expected.txt2
-rw-r--r--deps/v8/test/inspector/debugger/get-properties-paused.js6
-rw-r--r--deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate-expected.txt7
-rw-r--r--deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate.js24
-rw-r--r--deps/v8/test/inspector/inspector.status5
-rw-r--r--deps/v8/test/inspector/regress/regress-crbug-1253277-expected.txt5
-rw-r--r--deps/v8/test/inspector/regress/regress-crbug-1253277.js23
-rw-r--r--deps/v8/test/inspector/runtime/evaluate-without-side-effects-i18n-expected.txt74
-rw-r--r--deps/v8/test/inspector/runtime/evaluate-without-side-effects-i18n.js182
-rw-r--r--deps/v8/test/inspector/runtime/get-properties-expected.txt2
-rw-r--r--deps/v8/test/inspector/runtime/get-properties.js6
15 files changed, 368 insertions, 112 deletions
diff --git a/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack-expected.txt b/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack-expected.txt
index 880a982c7c..b78d5d5bb9 100644
--- a/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack-expected.txt
+++ b/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack-expected.txt
@@ -3,8 +3,7 @@ Checks that async chains for for-await-of are correct.
Running test: testBasic
Debugger (test.js:10:2)
Basic (test.js:48:4)
--- async function --
-Basic (test.js:47:17)
+-- await --
(anonymous) (testBasic.js:0:0)
@@ -25,16 +24,14 @@ UncaughtThrow (test.js:67:21)
Running test: testCaughtReject
Debugger (test.js:10:2)
CaughtReject (test.js:76:4)
--- async function --
-CaughtReject (test.js:72:19)
+-- await --
(anonymous) (testCaughtReject.js:0:0)
Running test: testCaughtThrow
Debugger (test.js:10:2)
CaughtThrow (test.js:86:4)
--- async function --
-CaughtThrow (test.js:82:19)
+-- await --
(anonymous) (testCaughtThrow.js:0:0)
@@ -52,7 +49,6 @@ Running test: testCaughtRejectOnBreak
Running test: testCaughtThrowOnBreak
Debugger (test.js:10:2)
CaughtThrowOnBreak (test.js:124:4)
--- async function --
-CaughtThrowOnBreak (test.js:120:19)
+-- await --
(anonymous) (testCaughtThrowOnBreak.js:0:0)
diff --git a/deps/v8/test/inspector/debugger/async-function-step-out-expected.txt b/deps/v8/test/inspector/debugger/async-function-step-out-expected.txt
index 28fae0cbfe..4d0f7b3635 100644
--- a/deps/v8/test/inspector/debugger/async-function-step-out-expected.txt
+++ b/deps/v8/test/inspector/debugger/async-function-step-out-expected.txt
@@ -3,54 +3,42 @@ stepOut async function
Running test: testTrivial
Check that we have proper async stack at return
bar (testTrivial.js:28:8)
--- async function --
-bar (testTrivial.js:27:22)
+-- await --
foo (testTrivial.js:23:14)
--- async function --
-foo (testTrivial.js:22:22)
+-- await --
test (testTrivial.js:18:14)
--- async function --
-test (testTrivial.js:17:22)
+-- await --
(anonymous) (:0:0)
foo (testTrivial.js:24:6)
--- async function --
-foo (testTrivial.js:22:22)
+-- await --
test (testTrivial.js:18:14)
--- async function --
-test (testTrivial.js:17:22)
+-- await --
(anonymous) (:0:0)
test (testTrivial.js:19:6)
--- async function --
-test (testTrivial.js:17:22)
+-- await --
(anonymous) (:0:0)
Running test: testStepOutPrecision
Check that stepOut go to resumed outer generator
bar (testStepOutPrecision.js:61:8)
--- async function --
-bar (testStepOutPrecision.js:60:22)
+-- await --
foo (testStepOutPrecision.js:55:14)
--- async function --
-foo (testStepOutPrecision.js:54:22)
+-- await --
test (testStepOutPrecision.js:48:14)
--- async function --
-test (testStepOutPrecision.js:47:14)
+-- await --
(anonymous) (:0:0)
foo (testStepOutPrecision.js:56:8)
--- async function --
-foo (testStepOutPrecision.js:54:22)
+-- await --
test (testStepOutPrecision.js:48:14)
--- async function --
-test (testStepOutPrecision.js:47:14)
+-- await --
(anonymous) (:0:0)
test (testStepOutPrecision.js:49:8)
--- async function --
-test (testStepOutPrecision.js:47:14)
+-- await --
(anonymous) (:0:0)
floodWithTimeouts (testStepOutPrecision.js:40:15)
@@ -66,8 +54,7 @@ test (testStepOutPrecision.js:46:8)
(anonymous) (:0:0)
test (testStepOutPrecision.js:50:8)
--- async function --
-test (testStepOutPrecision.js:47:14)
+-- await --
(anonymous) (:0:0)
floodWithTimeouts (testStepOutPrecision.js:40:15)
@@ -88,43 +75,33 @@ test (testStepOutPrecision.js:46:8)
Running test: testStepIntoAtReturn
Check that stepInto at return go to resumed outer generator
bar (testStepIntoAtReturn.js:93:8)
--- async function --
-bar (testStepIntoAtReturn.js:92:22)
+-- await --
foo (testStepIntoAtReturn.js:88:14)
--- async function --
-foo (testStepIntoAtReturn.js:87:22)
+-- await --
test (testStepIntoAtReturn.js:82:14)
--- async function --
-test (testStepIntoAtReturn.js:81:14)
+-- await --
(anonymous) (:0:0)
bar (testStepIntoAtReturn.js:94:6)
--- async function --
-bar (testStepIntoAtReturn.js:92:22)
+-- await --
foo (testStepIntoAtReturn.js:88:14)
--- async function --
-foo (testStepIntoAtReturn.js:87:22)
+-- await --
test (testStepIntoAtReturn.js:82:14)
--- async function --
-test (testStepIntoAtReturn.js:81:14)
+-- await --
(anonymous) (:0:0)
foo (testStepIntoAtReturn.js:89:6)
--- async function --
-foo (testStepIntoAtReturn.js:87:22)
+-- await --
test (testStepIntoAtReturn.js:82:14)
--- async function --
-test (testStepIntoAtReturn.js:81:14)
+-- await --
(anonymous) (:0:0)
test (testStepIntoAtReturn.js:83:8)
--- async function --
-test (testStepIntoAtReturn.js:81:14)
+-- await --
(anonymous) (:0:0)
test (testStepIntoAtReturn.js:84:6)
--- async function --
-test (testStepIntoAtReturn.js:81:14)
+-- await --
(anonymous) (:0:0)
floodWithTimeouts (testStepIntoAtReturn.js:74:15)
@@ -139,43 +116,33 @@ test (testStepIntoAtReturn.js:80:8)
Running test: testStepOverAtReturn
Check that stepOver at return go to resumed outer generator
bar (testStepIntoAtReturn.js:124:8)
--- async function --
-bar (testStepIntoAtReturn.js:123:22)
+-- await --
foo (testStepIntoAtReturn.js:119:14)
--- async function --
-foo (testStepIntoAtReturn.js:118:22)
+-- await --
test (testStepIntoAtReturn.js:113:14)
--- async function --
-test (testStepIntoAtReturn.js:112:14)
+-- await --
(anonymous) (:0:0)
bar (testStepIntoAtReturn.js:125:6)
--- async function --
-bar (testStepIntoAtReturn.js:123:22)
+-- await --
foo (testStepIntoAtReturn.js:119:14)
--- async function --
-foo (testStepIntoAtReturn.js:118:22)
+-- await --
test (testStepIntoAtReturn.js:113:14)
--- async function --
-test (testStepIntoAtReturn.js:112:14)
+-- await --
(anonymous) (:0:0)
foo (testStepIntoAtReturn.js:120:6)
--- async function --
-foo (testStepIntoAtReturn.js:118:22)
+-- await --
test (testStepIntoAtReturn.js:113:14)
--- async function --
-test (testStepIntoAtReturn.js:112:14)
+-- await --
(anonymous) (:0:0)
test (testStepIntoAtReturn.js:114:8)
--- async function --
-test (testStepIntoAtReturn.js:112:14)
+-- await --
(anonymous) (:0:0)
test (testStepIntoAtReturn.js:115:6)
--- async function --
-test (testStepIntoAtReturn.js:112:14)
+-- await --
(anonymous) (:0:0)
floodWithTimeouts (testStepIntoAtReturn.js:105:15)
@@ -190,19 +157,15 @@ test (testStepIntoAtReturn.js:111:8)
Running test: testStepOutFromNotAwaitedCall
Checks stepOut from not awaited call
bar (testStepIntoAtReturn.js:158:8)
--- async function --
-bar (testStepIntoAtReturn.js:157:22)
+-- await --
foo (testStepIntoAtReturn.js:152:8)
--- async function --
-foo (testStepIntoAtReturn.js:151:22)
+-- await --
test (testStepIntoAtReturn.js:144:14)
--- async function --
-test (testStepIntoAtReturn.js:143:14)
+-- await --
(anonymous) (:0:0)
test (testStepIntoAtReturn.js:145:8)
--- async function --
-test (testStepIntoAtReturn.js:143:14)
+-- await --
(anonymous) (:0:0)
floodWithTimeouts (testStepIntoAtReturn.js:136:15)
diff --git a/deps/v8/test/inspector/debugger/async-stack-await-expected.txt b/deps/v8/test/inspector/debugger/async-stack-await-expected.txt
index 0bb4de5f2c..892a5e5ceb 100644
--- a/deps/v8/test/inspector/debugger/async-stack-await-expected.txt
+++ b/deps/v8/test/inspector/debugger/async-stack-await-expected.txt
@@ -1,34 +1,29 @@
Checks that async stacks works for async/await
foo2 (test.js:15:2)
--- async function --
-foo2 (test.js:14:16)
+-- await --
test (test.js:24:8)
(anonymous) (expr.js:0:0)
foo2 (test.js:17:2)
--- async function --
-foo2 (test.js:14:16)
+-- await --
test (test.js:24:8)
(anonymous) (expr.js:0:0)
foo1 (test.js:9:2)
foo2 (test.js:18:8)
--- async function --
-foo2 (test.js:14:16)
+-- await --
test (test.js:24:8)
(anonymous) (expr.js:0:0)
foo1 (test.js:9:2)
-- Promise.then --
foo2 (test.js:19:43)
--- async function --
-foo2 (test.js:14:16)
+-- await --
test (test.js:24:8)
(anonymous) (expr.js:0:0)
foo2 (test.js:20:2)
--- async function --
-foo2 (test.js:14:16)
+-- await --
test (test.js:24:8)
(anonymous) (expr.js:0:0)
diff --git a/deps/v8/test/inspector/debugger/continue-to-location-target-call-frames-expected.txt b/deps/v8/test/inspector/debugger/continue-to-location-target-call-frames-expected.txt
index e61a4e117e..a3b6826878 100644
--- a/deps/v8/test/inspector/debugger/continue-to-location-target-call-frames-expected.txt
+++ b/deps/v8/test/inspector/debugger/continue-to-location-target-call-frames-expected.txt
@@ -7,8 +7,7 @@ asyncFact (test.js:9:2)
(anonymous) (expr.js:0:0)
asyncFact (test.js:11:2)
--- async function --
-asyncFact (test.js:3:20)
+-- await --
asyncFact (test.js:3:20)
asyncFact (test.js:3:20)
asyncFact (test.js:3:20)
@@ -22,8 +21,7 @@ asyncFact (test.js:9:2)
(anonymous) (expr.js:0:0)
asyncFact (test.js:11:2)
--- async function --
-asyncFact (test.js:3:20)
+-- await --
(anonymous) (expr.js:0:0)
diff --git a/deps/v8/test/inspector/debugger/get-properties-paused-expected.txt b/deps/v8/test/inspector/debugger/get-properties-paused-expected.txt
index 1fea7a5549..8f2f976712 100644
--- a/deps/v8/test/inspector/debugger/get-properties-paused-expected.txt
+++ b/deps/v8/test/inspector/debugger/get-properties-paused-expected.txt
@@ -61,7 +61,7 @@ Running test: testArrayBuffer
Running test: testArrayBufferWithBrokenUintCtor
Internal properties
[[ArrayBufferByteLength]] number 7
- [[ArrayBufferData]] string 0x...
+ [[ArrayBufferData]] number 2
[[Int8Array]] object undefined
[[Prototype]] object undefined
[[Uint8Array]] object undefined
diff --git a/deps/v8/test/inspector/debugger/get-properties-paused.js b/deps/v8/test/inspector/debugger/get-properties-paused.js
index d76429db7f..6b6dfafc9d 100644
--- a/deps/v8/test/inspector/debugger/get-properties-paused.js
+++ b/deps/v8/test/inspector/debugger/get-properties-paused.js
@@ -96,11 +96,7 @@ let { Protocol } = InspectorTest.start('Checks Runtime.getProperties method whil
for (var i = 0; i < internalPropertyArray.length; i++) {
var p = internalPropertyArray[i];
var v = p.value;
- if (p.name === "[[ArrayBufferData]]")
- // Hex value for pointer is non-deterministic
- InspectorTest.log(` ${p.name} ${v.type} ${v.value.substr(0, 2)}...`);
- else
- InspectorTest.log(` ${p.name} ${v.type} ${v.value}`);
+ InspectorTest.log(` ${p.name} ${v.type} ${v.value}`);
}
}
diff --git a/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate-expected.txt b/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate-expected.txt
index 4364308d85..7182a8b7d5 100644
--- a/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate-expected.txt
+++ b/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate-expected.txt
@@ -7,6 +7,10 @@ g() returns 2
f() returns 1
g() throws EvalError
+Running test: testAsyncFunctions
+testAsyncFunction("resolve") : ok
+testAsyncFunction("reject") : throws
+
Running test: testDate
someGlobalDate.setDate(10) : throws
new Date().setDate(10) : ok
@@ -20,3 +24,6 @@ someGlobalDate.getFullYear() : ok
new Date().getFullYear() : ok
someGlobalDate.getHours() : ok
new Date().getHours() : ok
+
+Running test: testPromiseReject
+Promise.reject() : throws
diff --git a/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate.js b/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate.js
index 4a70fd38a2..bb801e5c1f 100644
--- a/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate.js
+++ b/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate.js
@@ -14,8 +14,19 @@ function testFunction()
f,g;
debugger;
}
+async function testAsyncFunction(action) {
+ switch (action) {
+ case "resolve": return 1;
+ case "reject": throw new Error();
+ }
+}
//# sourceURL=foo.js`);
+const check = async (expression) => {
+ const {result:{exceptionDetails}} = await Protocol.Runtime.evaluate({expression, throwOnSideEffect: true});
+ InspectorTest.log(expression + ' : ' + (exceptionDetails ? 'throws' : 'ok'));
+};
+
InspectorTest.runAsyncTestSuite([
async function basicTest() {
Protocol.Debugger.enable();
@@ -32,11 +43,12 @@ InspectorTest.runAsyncTestSuite([
InspectorTest.log('g() throws ' + className);
},
+ async function testAsyncFunctions() {
+ await check('testAsyncFunction("resolve")');
+ await check('testAsyncFunction("reject")');
+ },
+
async function testDate() {
- const check = async (expression) => {
- const {result:{exceptionDetails}} = await Protocol.Runtime.evaluate({expression, throwOnSideEffect: true});
- InspectorTest.log(expression + ' : ' + (exceptionDetails ? 'throws' : 'ok'));
- };
// setters are only ok on temporary objects
await check('someGlobalDate.setDate(10)');
await check('new Date().setDate(10)');
@@ -51,5 +63,9 @@ InspectorTest.runAsyncTestSuite([
await check('new Date().getFullYear()');
await check('someGlobalDate.getHours()');
await check('new Date().getHours()');
+ },
+
+ async function testPromiseReject() {
+ await check('Promise.reject()');
}
]);
diff --git a/deps/v8/test/inspector/inspector.status b/deps/v8/test/inspector/inspector.status
index 2fec7679dc..125b4ac700 100644
--- a/deps/v8/test/inspector/inspector.status
+++ b/deps/v8/test/inspector/inspector.status
@@ -522,4 +522,9 @@
'cpu-profiler/coverage-block': [SKIP],
}], # variant == turboprop or variant = turboprop_as_toptier
+##############################################################################
+['no_i18n == True', {
+ 'runtime/evaluate-without-side-effects-i18n': [SKIP],
+}], # no_i18n == True
+
]
diff --git a/deps/v8/test/inspector/regress/regress-crbug-1253277-expected.txt b/deps/v8/test/inspector/regress/regress-crbug-1253277-expected.txt
new file mode 100644
index 0000000000..225a576d23
--- /dev/null
+++ b/deps/v8/test/inspector/regress/regress-crbug-1253277-expected.txt
@@ -0,0 +1,5 @@
+Regression test for crbug.com/1253277
+
+Running test: test
+function foo(){}|_|foo()
+
diff --git a/deps/v8/test/inspector/regress/regress-crbug-1253277.js b/deps/v8/test/inspector/regress/regress-crbug-1253277.js
new file mode 100644
index 0000000000..d98655f1b4
--- /dev/null
+++ b/deps/v8/test/inspector/regress/regress-crbug-1253277.js
@@ -0,0 +1,23 @@
+// Copyright 2020 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.
+
+const {contextGroup, Protocol, session} = InspectorTest.start('Regression test for crbug.com/1253277');
+
+const url = 'foo.js';
+contextGroup.addScript('function foo(){}foo()', 0, 0, url);
+session.setupScriptMap();
+
+InspectorTest.runAsyncTestSuite([
+ async function test() {
+ await Promise.all([Protocol.Runtime.enable(), Protocol.Debugger.enable()]);
+ const {result: {breakpointId, locations}} = await Protocol.Debugger.setBreakpointByUrl({
+ columnNumber: 16,
+ lineNumber: 0,
+ url,
+ });
+ await session.logBreakLocations(locations);
+ await Protocol.Debugger.removeBreakpoint({breakpointId});
+ await Promise.all([Protocol.Runtime.disable(), Protocol.Debugger.disable()]);
+ }
+]);
diff --git a/deps/v8/test/inspector/runtime/evaluate-without-side-effects-i18n-expected.txt b/deps/v8/test/inspector/runtime/evaluate-without-side-effects-i18n-expected.txt
new file mode 100644
index 0000000000..2b03a67496
--- /dev/null
+++ b/deps/v8/test/inspector/runtime/evaluate-without-side-effects-i18n-expected.txt
@@ -0,0 +1,74 @@
+Tests side-effect-free evaluation with i18n enabled
+
+Running test: testCollator
+Intl.Collator.supportedLocalesOf(["en-US"]) : ok
+new Intl.Collator("en-US") : ok
+someGlobalCollator.compare("foo", "bar") : ok
+someGlobalCollator.resolvedOptions() : ok
+
+Running test: testDateTimeFormat
+Intl.DateTimeFormat.supportedLocalesOf(["en-US"]) : ok
+new Intl.DateTimeFormat("en-US") : ok
+someGlobalDateTimeFormat.format(new Date(2021, 5)) : ok
+someGlobalDateTimeFormat.formatToParts(new Date(2021, 5)) : ok
+someGlobalDateTimeFormat.resolvedOptions() : ok
+someGlobalDateTimeFormat.formatRange(new Date(2021, 5), new Date(2022, 1)) : ok
+someGlobalDateTimeFormat.formatRangeToParts(new Date(2021, 5), new Date(2022, 1)) : ok
+
+Running test: testDisplayNames
+Intl.DisplayNames.supportedLocalesOf(["en-US"]) : ok
+new Intl.DisplayNames(["en-US"], {type: "region"}) : ok
+someGlobalDisplayNames.of("en") : ok
+someGlobalDisplayNames.resolvedOptions() : ok
+
+Running test: testIntl
+Intl.getCanonicalLocales("en-US") : ok
+
+Running test: testListFormat
+Intl.ListFormat.supportedLocalesOf(["en-US"]) : ok
+new Intl.ListFormat("en", { style: "long", type: "conjunction" }); : ok
+someGlobalListFormat.format(["a", "b"]) : ok
+someGlobalListFormat.formatToParts(["a", "b"]) : ok
+someGlobalListFormat.resolvedOptions() : ok
+
+Running test: testLocale
+new Intl.Locale("en-US") : ok
+someGlobalLocale.baseName : ok
+someGlobalLocale.calendar : ok
+someGlobalLocale.calendars : ok
+someGlobalLocale.caseFirst : ok
+someGlobalLocale.collation : ok
+someGlobalLocale.hourCycle : ok
+someGlobalLocale.hourCycles : ok
+someGlobalLocale.language : ok
+someGlobalLocale.numberingSystem : ok
+someGlobalLocale.numberingSystems : ok
+someGlobalLocale.numeric : ok
+someGlobalLocale.region : ok
+someGlobalLocale.script : ok
+someGlobalLocale.textInfo : ok
+someGlobalLocale.timeZones : ok
+someGlobalLocale.weekInfo : ok
+someGlobalLocale.maximize() : ok
+someGlobalLocale.minimize() : ok
+someGlobalLocale.toString() : ok
+
+Running test: testNumberFormat
+Intl.NumberFormat.supportedLocalesOf(["en-US"]) : ok
+new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }) : ok
+someGlobalNumberFormat.format(1) : ok
+someGlobalNumberFormat.formatToParts(1) : ok
+someGlobalNumberFormat.resolvedOptions() : ok
+
+Running test: testPluralRules
+Intl.PluralRules.supportedLocalesOf(["en-US"]) : ok
+new Intl.PluralRules("en-US") : ok
+someGlobalPluralRules.resolvedOptions() : ok
+someGlobalPluralRules.select(42) : ok
+
+Running test: testRelativeTimeFormat
+Intl.RelativeTimeFormat.supportedLocalesOf(["en-US"]) : ok
+new Intl.RelativeTimeFormat("en-US", {style: "narrow"}) : ok
+someGlobalRelativeTimeFormat.format(2, "day") : ok
+someGlobalRelativeTimeFormat.formatToParts(2, "day") : ok
+someGlobalRelativeTimeFormat.resolvedOptions() : ok
diff --git a/deps/v8/test/inspector/runtime/evaluate-without-side-effects-i18n.js b/deps/v8/test/inspector/runtime/evaluate-without-side-effects-i18n.js
new file mode 100644
index 0000000000..79b4f2b66b
--- /dev/null
+++ b/deps/v8/test/inspector/runtime/evaluate-without-side-effects-i18n.js
@@ -0,0 +1,182 @@
+// Copyright 2021 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('Tests side-effect-free evaluation with i18n enabled');
+
+contextGroup.addScript(`
+var someGlobalCollator = new Intl.Collator("en-Latn-US");
+var someGlobalDateTimeFormat = new Intl.DateTimeFormat("en-Latn-US");
+var someGlobalDisplayNames = new Intl.DisplayNames(["en-Latn-US"], {type: 'region'});
+var someGlobalListFormat = new Intl.ListFormat('en', { style: 'long', type: 'conjunction' });
+var someGlobalLocale = new Intl.Locale("en-Latn-US", {language: "es"});
+var someGlobalNumberFormat = new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' });
+var someGlobalPluralRules = new Intl.PluralRules('en-US');
+var someGlobalRelativeTimeFormat = new Intl.RelativeTimeFormat("en-US", {style: "narrow"});
+`, 0, 0, 'foo.js');
+
+const check = async (expression) => {
+ const {result:{exceptionDetails}} = await Protocol.Runtime.evaluate({expression, throwOnSideEffect: true});
+ InspectorTest.log(expression + ' : ' + (exceptionDetails ? 'throws' : 'ok'));
+};
+
+InspectorTest.runAsyncTestSuite([
+ async function testCollator() {
+ await Protocol.Runtime.enable();
+
+ // static methods
+ await check('Intl.Collator.supportedLocalesOf(["en-US"])');
+
+ // constructor
+ await check('new Intl.Collator("en-US")');
+
+ // methods
+ await check('someGlobalCollator.compare("foo", "bar")');
+ await check('someGlobalCollator.resolvedOptions()');
+
+ await Protocol.Runtime.disable();
+ },
+
+ async function testDateTimeFormat() {
+ await Protocol.Runtime.enable();
+
+ // static methods
+ await check('Intl.DateTimeFormat.supportedLocalesOf(["en-US"])');
+
+ // constructor
+ await check('new Intl.DateTimeFormat("en-US")');
+
+ // methods
+ await check('someGlobalDateTimeFormat.format(new Date(2021, 5))');
+ await check('someGlobalDateTimeFormat.formatToParts(new Date(2021, 5))');
+ await check('someGlobalDateTimeFormat.resolvedOptions()');
+ await check('someGlobalDateTimeFormat.formatRange(new Date(2021, 5), new Date(2022, 1))');
+ await check('someGlobalDateTimeFormat.formatRangeToParts(new Date(2021, 5), new Date(2022, 1))');
+
+ await Protocol.Runtime.disable();
+ },
+
+ async function testDisplayNames() {
+ await Protocol.Runtime.enable();
+
+ // static methods
+ await check('Intl.DisplayNames.supportedLocalesOf(["en-US"])');
+
+ // constructor
+ await check('new Intl.DisplayNames(["en-US"], {type: "region"})');
+
+ // methods
+ await check('someGlobalDisplayNames.of("en")');
+ await check('someGlobalDisplayNames.resolvedOptions()');
+
+ await Protocol.Runtime.disable();
+ },
+
+ async function testIntl() {
+ await Protocol.Runtime.enable();
+
+ // static methods
+ await check('Intl.getCanonicalLocales("en-US")');
+
+ await Protocol.Runtime.disable();
+ },
+
+ async function testListFormat() {
+ await Protocol.Runtime.enable();
+
+ // static methods
+ await check('Intl.ListFormat.supportedLocalesOf(["en-US"])');
+
+ // constructor
+ await check('new Intl.ListFormat("en", { style: "long", type: "conjunction" });')
+
+ // methods
+ await check('someGlobalListFormat.format(["a", "b"])');
+ await check('someGlobalListFormat.formatToParts(["a", "b"])');
+ await check('someGlobalListFormat.resolvedOptions()');
+
+ await Protocol.Runtime.disable();
+ },
+
+ async function testLocale() {
+ await Protocol.Runtime.enable();
+
+ // constructor
+ await check('new Intl.Locale("en-US")')
+
+ // getters
+ await check('someGlobalLocale.baseName');
+ await check('someGlobalLocale.calendar');
+ await check('someGlobalLocale.calendars');
+ await check('someGlobalLocale.caseFirst');
+ await check('someGlobalLocale.collation');
+ await check('someGlobalLocale.hourCycle');
+ await check('someGlobalLocale.hourCycles');
+ await check('someGlobalLocale.language');
+ await check('someGlobalLocale.numberingSystem');
+ await check('someGlobalLocale.numberingSystems');
+ await check('someGlobalLocale.numeric');
+ await check('someGlobalLocale.region');
+ await check('someGlobalLocale.script');
+ await check('someGlobalLocale.textInfo');
+ await check('someGlobalLocale.timeZones');
+ await check('someGlobalLocale.weekInfo');
+
+ // methods
+ await check('someGlobalLocale.maximize()');
+ await check('someGlobalLocale.minimize()');
+ await check('someGlobalLocale.toString()');
+
+ await Protocol.Runtime.disable();
+ },
+
+ async function testNumberFormat() {
+ await Protocol.Runtime.enable();
+
+ // static methods
+ await check('Intl.NumberFormat.supportedLocalesOf(["en-US"])');
+
+ // constructor
+ await check('new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" })');
+
+ // methods
+ await check('someGlobalNumberFormat.format(1)');
+ await check('someGlobalNumberFormat.formatToParts(1)');
+ await check('someGlobalNumberFormat.resolvedOptions()');
+
+ await Protocol.Runtime.disable();
+ },
+
+ async function testPluralRules() {
+ await Protocol.Runtime.enable();
+
+ // static methods
+ await check('Intl.PluralRules.supportedLocalesOf(["en-US"])');
+
+ // constructor
+ await check('new Intl.PluralRules("en-US")');
+
+ // methods
+ await check('someGlobalPluralRules.resolvedOptions()');
+ await check('someGlobalPluralRules.select(42)');
+
+ await Protocol.Runtime.disable();
+ },
+
+ async function testRelativeTimeFormat() {
+ await Protocol.Runtime.enable();
+
+ // static methods
+ await check('Intl.RelativeTimeFormat.supportedLocalesOf(["en-US"])');
+
+ // constructor
+ await check('new Intl.RelativeTimeFormat("en-US", {style: "narrow"})');
+
+ // methods
+ await check('someGlobalRelativeTimeFormat.format(2, "day")');
+ await check('someGlobalRelativeTimeFormat.formatToParts(2, "day")');
+ await check('someGlobalRelativeTimeFormat.resolvedOptions()');
+
+ await Protocol.Runtime.disable();
+ }
+]);
diff --git a/deps/v8/test/inspector/runtime/get-properties-expected.txt b/deps/v8/test/inspector/runtime/get-properties-expected.txt
index 09d3b8c682..b7a071fb70 100644
--- a/deps/v8/test/inspector/runtime/get-properties-expected.txt
+++ b/deps/v8/test/inspector/runtime/get-properties-expected.txt
@@ -176,7 +176,7 @@ Running test: testDetachedArrayBuffer
Running test: testArrayBufferWithBrokenUintCtor
Internal properties
[[ArrayBufferByteLength]] number 7
- [[ArrayBufferData]] string 0x...
+ [[ArrayBufferData]] number 4
[[Int8Array]] object undefined
[[Prototype]] object undefined
[[Uint8Array]] object undefined
diff --git a/deps/v8/test/inspector/runtime/get-properties.js b/deps/v8/test/inspector/runtime/get-properties.js
index c2ffedfd0a..d536ee57e6 100644
--- a/deps/v8/test/inspector/runtime/get-properties.js
+++ b/deps/v8/test/inspector/runtime/get-properties.js
@@ -155,11 +155,7 @@ async function logGetPropertiesResult(objectId, flags = { ownProperties: true })
for (var i = 0; i < array.length; i++) {
var p = array[i];
var v = p.value;
- if (p.name == "[[ArrayBufferData]]")
- // Hex value for pointer is non-deterministic
- InspectorTest.log(` ${p.name} ${v.type} ${v.value.substr(0, 2)}...`);
- else
- InspectorTest.log(` ${p.name} ${v.type} ${v.value}`);
+ InspectorTest.log(` ${p.name} ${v.type} ${v.value}`);
}
}