mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #20336 - servo-wpt-sync:wpt_update_18-03-2018, r=jdm
Sync WPT with upstream (18-03-2018) Automated downstream sync of changes from upstream as of 18-03-2018. [no-wpt-sync] <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20336) <!-- Reviewable:end -->
This commit is contained in:
commit
bedeec0cf5
6 changed files with 72 additions and 34 deletions
|
@ -316689,9 +316689,15 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html": [
|
"css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue-value.html": [
|
||||||
[
|
[
|
||||||
"/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html",
|
"/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue-value.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.html": [
|
||||||
|
[
|
||||||
|
"/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.html",
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -521944,8 +521950,12 @@
|
||||||
"e19ec7ede86d52ecf29a142607de481facabcfb2",
|
"e19ec7ede86d52ecf29a142607de481facabcfb2",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html": [
|
"css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue-value.html": [
|
||||||
"e2d56515f3580649fc9cc8188b39056beb030036",
|
"9abf1e98ec0291f305c274e24f34b15b8c334e72",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
|
"css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.html": [
|
||||||
|
"a59472a3897ef37e3978f803f6a36d7a893e1f95",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"css/css-typed-om/stylevalue-subclasses/numeric-objects/cssnumericvalue-multiply-two-types.tentative.html": [
|
"css/css-typed-om/stylevalue-subclasses/numeric-objects/cssnumericvalue-multiply-two-types.tentative.html": [
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[vh_not_refreshing_on_chrome.html]
|
||||||
|
expected: FAIL
|
|
@ -0,0 +1,5 @@
|
||||||
|
[rapid-resizing.html]
|
||||||
|
expected: TIMEOUT
|
||||||
|
[Overall test]
|
||||||
|
expected: NOTRUN
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSSUnitValue.value</title>
|
||||||
|
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#cssunitvalue">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<body>
|
||||||
|
<div id="log"></div>
|
||||||
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
test(() => {
|
||||||
|
const result = new CSSUnitValue(-3.14, 'px');
|
||||||
|
result.value = 3.14;
|
||||||
|
assert_equals(result.value, 3.14, 'value reflects new value');
|
||||||
|
assert_equals(result.unit, 'px', 'unit does not change');
|
||||||
|
}, 'CSSUnitValue.value can be updated to a different value');
|
||||||
|
|
||||||
|
</script>
|
|
@ -0,0 +1,32 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSSUnitValue Constructor</title>
|
||||||
|
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-cssunitvalue-cssunitvalue">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="../../resources/testhelper.js"></script>
|
||||||
|
<body>
|
||||||
|
<div id="log"></div>
|
||||||
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
test(() => {
|
||||||
|
assert_throws(new TypeError(), () => new CSSUnitValue(0, 'lemon'));
|
||||||
|
}, 'Constructing CSSUnitValue with an unknown unit throws a TypeError');
|
||||||
|
|
||||||
|
test(() => {
|
||||||
|
assert_throws(new TypeError(), () => new CSSUnitValue(0, ''));
|
||||||
|
}, 'Constructing CSSUnitValue with a empty string unit throws a TypeError');
|
||||||
|
|
||||||
|
for (const unit of gValidUnits) {
|
||||||
|
test(() => {
|
||||||
|
const result = new CSSUnitValue(-3.14, unit);
|
||||||
|
assert_not_equals(result, null, 'a CSSUnitValue is created');
|
||||||
|
assert_equals(result.value, -3.14,
|
||||||
|
'value is same as given by constructor');
|
||||||
|
assert_equals(result.unit, unit.toLowerCase(),
|
||||||
|
'unit is same as given by constructor');
|
||||||
|
}, 'CSSUnitValue can be constructed with ' + unit);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
|
@ -1,30 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>CSSUnitValue tests</title>
|
|
||||||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#simple-numeric">
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<script src="../../resources/testhelper.js"></script>
|
|
||||||
<script>
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
const gInvalidTestUnits = [
|
|
||||||
{ unit: '', desc: 'an empty string' },
|
|
||||||
{ unit: 'lemon', desc: 'an invalid unit' },
|
|
||||||
];
|
|
||||||
|
|
||||||
for (const {unit, desc} of gInvalidTestUnits) {
|
|
||||||
test(() => {
|
|
||||||
assert_throws(new TypeError(), () => new CSSUnitValue(0, unit));
|
|
||||||
}, 'Constructing CSSUnitValue with ' + desc + ' as the unit throws a TypeError');
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const unit of gValidUnits) {
|
|
||||||
test(() => {
|
|
||||||
const result = new CSSUnitValue(-3.14, unit);
|
|
||||||
assert_equals(result.value, -3.14);
|
|
||||||
assert_equals(result.unit, unit.toLowerCase());
|
|
||||||
}, 'CSSUnitValue can be constructed with ' + unit);
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
Loading…
Add table
Add a link
Reference in a new issue