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