зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1470258 [wpt PR 11613] - [css-writing-modes] Parsing of writing modes properties, a=testonly
Automatic update from web-platform-testsMerge pull request #11613 from ewilligers/css-writing-modes-parsing [css-writing-modes] Parsing of writing modes properties -- wpt-commits: e34732550a0e069df92c1ac81b0b014ece996e08 wpt-pr: 11613
This commit is contained in:
Родитель
fe9d5b6596
Коммит
99c54b570a
|
@ -262273,6 +262273,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/parsing/resources/parsing-testcommon.js": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/reference/available-size-001-ref.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -325748,6 +325753,66 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/parsing/direction-invalid.html": [
|
||||
[
|
||||
"/css/css-writing-modes/parsing/direction-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/parsing/direction-valid.html": [
|
||||
[
|
||||
"/css/css-writing-modes/parsing/direction-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/parsing/text-combine-upright-invalid.html": [
|
||||
[
|
||||
"/css/css-writing-modes/parsing/text-combine-upright-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/parsing/text-combine-upright-valid.html": [
|
||||
[
|
||||
"/css/css-writing-modes/parsing/text-combine-upright-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/parsing/text-orientation-invalid.html": [
|
||||
[
|
||||
"/css/css-writing-modes/parsing/text-orientation-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/parsing/text-orientation-valid.html": [
|
||||
[
|
||||
"/css/css-writing-modes/parsing/text-orientation-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/parsing/unicode-bidi-invalid.html": [
|
||||
[
|
||||
"/css/css-writing-modes/parsing/unicode-bidi-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/parsing/unicode-bidi-valid.html": [
|
||||
[
|
||||
"/css/css-writing-modes/parsing/unicode-bidi-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/parsing/writing-mode-invalid.html": [
|
||||
[
|
||||
"/css/css-writing-modes/parsing/writing-mode-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/parsing/writing-mode-valid.html": [
|
||||
[
|
||||
"/css/css-writing-modes/parsing/writing-mode-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-writing-modes/text-combine-upright-parsing-digits-001.html": [
|
||||
[
|
||||
"/css/css-writing-modes/text-combine-upright-parsing-digits-001.html",
|
||||
|
@ -549073,6 +549138,50 @@
|
|||
"b7079a0dd1cc46e8252deff8a3b08e0915ea5a31",
|
||||
"manual"
|
||||
],
|
||||
"css/css-writing-modes/parsing/direction-invalid.html": [
|
||||
"9f1076e0da9353816521cf34646981c33d82badb",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-writing-modes/parsing/direction-valid.html": [
|
||||
"c68d1dd7d9c2eef8d95c9c90c697a61125dd47b0",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-writing-modes/parsing/resources/parsing-testcommon.js": [
|
||||
"14f32b772f27a9bc75fe90e2ea1d8e4fb3649e95",
|
||||
"support"
|
||||
],
|
||||
"css/css-writing-modes/parsing/text-combine-upright-invalid.html": [
|
||||
"21ca5f024035630875f14a5f45b165548333733f",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-writing-modes/parsing/text-combine-upright-valid.html": [
|
||||
"680c92d6c12a38ec1f5689a5c2b9969041ee3672",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-writing-modes/parsing/text-orientation-invalid.html": [
|
||||
"cb38e4ab395dfabc99813ee8459ebaae4d79e2d0",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-writing-modes/parsing/text-orientation-valid.html": [
|
||||
"d047527d687a9b240e27e835de0fb8786189e399",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-writing-modes/parsing/unicode-bidi-invalid.html": [
|
||||
"911e697b065db6e6f7b6e563e84601cf176eb99e",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-writing-modes/parsing/unicode-bidi-valid.html": [
|
||||
"21c01cd648f6b465fdb46d85a9d247882ca14317",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-writing-modes/parsing/writing-mode-invalid.html": [
|
||||
"d41cb214ab942064e064191c7db41b9b5dff1674",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-writing-modes/parsing/writing-mode-valid.html": [
|
||||
"fa0a2060cda483bf479203069ad53432a4a36b36",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-writing-modes/percent-margin-vlr-003.xht": [
|
||||
"4dc2d772b9fedfc4f498ed488cd8d31c00c50c71",
|
||||
"reftest"
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Writing Modes Level 3: parsing direction with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction">
|
||||
<meta name="assert" content="direction supports only the grammar 'ltr | rtl'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("direction", "auto");
|
||||
test_invalid_value("direction", "ltr rtl");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Writing Modes Level 3: parsing direction with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction">
|
||||
<meta name="assert" content="direction supports the full grammar 'ltr | rtl'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("direction", "ltr");
|
||||
test_valid_value("direction", "rtl");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,39 @@
|
|||
'use strict';
|
||||
|
||||
// serializedValue can be the expected serialization of value,
|
||||
// or an array of permitted serializations,
|
||||
// or omitted if value should serialize as value.
|
||||
function test_valid_value(property, value, serializedValue) {
|
||||
if (arguments.length < 3)
|
||||
serializedValue = value;
|
||||
|
||||
var stringifiedValue = JSON.stringify(value);
|
||||
|
||||
test(function(){
|
||||
var div = document.createElement('div');
|
||||
div.style[property] = value;
|
||||
assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
|
||||
|
||||
var div = document.createElement('div');
|
||||
div.style[property] = value;
|
||||
var readValue = div.style.getPropertyValue(property);
|
||||
if (serializedValue instanceof Array)
|
||||
assert_in_array(readValue, serializedValue, "serialization should be sound");
|
||||
else
|
||||
assert_equals(readValue, serializedValue, "serialization should be canonical");
|
||||
|
||||
div.style[property] = readValue;
|
||||
assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
|
||||
|
||||
}, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
|
||||
}
|
||||
|
||||
function test_invalid_value(property, value) {
|
||||
var stringifiedValue = JSON.stringify(value);
|
||||
|
||||
test(function(){
|
||||
var div = document.createElement('div');
|
||||
div.style[property] = value;
|
||||
assert_equals(div.style.getPropertyValue(property), "");
|
||||
}, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Writing Modes Level 3: parsing text-combine-upright with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-text-combine-upright">
|
||||
<meta name="assert" content="text-combine-upright supports only the grammar 'none | all'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("text-combine-upright", "auto");
|
||||
test_invalid_value("text-combine-upright", "none all");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Writing Modes Level 3: parsing text-combine-upright with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-text-combine-upright">
|
||||
<meta name="assert" content="text-combine-upright supports the full grammar 'none | all'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("text-combine-upright", "none");
|
||||
test_valid_value("text-combine-upright", "all");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Writing Modes Level 3: parsing text-orientation with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-text-orientation">
|
||||
<meta name="assert" content="text-orientation supports only the grammar 'mixed | upright | sideways'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("text-orientation", "auto");
|
||||
test_invalid_value("text-orientation", "mixed upright");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Writing Modes Level 3: parsing text-orientation with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-text-orientation">
|
||||
<meta name="assert" content="text-orientation supports the full grammar 'mixed | upright | sideways'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("text-orientation", "mixed");
|
||||
test_valid_value("text-orientation", "upright");
|
||||
test_valid_value("text-orientation", "sideways");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Writing Modes Level 3: parsing unicode-bidi with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-unicode-bidi">
|
||||
<meta name="assert" content="unicode-bidi supports only the grammar 'normal | embed | isolate | bidi-override | isolate-override | plaintext'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("unicode-bidi", "auto");
|
||||
test_invalid_value("unicode-bidi", "isolate plaintext");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Writing Modes Level 3: parsing unicode-bidi with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-unicode-bidi">
|
||||
<meta name="assert" content="unicode-bidi supports the full grammar 'normal | embed | isolate | bidi-override | isolate-override | plaintext'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("unicode-bidi", "normal");
|
||||
test_valid_value("unicode-bidi", "embed");
|
||||
test_valid_value("unicode-bidi", "isolate");
|
||||
test_valid_value("unicode-bidi", "bidi-override");
|
||||
test_valid_value("unicode-bidi", "isolate-override");
|
||||
test_valid_value("unicode-bidi", "plaintext");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Writing Modes Level 3: parsing writing-mode with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-writing-mode">
|
||||
<meta name="assert" content="writing-mode supports only the grammar 'horizontal-tb | vertical-rl | vertical-lr'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("writing-mode", "auto");
|
||||
test_invalid_value("writing-mode", "horizontal-tb vertical-rl");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Writing Modes Level 3: parsing writing-mode with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-writing-mode">
|
||||
<meta name="assert" content="writing-mode supports the full grammar 'horizontal-tb | vertical-rl | vertical-lr'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("writing-mode", "horizontal-tb");
|
||||
test_valid_value("writing-mode", "vertical-rl");
|
||||
test_valid_value("writing-mode", "vertical-lr");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче