mirror of
https://github.com/servo/servo.git
synced 2025-10-01 00:59:15 +01:00
Implement a URL-generic type for list-style-image
This should fix the following two "expected to fail" tests: - getComputedStyle(elem) for url() listStyleImage uses the resolved URL and elem.style uses the original URL - getComputedStyle(elem) for url() listStyle uses the resolved URL and elem.style uses the original URL
This commit is contained in:
parent
8f226f841b
commit
cc838f54e5
26 changed files with 157 additions and 124 deletions
|
@ -1,10 +0,0 @@
|
|||
[get-computed-style-for-url.html]
|
||||
type: testharness
|
||||
[getComputedStyle(elem) for url() listStyle uses the resolved URL and elem.style uses the original URL]
|
||||
expected: FAIL
|
||||
bug: https://github.com/servo/servo/issues/18015
|
||||
|
||||
[getComputedStyle(elem) for url() listStyleImage uses the resolved URL and elem.style uses the original URL]
|
||||
expected: FAIL
|
||||
bug: https://github.com/servo/servo/issues/18015
|
||||
|
|
@ -40,6 +40,29 @@
|
|||
}, `getComputedStyle(elem) for url() ${property} uses the resolved URL and elem.style uses the original URL`);
|
||||
}
|
||||
|
||||
function testNoneForProperty(property) {
|
||||
test(function() {
|
||||
var elem = document.createElement("div");
|
||||
elem.style[property] = "none";
|
||||
container.appendChild(elem);
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(elem)[computedPropertyName[property] || property],
|
||||
"none"
|
||||
);
|
||||
assert_equals(
|
||||
elem.style[computedPropertyName[property] || property],
|
||||
"none"
|
||||
);
|
||||
}, `getComputedStyle(elem) and elem.style for url() ${property} correctly return "none"`);
|
||||
}
|
||||
|
||||
testNoneForProperty("background");
|
||||
testNoneForProperty("backgroundImage");
|
||||
testNoneForProperty("borderImage");
|
||||
testNoneForProperty("listStyle");
|
||||
testNoneForProperty("listStyleImage");
|
||||
|
||||
testUrlsForProperty("backgroundImage", "test.jpg");
|
||||
testUrlsForProperty("background", "test.jpg", "no-repeat");
|
||||
testUrlsForProperty("borderImage", "test.jpg", "30 round");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue