| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 Protocol.Runtime.enable(); | 5 Protocol.Runtime.enable(); |
| 6 | 6 |
| 7 Protocol.Runtime.onConsoleAPICalled(InspectorTest.logMessage); | 7 Protocol.Runtime.onConsoleAPICalled(InspectorTest.logMessage); |
| 8 | 8 |
| 9 InspectorTest.runTestSuite([ | 9 InspectorTest.runTestSuite([ |
| 10 function consoleLogWithDefaultLocale(next) { | 10 function consoleLogWithDefaultLocale(next) { |
| 11 Protocol.Runtime.evaluate({ expression: "console.log(239) "}).then(next); | 11 Protocol.Runtime.evaluate({ expression: "console.log(239) "}).then(next); |
| 12 }, | 12 }, |
| 13 | 13 |
| 14 function consoleTimeWithCommaAsSeparator(next) { | 14 function consoleTimeWithCommaAsSeparator(next) { |
| 15 InspectorTest.log("set locale to fr_CA.UTF-8 (has comma as separator)"); | 15 InspectorTest.log("set locale to fr_CA.UTF-8 (has comma as separator)"); |
| 16 setlocale("fr_CA.UTF-8"); | 16 utils.setlocale("fr_CA.UTF-8"); |
| 17 setCurrentTimeMSForTest(0.0); | 17 utils.setCurrentTimeMSForTest(0.0); |
| 18 Protocol.Runtime.evaluate({ expression: "console.time(\"a\");"}) | 18 Protocol.Runtime.evaluate({ expression: "console.time(\"a\");"}) |
| 19 .then(() => setCurrentTimeMSForTest(0.001)) | 19 .then(() => utils.setCurrentTimeMSForTest(0.001)) |
| 20 .then(() => Protocol.Runtime.evaluate({ expression: "console.timeEnd(\"a\"
);"})) | 20 .then(() => Protocol.Runtime.evaluate({ expression: "console.timeEnd(\"a\"
);"})) |
| 21 .then(next); | 21 .then(next); |
| 22 }, | 22 }, |
| 23 | 23 |
| 24 function consoleLogWithCommaAsSeparator(next) { | 24 function consoleLogWithCommaAsSeparator(next) { |
| 25 InspectorTest.log("set locale to fr_CA.UTF-8 (has comma as separator)"); | 25 InspectorTest.log("set locale to fr_CA.UTF-8 (has comma as separator)"); |
| 26 setlocale("fr_CA.UTF-8"); | 26 utils.setlocale("fr_CA.UTF-8"); |
| 27 Protocol.Runtime.evaluate({ expression: "console.log(239) "}).then(next); | 27 Protocol.Runtime.evaluate({ expression: "console.log(239) "}).then(next); |
| 28 }, | 28 }, |
| 29 | 29 |
| 30 function consoleTimeWithCommaAfterConsoleLog(next) { | 30 function consoleTimeWithCommaAfterConsoleLog(next) { |
| 31 InspectorTest.log("set locale to fr_CA.UTF-8 (has comma as separator)"); | 31 InspectorTest.log("set locale to fr_CA.UTF-8 (has comma as separator)"); |
| 32 setlocale("fr_CA.UTF-8"); | 32 utils.setlocale("fr_CA.UTF-8"); |
| 33 Protocol.Runtime.evaluate({ expression: "console.log(239) "}) | 33 Protocol.Runtime.evaluate({ expression: "console.log(239) "}) |
| 34 .then(() => setCurrentTimeMSForTest(0.0)) | 34 .then(() => utils.setCurrentTimeMSForTest(0.0)) |
| 35 .then(() => Protocol.Runtime.evaluate({ expression: "console.time(\"a\");"
})) | 35 .then(() => Protocol.Runtime.evaluate({ expression: "console.time(\"a\");"
})) |
| 36 .then(() => setCurrentTimeMSForTest(0.001)) | 36 .then(() => utils.setCurrentTimeMSForTest(0.001)) |
| 37 .then(() => Protocol.Runtime.evaluate({ expression: "console.timeEnd(\"a\"
);"})) | 37 .then(() => Protocol.Runtime.evaluate({ expression: "console.timeEnd(\"a\"
);"})) |
| 38 .then(next); | 38 .then(next); |
| 39 } | 39 } |
| 40 ]); | 40 ]); |
| OLD | NEW |