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

Unified Diff: third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js

Issue 1363233003: Make sure <url>s are being serialized according to spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Layout test readability Created 5 years, 3 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/animations/interpolation/resources/interpolation-test.js
diff --git a/third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js b/third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js
index 19ce36406b93906c3528d22a15ab209181b53c3b..b464ea256c9283e4c1e6502bc39cbc16d42f953f 100644
--- a/third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js
+++ b/third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js
@@ -210,7 +210,11 @@
var matches = value.match(/url\([^\)]*\)/g);
if (matches !== null) {
for (var i = 0; i < matches.length; ++i) {
- var url = /url\(([^\)]*)\)/g.exec(matches[i])[1];
+ var url;
+ if (/url\("([^\)]*)"\)/g.test(matches[i]))
Timothy Loh 2015/09/25 14:22:05 Are you sure it doesn't work if we just update the
nainar 2015/09/28 01:19:17 Done.
+ url = /url\("([^\)]*)"\)/g.exec(matches[i])[1];
+ else
+ url = /url\(([^\)]*)\)/g.exec(matches[i])[1];
anchor.href = url;
anchor.pathname = '...' + anchor.pathname.substring(anchor.pathname.lastIndexOf('/'));
value = value.replace(matches[i], 'url(' + anchor.href + ')');

Powered by Google App Engine
This is Rietveld 408576698