mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision df7fc2ece226676b8398ece13ddfd31b4f1eca5c
This commit is contained in:
parent
033156b961
commit
cb40a5f9fe
186 changed files with 4525 additions and 1203 deletions
|
@ -0,0 +1,81 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-page-3/#page-orientation-prop">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
@page {
|
||||
page-orientation: rotate-right;
|
||||
}
|
||||
@page :left {
|
||||
page-orientation: rotate-left;
|
||||
}
|
||||
@page :right {
|
||||
page-orientation: rotate-right;
|
||||
}
|
||||
@page :first {
|
||||
page-orientation: rotate-left;
|
||||
}
|
||||
@page named1 {
|
||||
page-orientation: upright;
|
||||
}
|
||||
@page named2 {
|
||||
page-orientation: hotpink;
|
||||
}
|
||||
@page named3 {
|
||||
page-orientation: rotate-right;
|
||||
}
|
||||
@page named4 {
|
||||
page-orientation: rotate-right;
|
||||
page-orientation: rotate-left;
|
||||
}
|
||||
@page named5 {
|
||||
page-orientation: hotpink;
|
||||
page-orientation: rotate-right;
|
||||
}
|
||||
@page named6 {
|
||||
page-orientation: rotate-right;
|
||||
page-orientation: inherit;
|
||||
page-orientation: initial;
|
||||
page-orientation: none;
|
||||
page-orientation: hotpink;
|
||||
}
|
||||
h5 {
|
||||
page-orientation: rotate-right;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
let pageRuleExpectations = {
|
||||
"" : "page-orientation: rotate-right;",
|
||||
":left" : "page-orientation: rotate-left;",
|
||||
":right" : "page-orientation: rotate-right;",
|
||||
":first" : "page-orientation: rotate-left;",
|
||||
"named1" : "page-orientation: upright;",
|
||||
"named2" : "",
|
||||
"named3" : "page-orientation: rotate-right;",
|
||||
"named4" : "page-orientation: rotate-left;",
|
||||
"named5" : "page-orientation: rotate-right;",
|
||||
"named6" : "page-orientation: rotate-right;",
|
||||
};
|
||||
let styleRuleExpectations = {
|
||||
"h5" : "display: block;"
|
||||
};
|
||||
let styleSheets = document.styleSheets;
|
||||
for (let i = 0; i < styleSheets.length; i++) {
|
||||
let rules = styleSheets[i].cssRules;
|
||||
for (let rule of rules) {
|
||||
if (rule.type == CSSRule.PAGE_RULE) {
|
||||
let expected = pageRuleExpectations[rule.selectorText];
|
||||
test(function() {
|
||||
assert_equals(rule.style.cssText, expected, "unexpected @page contents");
|
||||
}, "contents for selector ['" + rule.selectorText + "']");
|
||||
} else if (rule.type == CSSRule.STYLE_RULE) {
|
||||
let expected = styleRuleExpectations[rule.selectorText];
|
||||
test(function() {
|
||||
assert_equals(rule.style.cssText, expected, "unexpected style rule contents");
|
||||
}, "contents for selector ['" + rule.selectorText + "']");
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-page-3/#page-orientation-prop">
|
||||
<div id="elm" style="page-orientation:rotate-right;"></div>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
test(()=> {
|
||||
assert_equals(getComputedStyle(elm).pageOrientation, "");
|
||||
}, "page-orientation is not a property (only a descriptor)");
|
||||
</script>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-page-3/#page-orientation-prop">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
<script>
|
||||
// page-orientation is not a property. test_invalid_value() tries to specify
|
||||
// it on an element, and this should fail, even when using a valid
|
||||
// value. page-orientation is only valid as a descriptor inside an @page rule.
|
||||
test_invalid_value("page-orientation", "hotpink");
|
||||
test_invalid_value("page-orientation", "upright");
|
||||
test_invalid_value("page-orientation", "rotate-left");
|
||||
test_invalid_value("page-orientation", "rotate-right");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue