Commit aedcbfae authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[foozzie] Mock out performance.now

Also improve suppression of Math.pow precision.

BUG=chromium:679957
NOTRY=true
TBR=mstarzinger@chromium.org,jarin@chromium.org

Change-Id: I43d0cd6f6f6d0867be9f2337990114c07c716df5
Reviewed-on: https://chromium-review.googlesource.com/438327Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#42966}
parent 5ea144af
......@@ -51,6 +51,11 @@ var __PrettyPrint = function __PrettyPrint(msg) { print(msg); };
Date = new Proxy(Date, handler);
})();
// Mock performace.now().
(function () {
performance.now = function () { return 1.2; }
})();
// Mock stack traces.
Error.prepareStackTrace = function (error, structuredStackTrace) {
return "";
......
......@@ -8,11 +8,13 @@
// problem is fixed.
// Suppress http://crbug.com/662429
var __real_Math_pow = Math.pow
Math.pow = function(a, b){
if (b < 0) {
return 0.000017;
} else {
return __real_Math_pow(a, b);
(function () {
var __real_Math_pow = Math.pow
Math.pow = function(a, b){
if (b < 0) {
return 0.000017;
} else {
return __real_Math_pow(a, b);
}
}
}
})();
......@@ -78,8 +78,6 @@ IGNORE_SOURCES = {
# TODO(machenbach): Insert a JS sentinel between the two parts, because
# comments are stripped during minimization.
IGNORE_TEST_CASES = {
'crbug.com/679957':
re.compile(r'.*performance\.now.*', re.S),
}
# Ignore by output pattern. Map from config->bug->regexp. Config '' is used
......
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