mirror of
https://github.com/servo/servo.git
synced 2025-09-04 12:08:21 +01:00
Update web-platform-tests to revision be5419e845d39089ba6dc338c1bd0fa279108317
This commit is contained in:
parent
aa199307c8
commit
2b6f573eb5
3440 changed files with 109438 additions and 41750 deletions
|
@ -8,15 +8,6 @@
|
|||
<style media="screen, print" id="test-style"></style>
|
||||
<script src="/resources/testharness.js"/>
|
||||
<script src="/resources/testharnessreport.js"/>
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"MediaList": {},
|
||||
"MediaList.mediaText": {},
|
||||
"MediaList.length": {},
|
||||
"MediaList getter": {},
|
||||
"MediaList.item": {}
|
||||
}
|
||||
*/</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"/>
|
||||
|
|
|
@ -23,14 +23,6 @@
|
|||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"read_only": { "assert": "do not allow modifications to a computed CSSStyleDeclaration" },
|
||||
"property_values": { "assert": "Directly set properties are resolved" },
|
||||
"inherited_property_values": { "assert": "Inherited properties are resolved" },
|
||||
"relative_property_values": { "assert": "Relative properties are resolved" }
|
||||
}
|
||||
*/</script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>Test not run - javascript required.</noscript>
|
||||
|
|
|
@ -38,12 +38,19 @@
|
|||
#flex-no-pseudo {
|
||||
display: flex;
|
||||
}
|
||||
#contents-pseudos::before,
|
||||
#contents-pseudos::after {
|
||||
display: contents;
|
||||
content: "foo";
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
<div id="test">
|
||||
<div id="contents"></div>
|
||||
<div id="none"></div>
|
||||
<div id="flex"></div>
|
||||
<div id="flex-no-pseudo"></div>
|
||||
<div id="contents-pseudos"></div>
|
||||
</div>
|
||||
<script>
|
||||
test(function() {
|
||||
|
@ -91,4 +98,15 @@ test(function() {
|
|||
"Pseudo-styles of display: flex elements should get blockified");
|
||||
});
|
||||
}, "Item-based blockification of nonexistent pseudo-elements");
|
||||
test(function() {
|
||||
var contentsPseudos = document.getElementById('contents-pseudos');
|
||||
[":before", ":after"].forEach(function(pseudo) {
|
||||
assert_equals(getComputedStyle(contentsPseudos, pseudo).display, "contents",
|
||||
"display: contents in " + pseudo + " should get reflected on CSSOM");
|
||||
assert_equals(getComputedStyle(contentsPseudos, pseudo).width, "auto",
|
||||
pseudo + " with display: contents should have no box");
|
||||
assert_equals(getComputedStyle(contentsPseudos, pseudo).position, "absolute",
|
||||
"display: contents in " + pseudo + " should reflect other non-inherited properties in CSSOM");
|
||||
});
|
||||
}, "display: contents on pseudo-elements");
|
||||
</script>
|
||||
|
|
|
@ -9,22 +9,6 @@
|
|||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"CSSStyleDeclaration_accessible": { "assert": "Can access CSSStyleDeclaration through style property" },
|
||||
"read": { "assert": "initial property values are correct" },
|
||||
"csstext_write": {
|
||||
"assert": ["setting cssText adds new properties",
|
||||
"setting cssText removes existing properties",
|
||||
"properties set through cssText are reflected in the computed style"]
|
||||
},
|
||||
"property_write": {
|
||||
"assert": ["setProperty adds new properties",
|
||||
"properties set through setProperty are reflected in the computed style"]
|
||||
},
|
||||
"shorthand_properties": { "assert": "shorthand property is expanded" }
|
||||
}
|
||||
*/</script>
|
||||
<body>
|
||||
<noscript>Test not run - javascript required.</noscript>
|
||||
<div id="log"></div>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test Reference</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
Should not be red.
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test: Dynamic changes to the stylesheet media attributes via CSSOM get reflected</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="match" href="medialist-dynamic-001-ref.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom/#dom-medialist-mediatext">
|
||||
<style media="all">* { color: red }</style>
|
||||
Should not be red.
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
document.styleSheets[0].media.mediaText = "not all";
|
||||
</script>
|
|
@ -9,30 +9,6 @@
|
|||
<meta name="assert" content="MediaLists are serialized according to the specification">
|
||||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"mediatest_medialist_serialize_element": {
|
||||
"help": ["http://www.w3.org/TR/cssom-1/#the-medialist-interface",
|
||||
"http://www.w3.org/TR/cssom-1/#serializing-media-queries"],
|
||||
"assert": ["MediaList.mediaText equals the 'media' value of the initial 'style' element."]
|
||||
},
|
||||
"mediatest_medialist_serialize_comma": {
|
||||
"help": ["http://www.w3.org/TR/cssom-1/#the-medialist-interface",
|
||||
"http://www.w3.org/TR/cssom-1/#serializing-media-queries"],
|
||||
"assert": ["To serialize a comma-separated list concatenate all items of the list in list order while separating them by \",\" (U+002C), followed by a space (U+0020)."]
|
||||
},
|
||||
"mediatest_medialist_serialize_empty": {
|
||||
"help": ["http://www.w3.org/TR/cssom-1/#the-medialist-interface",
|
||||
"http://www.w3.org/TR/cssom-1/#serializing-media-queries"],
|
||||
"assert": ["If the media query list is empty return the empty string."]
|
||||
},
|
||||
"mediatest_medialist_serialize_lexicographical": {
|
||||
"help": ["http://www.w3.org/TR/cssom-1/#the-medialist-interface",
|
||||
"http://www.w3.org/TR/cssom-1/#serializing-media-queries"],
|
||||
"assert": ["Each media query in the list of media queries should be sorted in lexicographical order."]
|
||||
}
|
||||
}
|
||||
*/</script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>Test not run - javascript required.</noscript>
|
||||
|
|
|
@ -9,15 +9,6 @@
|
|||
<meta name="assert" content="MediaList object has deleteMedium method and it functions properly.">
|
||||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
|
||||
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"deleteMedium_called_without_argument": { "assert": "MediaList.deleteMedium called without argument throws error." },
|
||||
"deleteMedium_removes_correct_medium": { "assert": "MediaList.deleteMedium removes correct medium and updates corresponding properties." },
|
||||
"deleteMedium_no_matching_medium_to_remove": { "assert": "MediaList.deleteMedium doesn't modify MediaList when medium is not found." }
|
||||
}
|
||||
*/</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -10,16 +10,6 @@
|
|||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"mediatest_mediaquery_serialize_1": {
|
||||
"assert": ["First explicit example input (first column) and output (second column) in specification."]
|
||||
},
|
||||
"mediatest_mediaquery_serialize_2": {
|
||||
"assert": ["Second explicit example input (first column) and output (second column) in specification."]
|
||||
}
|
||||
}
|
||||
*/</script>
|
||||
<body>
|
||||
<noscript>Test not run - javascript required.</noscript>
|
||||
<div id="log"></div>
|
||||
|
|
|
@ -8,14 +8,6 @@
|
|||
<meta name="assert" content="MediaList object has appendMedium method and it functions properly.">
|
||||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
|
||||
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"appendMedium_correctly_appends_medium_to_empty_MediaList": { "assert": "MediaList.appendMedium correctly adds medium to empty MediaList." },
|
||||
"appendMedium_correctly_appends_medium_to_nonempty_MediaList": { "assert": "MediaList.appendMedium correctly adds medium to a MediaList that already has a medium." }
|
||||
}
|
||||
*/</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
var style = document.body.style;
|
||||
|
||||
test(function() {
|
||||
style.color = 'white';
|
||||
|
||||
assert_equals(style.color, 'white');
|
||||
style.setProperty('color', undefined);
|
||||
assert_equals(style.color, 'white');
|
||||
}, "Verify that setting a CSS property to undefined has no effect.");
|
||||
|
||||
test(function() {
|
||||
style.color = 'white';
|
||||
|
||||
assert_equals(style.color, 'white');
|
||||
assert_equals(style.getPropertyPriority('color'), '');
|
||||
style.setProperty('color', 'red', undefined);
|
||||
assert_equals(style.color, 'red');
|
||||
assert_equals(style.getPropertyPriority('color'), '');
|
||||
}, "Verify that setting a CSS property priority to undefined is accepted.");
|
||||
|
||||
test(function() {
|
||||
style.color = 'white';
|
||||
|
||||
assert_equals(style.color, 'white');
|
||||
style.setProperty('color', null);
|
||||
assert_equals(style.color, '');
|
||||
}, "Verify that setting a CSS property to null is treated like empty string.");
|
||||
|
||||
test(function() {
|
||||
style.color = 'white';
|
||||
|
||||
assert_equals(style.color, 'white');
|
||||
style.setProperty('color', 'red', null);
|
||||
assert_equals(style.color, 'red');
|
||||
}, "Verify that setting a CSS property priority to null is treated like empty string.");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -13,31 +13,6 @@
|
|||
* { margin: 0; padding: 0; }
|
||||
</style>
|
||||
<link id="linkElement" rel="stylesheet" href="support/b-green.css">
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"sheet_property": {
|
||||
"help": "http://www.w3.org/TR/cssom-1/#the-linkstyle-interface",
|
||||
"assert": ["styleElement.sheet exists",
|
||||
"styleElement.sheet is a CSSStyleSheet",
|
||||
"linkElement.sheet exists",
|
||||
"linkElement.sheet is a CSSStyleSheet"]
|
||||
},
|
||||
"CSSStyleSheet_properties": {
|
||||
"assert": ["ownerRule, cssRules, insertRule and deleteRule properties exist on CSSStyleSheet",
|
||||
"ownerRule, cssRules are read only"]
|
||||
},
|
||||
"CSSStyleSheet_property_values": {
|
||||
"help": ["http://www.w3.org/TR/cssom-1/#css-style-sheets",
|
||||
"http://www.w3.org/TR/cssom-1/#cssimportrule"],
|
||||
"assert": "CSSStyleSheet initial property values are correct"
|
||||
},
|
||||
"StyleSheet_properties": {
|
||||
"assert": ["type, disabled, ownerNode, parentStyleSheet, href, title, and media properties exist on StyleSheet",
|
||||
"type, ownerNode, parentStyleSheet, href, title, media properties are read only"]
|
||||
},
|
||||
"StyleSheet_property_values": { "assert": "StyleSheet initial property values are correct" }
|
||||
}
|
||||
*/</script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>Test not run - javascript required.</noscript>
|
||||
|
|
|
@ -13,15 +13,6 @@
|
|||
<style id="styleElement" type="text/css" media="all" title="internal style sheet" disabled="disabled">
|
||||
* { margin: 0; padding: 0; }
|
||||
</style>
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"add_rule": {
|
||||
"assert": ["Initial rule list is of size 1",
|
||||
"Can add a rule at first index"]
|
||||
},
|
||||
"delete_rule": { "assert": "Can delete rules until rule list is empty" }
|
||||
}
|
||||
*/</script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>Test not run - javascript required.</noscript>
|
||||
|
|
|
@ -11,13 +11,6 @@
|
|||
<meta name="assert" content="The styleSheets length attribute must reflect the number of sheets at page load and after dynamically">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script id="metadata_cache">/*
|
||||
{
|
||||
"stylesheet.css should be loaded and styleSheets.length === 1": {},
|
||||
"stylesheet.css should be unloaded and styleSheets.length === 0": {},
|
||||
"stylesheet-1.css should be loaded and styleSheets.length === 1": {}
|
||||
}
|
||||
*/</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue