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

Unified Diff: third_party/WebKit/LayoutTests/resources/testharness.js

Issue 2022203002: Import wpt@d510ec1abc30eee4c855c13842bc2f0dfa791f8b (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Message changed by testharness.js update Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/resources/testharness.js
diff --git a/third_party/WebKit/LayoutTests/resources/testharness.js b/third_party/WebKit/LayoutTests/resources/testharness.js
index 52b65ddf19c8aabe4115304bcf80f70e2cf942c1..a13cacc8e2c3d20954aa4cadb9e1dab102d820e6 100644
--- a/third_party/WebKit/LayoutTests/resources/testharness.js
+++ b/third_party/WebKit/LayoutTests/resources/testharness.js
@@ -830,7 +830,7 @@ policies and contribution forms [3].
/* falls through */
default:
try {
- return typeof val + ' "' + truncate(String(val), 60) + '"';
+ return typeof val + ' "' + truncate(String(val), 1000) + '"';
} catch(e) {
return ("[stringifying object threw " + String(e) +
" with type " + String(typeof e) + "]");
@@ -2464,7 +2464,9 @@ policies and contribution forms [3].
// Create a pattern to match stack frames originating within testharness.js. These include the
// script URL, followed by the line/col (e.g., '/resources/testharness.js:120:21').
- var re = new RegExp((get_script_url() || "\\btestharness.js") + ":\\d+:\\d+");
+ // Escape the URL per http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
+ // in case it contains RegExp characters.
+ var re = new RegExp((get_script_url().replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') || "\\btestharness.js") + ":\\d+:\\d+");
// Some browsers include a preamble that specifies the type of the error object. Skip this by
// advancing until we find the first stack frame originating from testharness.js.

Powered by Google App Engine
This is Rietveld 408576698