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

Unified Diff: third_party/WebKit/LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style.html

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/backgrounds/background-shorthand-with-backgroundSize-style.html
diff --git a/third_party/WebKit/LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style.html b/third_party/WebKit/LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style.html
index 85e9df4d9e68557235fa0f52faeb3f1f80277c16..25adc59617330181d790892a6c046089554258af 100644
--- a/third_party/WebKit/LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style.html
+++ b/third_party/WebKit/LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style.html
@@ -22,123 +22,123 @@ function checkComputedStyleValue() {
return (window.getComputedStyle(e, null).getPropertyValue('background') == before);
}
-e.style.background = "center / cover red url(dummy://test.png) no-repeat border-box";
-shouldBe("e.style.background", "'url(dummy://test.png) 50% 50% / cover no-repeat border-box border-box red'");
-shouldBe("e.style.backgroundSize", "'cover'");
+e.style.background = 'center / cover red url("dummy://test.png") no-repeat border-box';
+shouldBeEqualToString("e.style.background", 'url("dummy://test.png") 50% 50% / cover no-repeat border-box border-box red');
+shouldBeEqualToString("e.style.backgroundSize", 'cover');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 50% 50% / cover border-box border-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'cover'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgb(255, 0, 0) url("dummy://test.png") no-repeat scroll 50% 50% / cover border-box border-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', 'cover');
shouldBe("checkComputedStyleValue()", "true");
debug("")
-e.style.background = "red 20px / contain url(dummy://test.png) no-repeat padding-box";
-shouldBe("e.style.background", "'url(dummy://test.png) 20px 50% / contain no-repeat padding-box padding-box red'");
-shouldBe("e.style.backgroundSize", "'contain'");
+e.style.background = 'red 20px / contain url("dummy://test.png") no-repeat padding-box';
+shouldBeEqualToString("e.style.background", 'url("dummy://test.png") 20px 50% / contain no-repeat padding-box padding-box red');
+shouldBeEqualToString("e.style.backgroundSize", 'contain');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 20px 50% / contain padding-box padding-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'contain'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgb(255, 0, 0) url("dummy://test.png") no-repeat scroll 20px 50% / contain padding-box padding-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', 'contain');
shouldBe("checkComputedStyleValue()", "true");
debug("")
-e.style.background = "red url(dummy://test.png) 50px 60px / 50% 75% no-repeat";
-shouldBe("e.style.background", "'url(dummy://test.png) 50px 60px / 50% 75% no-repeat red'");
-shouldBe("e.style.backgroundSize", "'50% 75%'");
+e.style.background = 'red url("dummy://test.png") 50px 60px / 50% 75% no-repeat';
+shouldBeEqualToString("e.style.background", 'url("dummy://test.png") 50px 60px / 50% 75% no-repeat red');
+shouldBeEqualToString("e.style.backgroundSize", '50% 75%');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 50px 60px / 50% 75% padding-box border-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'50% 75%'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgb(255, 0, 0) url("dummy://test.png") no-repeat scroll 50px 60px / 50% 75% padding-box border-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', '50% 75%');
shouldBe("checkComputedStyleValue()", "true");
debug("")
-e.style.background = "red url(dummy://test.png) repeat top left / 100px 200px border-box content-box";
-shouldBe("e.style.background", "'url(dummy://test.png) 0% 0% / 100px 200px repeat border-box content-box red'");
-shouldBe("e.style.backgroundSize", "'100px 200px'");
+e.style.background = 'red url("dummy://test.png") repeat top left / 100px 200px border-box content-box';
+shouldBeEqualToString("e.style.background", 'url("dummy://test.png") 0% 0% / 100px 200px repeat border-box content-box red');
+shouldBeEqualToString("e.style.backgroundSize", '100px 200px');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / 100px 200px border-box content-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'100px 200px'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgb(255, 0, 0) url("dummy://test.png") repeat scroll 0% 0% / 100px 200px border-box content-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', '100px 200px');
shouldBe("checkComputedStyleValue()", "true");
debug("")
-e.style.background = "red url(dummy://test.png) repeat 50% / auto auto content-box padding-box";
-shouldBe("e.style.background", "'url(dummy://test.png) 50% 50% / auto repeat content-box padding-box red'");
-shouldBe("e.style.backgroundSize", "'auto'");
+e.style.background = 'red url("dummy://test.png") repeat 50% / auto auto content-box padding-box';
+shouldBeEqualToString("e.style.background", 'url("dummy://test.png") 50% 50% / auto repeat content-box padding-box red');
+shouldBeEqualToString("e.style.backgroundSize", 'auto');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 50% 50% / auto content-box padding-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'auto'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgb(255, 0, 0) url("dummy://test.png") repeat scroll 50% 50% / auto content-box padding-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', 'auto');
shouldBe("checkComputedStyleValue()", "true");
debug("")
-e.style.background = "url(dummy://test.png) red 50px 60px / 50% no-repeat fixed";
-shouldBe("e.style.background", "'url(dummy://test.png) 50px 60px / 50% no-repeat fixed red'");
-shouldBe("e.style.backgroundSize", "'50%'");
+e.style.background = 'url("dummy://test.png") red 50px 60px / 50% no-repeat fixed';
+shouldBeEqualToString("e.style.background", 'url("dummy://test.png") 50px 60px / 50% no-repeat fixed red');
+shouldBeEqualToString("e.style.backgroundSize", '50%');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 50px 60px / 50% padding-box border-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'50%'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgb(255, 0, 0) url("dummy://test.png") no-repeat fixed 50px 60px / 50% padding-box border-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', '50%');
shouldBe("checkComputedStyleValue()", "true");
debug("")
-e.style.background = "red repeat scroll padding-box border-box top left / 100px url(dummy://test.png)";
-shouldBe("e.style.background", "'url(dummy://test.png) 0% 0% / 100px repeat scroll padding-box border-box red'");
-shouldBe("e.style.backgroundSize", "'100px'");
+e.style.background = 'red repeat scroll padding-box border-box top left / 100px url("dummy://test.png")';
+shouldBeEqualToString("e.style.background", 'url("dummy://test.png") 0% 0% / 100px repeat scroll padding-box border-box red');
+shouldBeEqualToString("e.style.backgroundSize", '100px');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / 100px padding-box border-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'100px'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgb(255, 0, 0) url("dummy://test.png") repeat scroll 0% 0% / 100px padding-box border-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', '100px');
shouldBe("checkComputedStyleValue()", "true");
debug("")
-e.style.background = "50% / auto fixed url(dummy://test.png) repeat content-box red";
-shouldBe("e.style.background", "'url(dummy://test.png) 50% 50% / auto repeat fixed content-box content-box red'");
-shouldBe("e.style.backgroundSize", "'auto'");
+e.style.background = '50% / auto fixed url("dummy://test.png") repeat content-box red';
+shouldBeEqualToString("e.style.background", 'url("dummy://test.png") 50% 50% / auto repeat fixed content-box content-box red');
+shouldBeEqualToString("e.style.backgroundSize", 'auto');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) repeat fixed 50% 50% / auto content-box content-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'auto'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgb(255, 0, 0) url("dummy://test.png") repeat fixed 50% 50% / auto content-box content-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', 'auto');
shouldBe("checkComputedStyleValue()", "true");
debug("")
e.style.background = "top left / 50%";
-shouldBe("e.style.background", "'0% 0% / 50%'");
-shouldBe("e.style.backgroundSize", "'50%'");
+shouldBeEqualToString("e.style.background", '0% 0% / 50%');
+shouldBeEqualToString("e.style.backgroundSize", '50%');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgba(0, 0, 0, 0) none repeat scroll 0% 0% / 50% padding-box border-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'50%'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgba(0, 0, 0, 0) none repeat scroll 0% 0% / 50% padding-box border-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', '50%');
shouldBe("checkComputedStyleValue()", "true");
debug("")
e.style.background = "red fixed";
-shouldBe("e.style.background", "'fixed red'");
-shouldBe("e.style.backgroundSize", "'initial'");
+shouldBeEqualToString("e.style.background", 'fixed red');
+shouldBeEqualToString("e.style.backgroundSize", 'initial');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) none repeat fixed 0% 0% / auto padding-box border-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'auto'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgb(255, 0, 0) none repeat fixed 0% 0% / auto padding-box border-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', 'auto');
shouldBe("checkComputedStyleValue()", "true");
debug("")
e.style.background = "";
-e.style.background = "red / cover url(dummy://test.png) repeat";
-shouldBe("e.style.background", "''");
-shouldBe("e.style.backgroundSize", "''");
+e.style.background = 'red / cover url("dummy://test.png") repeat';
+shouldBeEqualToString("e.style.background", '');
+shouldBeEqualToString("e.style.backgroundSize", '');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'auto'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', 'auto');
shouldBe("checkComputedStyleValue()", "true");
debug("")
e.style.background = "";
-e.style.background = "red url(dummy://test.png) repeat 25px / contain contain";
-shouldBe("e.style.background", "''");
-shouldBe("e.style.backgroundSize", "''");
+e.style.background = 'red url("dummy://test.png") repeat 25px / contain contain';
+shouldBeEqualToString("e.style.background", '');
+shouldBeEqualToString("e.style.backgroundSize", '');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'auto'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', 'auto');
shouldBe("checkComputedStyleValue()", "true");
debug("")
e.style.background = "";
-e.style.background = "red top left / 100px cover url(dummy://test.png) repeat";
-shouldBe("e.style.background", "''");
-shouldBe("e.style.backgroundSize", "''");
+e.style.background = 'red top left / 100px cover url("dummy://test.png") repeat';
+shouldBeEqualToString("e.style.background", '');
+shouldBeEqualToString("e.style.backgroundSize", '');
shouldBe("checkStyle()", "true");
-shouldBe('computedStyle.getPropertyValue("background")', "'rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box'");
-shouldBe('computedStyle.getPropertyValue("background-size")', "'auto'");
+shouldBeEqualToString('computedStyle.getPropertyValue("background")', 'rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box');
+shouldBeEqualToString('computedStyle.getPropertyValue("background-size")', 'auto');
shouldBe("checkComputedStyleValue()", "true");
debug("")
</script>

Powered by Google App Engine
This is Rietveld 408576698