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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/background-image-url-setproperty.html

Issue 2622993003: Compare relative url if absolute urls are empty for CSSImageValue (Closed)
Patch Set: modified tc Created 3 years, 11 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 | « AUTHORS ('k') | third_party/WebKit/Source/core/css/CSSImageValue.cpp » ('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-url-setproperty.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/background-image-url-setproperty.html b/third_party/WebKit/LayoutTests/fast/css/background-image-url-setproperty.html
new file mode 100644
index 0000000000000000000000000000000000000000..d3b579043cecaa31152e2d61c0dd76a95e146cbd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/background-image-url-setproperty.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+ var doc = document.implementation.createHTMLDocument("");
+ doc.head.innerHTML = "<style>span { background: url(fail) }</style>";
+ var rule = doc.head.firstChild.sheet.cssRules[0];
+
+ test(() => {
+ assert_equals(rule.style.background, 'url("fail")');
+ }, "Check initial background url.");
+
+ test(() => {
+ rule.style.setProperty("background", "url(pass)");
+ assert_equals(rule.style.background, 'url("pass")');
+ }, "Setting background to a relative url should change its value.");
+</script>
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/Source/core/css/CSSImageValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698