mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +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
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Child of block with clear</title>
|
||||
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property">
|
||||
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
|
||||
<p>Test passes if there is a filled green square.</p>
|
||||
<div style="position:relative; top:-20px;">
|
||||
<div style="float:left; margin-top:20px; width:50px; height:50px; background:green;"></div>
|
||||
<div style="padding-top:1px;">
|
||||
<div style="margin-top:19px; width:100px; background:green;">
|
||||
<div style="clear:left; margin-top:25px; width:100px; height:50px; background:green;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Child of block with clear</title>
|
||||
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property">
|
||||
<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div id="container" style="overflow:hidden; width:200px; height:200px; background:red;">
|
||||
<div style="float:left; width:10px; height:50px;"></div>
|
||||
<div style="float:right; width:10px; height:100px;"></div>
|
||||
<div style="clear:right;">
|
||||
<div style="clear:left; height:200px; background:green;"></div>
|
||||
</div>
|
||||
<div style="height:10000px;"></div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById("container").scrollTop = 100;
|
||||
</script>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Child of block with clear</title>
|
||||
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property">
|
||||
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
|
||||
<p>Test passes if there is a filled green square.</p>
|
||||
<div style="position:relative; z-index:-1; top:-50px; width:100px; background:green;">
|
||||
<div style="float:left; width:100px; height:50px; background:white;"></div>
|
||||
<div style="clear:left; margin-top:25px;">
|
||||
<div style="height:50px; margin-top:150px; background:white;"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Child of block with clear</title>
|
||||
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property">
|
||||
<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div style="width:200px; height:200px; background:red;">
|
||||
<div style="float:left; width:200px; height:100px; background:green;"></div>
|
||||
<div style="clear:left; margin-top:100px;">
|
||||
<div style="height:100px; margin-top:-1000px; background:green;"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Child of block with clear</title>
|
||||
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property">
|
||||
<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div style="width:200px; height:200px; background:red;">
|
||||
<div style="float:left; width:200px; height:100px; background:green;"></div>
|
||||
<div style="clear:left;">
|
||||
<div style="height:100px; background:green;"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -9,8 +9,8 @@
|
|||
'use strict';
|
||||
|
||||
const gInvalidTestUnits = [
|
||||
{ value: '', desc: 'an empty string' },
|
||||
{ value: 'lemon', desc: 'an invalid unit' },
|
||||
{ unit: '', desc: 'an empty string' },
|
||||
{ unit: 'lemon', desc: 'an invalid unit' },
|
||||
];
|
||||
|
||||
for (const {unit, desc} of gInvalidTestUnits) {
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>scroll-padding related properties</title>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../../resources/testhelper.js"></script>
|
||||
<script src="resources/testsuite.js"></script>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
for (const suffix of ['top', 'left', 'right', 'bottom']) {
|
||||
runPropertyTests('scroll-padding-' + suffix, [
|
||||
{ syntax: '<percentage>' },
|
||||
{ syntax: '<length>' },
|
||||
]);
|
||||
}
|
||||
|
||||
for (const suffix of ['inline-start', 'block-start', 'inline-end', 'block-end']) {
|
||||
runPropertyTests('scroll-padding-' + suffix, [
|
||||
{ syntax: '<percentage>' },
|
||||
{ syntax: '<length>' },
|
||||
]);
|
||||
}
|
||||
|
||||
runUnsupportedPropertyTests('scroll-padding',
|
||||
['0%', '1px 2px', '3% 4px 5%', '6px 7% 8% 9px']
|
||||
);
|
||||
|
||||
</script>
|
|
@ -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