mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Add GetPropertyPriority to CSSStyleDeclaration
Tweak getPropertyPriority to match recommendations Adding Tests for Style Priority Use else if Adding Content Test for GetPropertyPriority Revert "Adding Tests for Style Priority" This reverts commit 8666a37f833b06c3e43f27acd8a9678e94425e55.
This commit is contained in:
parent
49f2c6974d
commit
674fe910c1
4 changed files with 68 additions and 1 deletions
25
tests/content/test_getPropertyPriority.html
Normal file
25
tests/content/test_getPropertyPriority.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<html>
|
||||
<head>
|
||||
<script src="harness.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="important" style='outline-color: #111 !important; outline-style: solid !important; outline-width: 1px !important; background-color: #222 !important; color: #FFF'></div>
|
||||
<script>
|
||||
var properties = {
|
||||
'outline-color': 'important',
|
||||
'outline-style': 'important',
|
||||
'outline-width': 'important',
|
||||
'outline': 'important',
|
||||
'background-color': 'important',
|
||||
'background': '',
|
||||
'color': '',
|
||||
};
|
||||
var elem = document.getElementById('important')
|
||||
for (var property in Object.keys(properties)) {
|
||||
var name = Object.keys(properties)[property];
|
||||
var value = properties[name];
|
||||
is(elem.style.getPropertyPriority(name), value, name + ' priority');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue