OLD | NEW |
| (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 Protocol.Runtime.enable(); | |
6 | |
7 Protocol.Runtime.onConsoleAPICalled(dumpConsoleApiCalled); | |
8 | |
9 InspectorTest.runTestSuite([ | |
10 function consoleLogWithDefaultLocale(next) { | |
11 Protocol.Runtime.evaluate({ expression: "console.log(239) "}).then(next); | |
12 }, | |
13 | |
14 function consoleTimeWithCommaAsSeparator(next) { | |
15 InspectorTest.log("set locale to fr_CA.UTF-8 (has comma as separator)"); | |
16 setlocale("fr_CA.UTF-8"); | |
17 Protocol.Runtime.evaluate({ expression: "console.time(\"a\"); console.timeEn
d(\"a\")"}).then(next); | |
18 }, | |
19 | |
20 function consoleLogWithCommaAsSeparator(next) { | |
21 InspectorTest.log("set locale to fr_CA.UTF-8 (has comma as separator)"); | |
22 setlocale("fr_CA.UTF-8"); | |
23 Protocol.Runtime.evaluate({ expression: "console.log(239) "}).then(next); | |
24 }, | |
25 | |
26 function consoleTimeWithCommaAfterConsoleLog(next) { | |
27 InspectorTest.log("set locale to fr_CA.UTF-8 (has comma as separator)"); | |
28 setlocale("fr_CA.UTF-8"); | |
29 Protocol.Runtime.evaluate({ expression: "console.log(239) "}) | |
30 .then(() => Protocol.Runtime.evaluate({ expression: "console.time(\"a\");
console.timeEnd(\"a\")"})) | |
31 .then(next); | |
32 } | |
33 ]); | |
34 | |
35 function dumpConsoleApiCalled(message) { | |
36 var firstArg = message.params.args[0]; | |
37 if (firstArg.type === "string") | |
38 firstArg.value = firstArg.value.replace(/[0-9]+/g, "x"); | |
39 InspectorTest.logMessage(message); | |
40 } | |
OLD | NEW |