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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/script-tests/image-set-setting.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: Fix interpolation tests 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/fast/css/script-tests/image-set-setting.js
diff --git a/third_party/WebKit/LayoutTests/fast/css/script-tests/image-set-setting.js b/third_party/WebKit/LayoutTests/fast/css/script-tests/image-set-setting.js
index 1488e25648559cc080e301dbd93909b16141463a..cc5718fcdb6e0bba275882453475833bdba84321 100644
--- a/third_party/WebKit/LayoutTests/fast/css/script-tests/image-set-setting.js
+++ b/third_party/WebKit/LayoutTests/fast/css/script-tests/image-set-setting.js
@@ -10,34 +10,30 @@ function testComputedStyle(property, fullRule)
return computedValue;
}
-function testImageSetRule(description, property, rule, expected)
+function testImageSetRule(description, rule, expected)
{
debug("");
debug(description + " : " + rule);
- var fullRule = "-webkit-image-set(" + rule + ")";
- shouldBeEqualToString('testComputedStyle("' + property + '", "' + fullRule + '")', fullRule);
+ var fullRule = '-webkit-image-set(' + rule + ')';
+ var call = 'testComputedStyle(`background-image`, `' + fullRule + '`)';
+ shouldBeEqualToString(call, fullRule);
}
testImageSetRule("Single value for background-image",
- "background-image",
- "url(http://www.webkit.org/a) 1x");
+ 'url("http://www.webkit.org/a") 1x');
testImageSetRule("Multiple values for background-image",
- "background-image",
- "url(http://www.webkit.org/a) 1x, url(http://www.webkit.org/b) 2x");
+ 'url("http://www.webkit.org/a") 1x, url("http://www.webkit.org/b") 2x');
testImageSetRule("Multiple values for background-image, out of order",
- "background-image",
- "url(http://www.webkit.org/c) 3x, url(http://www.webkit.org/b) 2x, url(http://www.webkit.org/a) 1x");
+ 'url("http://www.webkit.org/c") 3x, url("http://www.webkit.org/b") 2x, url("http://www.webkit.org/a") 1x');
testImageSetRule("Duplicate values for background-image",
- "background-image",
- "url(http://www.webkit.org/c) 1x, url(http://www.webkit.org/b) 2x, url(http://www.webkit.org/a) 1x");
+ 'url("http://www.webkit.org/c") 1x, url("http://www.webkit.org/b") 2x, url("http://www.webkit.org/a") 1x');
testImageSetRule("Fractional values for background-image",
- "background-image",
- "url(http://www.webkit.org/c) 0.2x, url(http://www.webkit.org/b) 2.3x, url(http://www.webkit.org/a) 12.3456x");
+ 'url("http://www.webkit.org/c") 0.2x, url("http://www.webkit.org/b") 2.3x, url("http://www.webkit.org/a") 12.3456x');
// FIXME: We should also be testing the behavior of negative values somewhere, but it's currently
// broken. http://wkb.ug/100132

Powered by Google App Engine
This is Rietveld 408576698