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

Unified Diff: LayoutTests/fast/css/css-imagevalue-url.html

Issue 1306283006: BackgroundImage incorrectly returns empty url() when created on-the-fly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: As per feedback 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: LayoutTests/fast/css/css-imagevalue-url.html
diff --git a/LayoutTests/fast/css/css-imagevalue-url.html b/LayoutTests/fast/css/css-imagevalue-url.html
new file mode 100644
index 0000000000000000000000000000000000000000..76fba5a288f2cdd7d21edca063735ccd5d772fbf
--- /dev/null
+++ b/LayoutTests/fast/css/css-imagevalue-url.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+
+<script>
+ addEventListener("load", function() {
alancutter (OOO until 2018) 2015/09/21 00:57:47 Is it necessary to wait for the load event? A comm
nainar 2015/09/21 01:27:36 Done.
+ test(function() {
+ var cssText = 'div { background-image: url(images.jpg); }';
+
+ var doc = document.implementation.createHTMLDocument("");
+ var styleElement = document.createElement("style");
+ styleElement.textContent = cssText;
+ doc.body.appendChild(styleElement);
+ var cssRules = styleElement.sheet.cssRules;
+
+ var compareCSSText = "";
+ Array.prototype.slice.call(cssRules).forEach(function (rule) {
+ compareCSSText += rule.cssText;
+ });
alancutter (OOO until 2018) 2015/09/21 00:57:47 There should only be one rule (you can assert this
nainar 2015/09/21 01:27:36 Done.
+
+ assert_equals(compareCSSText, cssText);
+ }, 'Testing serialization and round trip of URLs in CSS');
+ }, false);
+</script>

Powered by Google App Engine
This is Rietveld 408576698