mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
Update web-platform-tests to revision b202bbb5aa0d235b22bac11fe902eab1094ef9d2
This commit is contained in:
parent
9a6c96808b
commit
e90dd8bc6b
43 changed files with 669 additions and 286 deletions
|
@ -16,15 +16,14 @@
|
|||
<script type="text/javascript">
|
||||
test(function() {
|
||||
var test = document.getElementById("test");
|
||||
assert_own_property(test, "style");
|
||||
assert_readonly(test, "style");
|
||||
assert_idl_attribute(test, "style");
|
||||
declaration = test.style;
|
||||
}, "CSSStyleDeclaration_accessible", {
|
||||
assert: "Can access CSSStyleDeclaration through style property"
|
||||
});
|
||||
|
||||
test(function() {
|
||||
assert_regexp_match(declaration.cssText, /margin-left: 5px;\s*/);
|
||||
assert_equals(declaration.cssText, "margin-left: 5px;");
|
||||
assert_equals(declaration.getPropertyValue("margin-left"), "5px");
|
||||
}, "read", {
|
||||
assert: "initial property values are correct"
|
||||
|
@ -32,7 +31,7 @@
|
|||
|
||||
test(function() {
|
||||
declaration.cssText = "margin-left: 10px; padding-left: 10px;";
|
||||
assert_regexp_match(declaration.cssText, /margin-left: 10px;\s+padding-left: 10px;\s+/);
|
||||
assert_equals(declaration.cssText, "margin-left: 10px; padding-left: 10px;");
|
||||
assert_equals(declaration.length, 2);
|
||||
assert_equals(declaration.item(0), "margin-left");
|
||||
assert_equals(declaration.item(1), "padding-left");
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
assert_equals(mediaList.mediaText, "all, screen");
|
||||
|
||||
}, "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"],
|
||||
{ help: ["http://www.w3.org/TR/cssom-1/#the-medialist-interface", "http://www.w3.org/TR/cssom-1/#serialize-a-media-query-list"],
|
||||
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)."] });
|
||||
|
||||
test(function() {
|
||||
|
@ -75,11 +75,11 @@
|
|||
|
||||
mediaList.appendMedium('screen');
|
||||
mediaList.appendMedium('print');
|
||||
assert_equals(mediaList.mediaText, "all, print, screen");
|
||||
assert_equals(mediaList.mediaText, "all, screen, print");
|
||||
|
||||
}, "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."] });
|
||||
}, "mediatest_medialist_serialize_order",
|
||||
{ help: ["http://www.w3.org/TR/cssom-1/#the-medialist-interface", "http://www.w3.org/TR/cssom-1/#serialize-a-media-query-list"],
|
||||
assert: ["Each media query should be sorted in the same order as they appear in the list of media queries."] });
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
media_list.appendMedium("all");
|
||||
|
||||
media_list.deleteMedium("screen");
|
||||
assert_throws("NotFoundError", () => media_list.deleteMedium("screen"));
|
||||
|
||||
assert_equals(media_list.length, 1);
|
||||
assert_equals(media_list.item(0), "all");
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
assert_equals(media_list.length, 2);
|
||||
assert_equals(media_list.item(0), "screen");
|
||||
assert_equals(media_list.item(1), "all");
|
||||
assert_equals(media_list.mediaText, "all, screen");
|
||||
assert_equals(media_list.mediaText, "screen, all");
|
||||
}, "appendMedium_correctly_appends_medium_to_nonempty_MediaList",
|
||||
{ assert: "MediaList.appendMedium correctly adds medium to a MediaList that already has a medium." });
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
var styleSheet;
|
||||
var linkSheet;
|
||||
test(function() {
|
||||
assert_own_property(styleElement, "sheet");
|
||||
assert_idl_attribute(styleElement, "sheet");
|
||||
assert_readonly(styleElement, "sheet");
|
||||
styleSheet = styleElement.sheet;
|
||||
assert_true(styleSheet instanceof CSSStyleSheet);
|
||||
assert_own_property(linkElement, "sheet");
|
||||
assert_idl_attribute(linkElement, "sheet");
|
||||
linkSheet = linkElement.sheet;
|
||||
assert_true(linkSheet instanceof CSSStyleSheet);
|
||||
}, "sheet_property",
|
||||
|
@ -48,8 +48,8 @@
|
|||
assert: "The sheet property on LinkStyle should always return the current associated style sheet." });
|
||||
|
||||
test(function() {
|
||||
assert_own_property(styleSheet, "ownerRule");
|
||||
assert_own_property(styleSheet, "cssRules");
|
||||
assert_idl_attribute(styleSheet, "ownerRule");
|
||||
assert_idl_attribute(styleSheet, "cssRules");
|
||||
assert_inherits(styleSheet, "insertRule");
|
||||
assert_inherits(styleSheet, "deleteRule");
|
||||
|
||||
|
@ -71,13 +71,13 @@
|
|||
assert: "CSSStyleSheet initial property values are correct" });
|
||||
|
||||
test(function() {
|
||||
assert_own_property(styleSheet, "type");
|
||||
assert_own_property(styleSheet, "disabled");
|
||||
assert_own_property(styleSheet, "ownerNode");
|
||||
assert_own_property(styleSheet, "parentStyleSheet");
|
||||
assert_own_property(styleSheet, "href");
|
||||
assert_own_property(styleSheet, "title");
|
||||
assert_own_property(styleSheet, "media");
|
||||
assert_idl_attribute(styleSheet, "type");
|
||||
assert_idl_attribute(styleSheet, "disabled");
|
||||
assert_idl_attribute(styleSheet, "ownerNode");
|
||||
assert_idl_attribute(styleSheet, "parentStyleSheet");
|
||||
assert_idl_attribute(styleSheet, "href");
|
||||
assert_idl_attribute(styleSheet, "title");
|
||||
assert_idl_attribute(styleSheet, "media");
|
||||
|
||||
assert_readonly(styleSheet, "type");
|
||||
assert_readonly(styleSheet, "ownerNode");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue