Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: test/inspector/runtime/protocol-works-with-different-locale.js

Issue 2410933002: [inspector] fix timestamp formatting with non C locales (Closed)
Patch Set: a Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « test/inspector/inspector-test.cc ('k') | test/inspector/runtime/protocol-works-with-different-locale-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698