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

Unified Diff: LayoutTests/fast/css/getComputedStyle-relativeURL.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: 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/getComputedStyle-relativeURL.html
diff --git a/LayoutTests/fast/css/getComputedStyle-relativeURL.html b/LayoutTests/fast/css/getComputedStyle-relativeURL.html
new file mode 100644
index 0000000000000000000000000000000000000000..c35dd05cf04b044fe3d24b45a6b56e977d0622f0
--- /dev/null
+++ b/LayoutTests/fast/css/getComputedStyle-relativeURL.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+
+<div id="target"></div>
+
+<script>
+ target.style.backgroundImage = "-webkit-cross-fade(url(images1.jpg), url(images2.jpg), 0.5)";
+ test(function() {
+ var expected = "-webkit-cross-fade(url(" + location.href.replace('getComputedStyle-relativeURL.html', 'images1.jpg') + "), url(" + location.href.replace('getComputedStyle-relativeURL.html', 'images2.jpg') + "), 0.5)";
+ assert_equals(getComputedStyle(target).backgroundImage, expected);
+ assert_equals(target.style.backgroundImage, "-webkit-cross-fade(url(images1.jpg), url(images2.jpg), 0.5)");
+ }, 'Testing that getComputedStyle.backgroundImage returns absolute URLs and style.backgroundImage returns relative URLs');
+</script>
« no previous file with comments | « LayoutTests/fast/css/css-imagevalue-url.html ('k') | LayoutTests/fast/css/parse-border-image-repeat-null-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698