mirror of
https://github.com/servo/servo.git
synced 2025-06-12 18:34:39 +00:00
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.
25 lines
854 B
HTML
25 lines
854 B
HTML
<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>
|