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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/css/CSSImageValue.cpp » ('j') | Source/core/css/CSSImageValue.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4
5 <style>
6 div { background-image: url(images.jpg); }
7 </style>
8
9 <body>
10 </body>
11
12 <script>
13 var rulesForCssText = function (styleContent) {
14 var doc = document.implementation.createHTMLDocument(""),
15 styleElement = document.createElement("style");
16
17 styleElement.textContent = styleContent;
18 // the style will only parsed once it is added to a document
19 doc.body.appendChild(styleElement);
20
21 return styleElement.sheet.cssRules;
22 };
23
24 var cssRulesToText = function (cssRules) {
25 var cssText = "";
26
27 Array.prototype.slice.call(cssRules).forEach(function (rule) {
28 cssText += rule.cssText;
29 });
30 return cssText;
31 };
32
33 addEventListener("load", function() {
34 test(function() {
rune 2015/09/08 23:57:28 Indentation looks inconsistent. Sometimes 8, most
nainar 2015/09/09 00:30:30 Done. On 2015/09/08 at 23:57:28, rune wrote:
35 var styles = document.getElementsByTagName("style"),
36 cssText = styles[styles.length-1].textContent.trim();
37 assert_equals(cssRulesToText(rulesForCssText(cssText)), cssT ext);
38 }, 'Testing URLs in CSS');
39 }, false);
40 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/CSSImageValue.cpp » ('j') | Source/core/css/CSSImageValue.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698