Commit a25dce8a authored by Varun Varada's avatar Varun Varada Committed by Commit Bot

Fix console time format error

There should be a space between the quantity and the unit symbol
as per the SI, so this commit fixes this issue.

Change-Id: I3356942391d96906f3e3840c7bb802e10f29eb4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2190230
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67789}
parent 288b545a
......@@ -196,6 +196,7 @@ Tobias Burnus <burnus@net-b.de>
Tobias Nießen <tniessen@tnie.de>
Ujjwal Sharma <usharma1998@gmail.com>
Vadim Gorbachev <bmsdave@gmail.com>
Varun Varada <varuncvarada@gmail.com>
Victor Costan <costan@gmail.com>
Vlad Burlik <vladbph@gmail.com>
Vladimir Krivosheev <develar@gmail.com>
......@@ -213,4 +214,4 @@ Zhao Jiazhong <kyslie3100@gmail.com>
Zhongping Wang <kewpie.w.zp@gmail.com>
柳荣一 <admin@web-tinker.com>
Yanbo Li <lybvinci@gmail.com>
Gilang Mentari Hamidy <gilang@hamidy.net>
\ No newline at end of file
Gilang Mentari Hamidy <gilang@hamidy.net>
......@@ -411,7 +411,7 @@ static void timeEndFunction(const v8::debug::ConsoleCallArguments& info,
helper.consoleMessageStorage()->timeEnd(helper.contextId(), title);
}
String16 message =
protocolTitle + ": " + String16::fromDouble(elapsed) + "ms";
protocolTitle + ": " + String16::fromDouble(elapsed) + " ms";
if (timeLog)
helper.reportCallAndReplaceFirstArgument(ConsoleAPIType::kLog, message);
else
......
Checks format of console.timeEnd output
Running test: zero
js: 0ms
timeEnd: 0ms
js: 0 ms
timeEnd: 0 ms
Running test: verySmall
js: 1e-15ms
timeEnd: 1e-15ms
js: 1e-15 ms
timeEnd: 1e-15 ms
Running test: small
js: 0.001ms
timeEnd: 0.001ms
js: 0.001 ms
timeEnd: 0.001 ms
Running test: regular
js: 1.2345ms
timeEnd: 1.2345ms
js: 1.2345 ms
timeEnd: 1.2345 ms
Running test: big
js: 10000.2345ms
timeEnd: 10000.2345ms
js: 10000.2345 ms
timeEnd: 10000.2345 ms
Running test: veryBig
js: 1000000000000000.2ms
timeEnd: 1000000000000000.2ms
js: 1000000000000000.2 ms
timeEnd: 1000000000000000.2 ms
Running test: huge
js: 1e+42ms
timeEnd: 1e+42ms
js: 1e+42 ms
timeEnd: 1e+42 ms
Running test: undefinedAsLabel
js: 1ms
default: 1ms
js: 1 ms
default: 1 ms
Running test: emptyAsLabel
js: 1ms
default: 1ms
js: 1 ms
default: 1 ms
......@@ -43,7 +43,7 @@ async function checkInterval(time, label) {
label = label === undefined ? '\'timeEnd\'' : label;
utils.setCurrentTimeMSForTest(0.0);
Protocol.Runtime.evaluate({
expression: `console.log('js: ' + ${time} + 'ms')`
expression: `console.log('js: ' + ${time} + ' ms')`
});
await Protocol.Runtime.evaluate({expression: `console.time(${label})`});
utils.setCurrentTimeMSForTest(time);
......
......@@ -2,7 +2,7 @@ Test for console.timeLog
[
[0] : {
type : string
value : 42: 1ms
value : 42: 1 ms
}
[1] : {
type : string
......@@ -12,7 +12,7 @@ Test for console.timeLog
[
[0] : {
type : string
value : 42: 2ms
value : 42: 2 ms
}
[1] : {
type : string
......@@ -26,7 +26,7 @@ Test for console.timeLog
[
[0] : {
type : string
value : 42: 3ms
value : 42: 3 ms
}
]
[
......
......@@ -13,10 +13,10 @@ Checks that repeated console.time do not reset
callFrames : [
[0] : {
columnNumber : 8
functionName :
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
url :
}
]
}
......@@ -30,7 +30,7 @@ Checks that repeated console.time do not reset
args : [
[0] : {
type : string
value : a: 2ms
value : a: 2 ms
}
]
executionContextId : <executionContextId>
......@@ -38,10 +38,10 @@ Checks that repeated console.time do not reset
callFrames : [
[0] : {
columnNumber : 8
functionName :
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
url :
}
]
}
......@@ -63,10 +63,10 @@ Checks that repeated console.time do not reset
callFrames : [
[0] : {
columnNumber : 8
functionName :
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
url :
}
]
}
......
......@@ -16,10 +16,10 @@ Running test: consoleLogWithDefaultLocale
callFrames : [
[0] : {
columnNumber : 8
functionName :
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
url :
}
]
}
......@@ -36,7 +36,7 @@ set locale to fr_CA.UTF-8 (has comma as separator)
args : [
[0] : {
type : string
value : a: 0.001ms
value : a: 0.001 ms
}
]
executionContextId : <executionContextId>
......@@ -44,10 +44,10 @@ set locale to fr_CA.UTF-8 (has comma as separator)
callFrames : [
[0] : {
columnNumber : 8
functionName :
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
url :
}
]
}
......@@ -73,10 +73,10 @@ set locale to fr_CA.UTF-8 (has comma as separator)
callFrames : [
[0] : {
columnNumber : 8
functionName :
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
url :
}
]
}
......@@ -102,10 +102,10 @@ set locale to fr_CA.UTF-8 (has comma as separator)
callFrames : [
[0] : {
columnNumber : 8
functionName :
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
url :
}
]
}
......@@ -119,7 +119,7 @@ set locale to fr_CA.UTF-8 (has comma as separator)
args : [
[0] : {
type : string
value : a: 0.001ms
value : a: 0.001 ms
}
]
executionContextId : <executionContextId>
......@@ -127,10 +127,10 @@ set locale to fr_CA.UTF-8 (has comma as separator)
callFrames : [
[0] : {
columnNumber : 8
functionName :
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
url :
}
]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment