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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/background-image-size-serialization.html

Issue 1659903002: Fix background-size serializing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch for landing Created 4 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/background-image-size-serialization-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/background-image-size-serialization.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/background-image-size-serialization.html b/third_party/WebKit/LayoutTests/fast/css/background-image-size-serialization.html
new file mode 100644
index 0000000000000000000000000000000000000000..8a90873e2c7ee50aacec9eafcae43173b519170e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/background-image-size-serialization.html
@@ -0,0 +1,35 @@
+<script src="../../resources/js-test.js"></script>
+<style>
+.noposition
+{
+ background: url("foo.png");
+ background-size: contain;
+}
+.position1
+{
+ background: url("foo.png");
+ background-position: 1px;
+ background-size: contain;
+}
+.position2
+{
+ background: url("foo.png");
+ background-position-x: 1px;
+ background-size: contain;
+}
+.position3
+{
+ background: url("foo.png");
+ background-position: 1px 1px;
+ background-size: contain;
+}
+</style>
+<script>
+var cssRules = document.styleSheets[1].cssRules;
+
+shouldBe('cssRules.length', '4');
+shouldBeEqualToString('cssRules[0].cssText', '.noposition { background: url("foo.png") 0% 0% / contain; }');
+shouldBeEqualToString('cssRules[1].cssText', '.position1 { background: url("foo.png") 1px 50% / contain; }');
+shouldBeEqualToString('cssRules[2].cssText', '.position2 { background: url("foo.png") 1px / contain; }');
+shouldBeEqualToString('cssRules[3].cssText', '.position3 { background: url("foo.png") 1px 1px / contain; }');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/background-image-size-serialization-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698