| 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 let {session, contextGroup, Protocol} = InspectorTest.start('Tests that protocol
works with different locales'); |
| 6 |
| 5 Protocol.Runtime.enable(); | 7 Protocol.Runtime.enable(); |
| 6 | 8 |
| 7 Protocol.Runtime.onConsoleAPICalled(InspectorTest.logMessage); | 9 Protocol.Runtime.onConsoleAPICalled(InspectorTest.logMessage); |
| 8 | 10 |
| 9 InspectorTest.runTestSuite([ | 11 InspectorTest.runTestSuite([ |
| 10 function consoleLogWithDefaultLocale(next) { | 12 function consoleLogWithDefaultLocale(next) { |
| 11 Protocol.Runtime.evaluate({ expression: "console.log(239) "}).then(next); | 13 Protocol.Runtime.evaluate({ expression: "console.log(239) "}).then(next); |
| 12 }, | 14 }, |
| 13 | 15 |
| 14 function consoleTimeWithCommaAsSeparator(next) { | 16 function consoleTimeWithCommaAsSeparator(next) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 31 InspectorTest.log("set locale to fr_CA.UTF-8 (has comma as separator)"); | 33 InspectorTest.log("set locale to fr_CA.UTF-8 (has comma as separator)"); |
| 32 utils.setlocale("fr_CA.UTF-8"); | 34 utils.setlocale("fr_CA.UTF-8"); |
| 33 Protocol.Runtime.evaluate({ expression: "console.log(239) "}) | 35 Protocol.Runtime.evaluate({ expression: "console.log(239) "}) |
| 34 .then(() => utils.setCurrentTimeMSForTest(0.0)) | 36 .then(() => utils.setCurrentTimeMSForTest(0.0)) |
| 35 .then(() => Protocol.Runtime.evaluate({ expression: "console.time(\"a\");"
})) | 37 .then(() => Protocol.Runtime.evaluate({ expression: "console.time(\"a\");"
})) |
| 36 .then(() => utils.setCurrentTimeMSForTest(0.001)) | 38 .then(() => utils.setCurrentTimeMSForTest(0.001)) |
| 37 .then(() => Protocol.Runtime.evaluate({ expression: "console.timeEnd(\"a\"
);"})) | 39 .then(() => Protocol.Runtime.evaluate({ expression: "console.timeEnd(\"a\"
);"})) |
| 38 .then(next); | 40 .then(next); |
| 39 } | 41 } |
| 40 ]); | 42 ]); |
| OLD | NEW |