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

Side by Side 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: add a test case 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/background-image-url-setproperty-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <p id="result">
rune 2017/01/11 14:13:13 Test should be strict unless specifically testing
2 </p>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
6
7 var rulesForCssTextFromBrowser = function (styleContent) {
8 var doc = document.implementation.createHTMLDocument(""),
9 styleElement = document.createElement("style"),
10 rules;
11
12 styleElement.textContent = styleContent;
13 // the style will only be parsed once it is added to a document
14 doc.body.appendChild(styleElement);
15 rules = styleElement.sheet.cssRules;
16
17 return Array.prototype.slice.call(rules);
18 };
19
20 var rules = rulesForCssTextFromBrowser("span { background: url('aaaaaaa'); } ");
21 var rule = rules[0];
22 rule.style.setProperty('background', 'url("bbbbbbb")', '');
23 var url = rule.style.getPropertyValue('background');
24 document.getElementById("result").innerText = url == "url(\"bbbbbbb\")" ? "P ASS" : "FAIL";
25 </script>
rune 2017/01/11 14:13:14 We prefer using testharness.js. Then you should dr
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/background-image-url-setproperty-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698