mirror of
https://github.com/servo/servo.git
synced 2025-08-23 06:15:35 +01:00
Update web-platform-tests to revision 2b66b8b24b727c7490bf6091dd8a6a551642720b
This commit is contained in:
parent
b0751f4241
commit
faf92483da
85 changed files with 1096 additions and 220 deletions
|
@ -3,7 +3,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
||||
#space { height: 1000px; }
|
||||
#space { height: 4000px; }
|
||||
#ancestor { position: relative; }
|
||||
#before, #anchor { height: 100px; }
|
||||
#anchor { background-color: green; }
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#changer { height: 1500px; }
|
||||
#anchor {
|
||||
width: 150px;
|
||||
height: 1000px;
|
||||
height: 4000px;
|
||||
background-color: pink;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
||||
body { height: 1000px; }
|
||||
body { height: 4000px; }
|
||||
div { height: 100px; }
|
||||
|
||||
</style>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
||||
body { height: 1000px; }
|
||||
body { height: 4000px; }
|
||||
#outer { width: 300px; }
|
||||
#outer:after { content: " "; clear:both; display: table; }
|
||||
#float {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
||||
body { height: 1000px; }
|
||||
body { height: 4000px; }
|
||||
#outer { width: 300px; }
|
||||
#zeroheight { height: 0px; }
|
||||
#changer { height: 100px; background-color: red; }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
||||
body { height: 1000px; margin: 0; }
|
||||
body { height: 4000px; margin: 0; }
|
||||
#fixed, #content { width: 200px; height: 100px; }
|
||||
#fixed { position: fixed; left: 100px; top: 50px; }
|
||||
#before { height: 50px; }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
||||
body { height: 1000px }
|
||||
body { height: 4000px }
|
||||
#outer { line-height: 100px }
|
||||
#ib1, #ib2 { display: inline-block }
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<style>
|
||||
|
||||
#space {
|
||||
height: 1000px;
|
||||
height: 4000px;
|
||||
}
|
||||
#header {
|
||||
background-color: #F5B335;
|
||||
|
|
|
@ -32,9 +32,11 @@ html.vrl { writing-mode: vertical-rl; }
|
|||
.vpush { height: 80px !important; }
|
||||
.hpush { width: 70px !important; }
|
||||
|
||||
#anchor-container {
|
||||
display: inline-block;
|
||||
}
|
||||
#anchor {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
background-color: #8e8;
|
||||
min-width: 100px;
|
||||
min-height: 100px;
|
||||
|
@ -49,8 +51,10 @@ html.vrl { writing-mode: vertical-rl; }
|
|||
</style>
|
||||
<div id="container">
|
||||
<div id="block_pusher"></div><br>
|
||||
<div id="inline_pusher"></div><div id="anchor">
|
||||
<div id="grower"></div>
|
||||
<div id="inline_pusher"></div><div id="anchor-container">
|
||||
<div id="anchor">
|
||||
<div id="grower"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
||||
body { height: 1000px }
|
||||
body { height: 4000px }
|
||||
#A, #B { width: 100px; background-color: #afa; }
|
||||
#B { height: 100px; }
|
||||
#inner { width: 100px; height: 100px; background-color: pink; }
|
||||
|
|
|
@ -7,7 +7,7 @@ body {
|
|||
position: absolute;
|
||||
font-size: 100px;
|
||||
width: 200px;
|
||||
height: 1000px;
|
||||
height: 4000px;
|
||||
line-height: 100px;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,28 +11,34 @@
|
|||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("scroll-margin-top", "0", "0px");
|
||||
test_valid_value("scroll-margin-top", "-10px");
|
||||
test_valid_value("scroll-margin-top", "calc(2em + 3ex)");
|
||||
|
||||
|
||||
test_valid_value("scroll-margin-right", "0", "0px");
|
||||
test_valid_value("scroll-margin-right", "-10px");
|
||||
test_valid_value("scroll-margin-right", "calc(2em + 3ex)");
|
||||
|
||||
|
||||
test_valid_value("scroll-margin-bottom", "0", "0px");
|
||||
test_valid_value("scroll-margin-bottom", "-10px");
|
||||
test_valid_value("scroll-margin-bottom", "calc(2em + 3ex)");
|
||||
|
||||
|
||||
test_valid_value("scroll-margin-left", "0", "0px");
|
||||
test_valid_value("scroll-margin-left", "-10px");
|
||||
test_valid_value("scroll-margin-left", "calc(2em + 3ex)");
|
||||
|
||||
|
||||
test_valid_value("scroll-margin", "0", "0px");
|
||||
test_valid_value("scroll-margin", "-10px");
|
||||
test_valid_value("scroll-margin", "calc(2em + 3ex)");
|
||||
|
||||
test_valid_value("scroll-margin", "1px 2px");
|
||||
test_valid_value("scroll-margin", "1px 2px 3px");
|
||||
test_valid_value("scroll-margin", "1px 2px 3px 4px");
|
||||
test_valid_value("scroll-margin", "0 0 0 0", "0px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -33,7 +33,7 @@ test_valid_value("scroll-padding-block", "calc(50% + 60px)");
|
|||
|
||||
test_valid_value("scroll-padding-block", "1px 2px");
|
||||
test_valid_value("scroll-padding-block", "1px auto");
|
||||
test_valid_value("scroll-padding-block", "auto auto");
|
||||
test_valid_value("scroll-padding-block", "auto auto", "auto");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -33,7 +33,7 @@ test_valid_value("scroll-padding-inline", "calc(50% + 60px)");
|
|||
|
||||
test_valid_value("scroll-padding-inline", "1px 2px");
|
||||
test_valid_value("scroll-padding-inline", "1px auto");
|
||||
test_valid_value("scroll-padding-inline", "auto auto");
|
||||
test_valid_value("scroll-padding-inline", "auto auto", "auto");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Scroll Snap Test: scroll-padding with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding">
|
||||
<meta name="assert" content="scroll-padding supports only the grammar '[ <length-percentage> | auto ]{1,4}'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("scroll-padding-top", "20");
|
||||
test_invalid_value("scroll-padding-top", "-20px");
|
||||
|
||||
|
||||
test_invalid_value("scroll-padding-right", "20");
|
||||
test_invalid_value("scroll-padding-right", "-20px");
|
||||
|
||||
|
||||
test_invalid_value("scroll-padding-bottom", "20");
|
||||
test_invalid_value("scroll-padding-bottom", "-20px");
|
||||
|
||||
|
||||
test_invalid_value("scroll-padding-left", "20");
|
||||
test_invalid_value("scroll-padding-left", "-20px");
|
||||
|
||||
|
||||
test_invalid_value("scroll-padding", "20");
|
||||
test_invalid_value("scroll-padding", "-20px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -12,6 +12,7 @@
|
|||
<body>
|
||||
<script>
|
||||
test_valid_value("scroll-padding-top", "auto");
|
||||
test_valid_value("scroll-padding-top", "0", "0px");
|
||||
test_valid_value("scroll-padding-top", "10px");
|
||||
test_valid_value("scroll-padding-top", "20%");
|
||||
test_valid_value("scroll-padding-top", "calc(2em + 3ex)");
|
||||
|
@ -19,6 +20,7 @@ test_valid_value("scroll-padding-top", "calc(50% + 60px)");
|
|||
|
||||
|
||||
test_valid_value("scroll-padding-right", "auto");
|
||||
test_valid_value("scroll-padding-right", "0", "0px");
|
||||
test_valid_value("scroll-padding-right", "10px");
|
||||
test_valid_value("scroll-padding-right", "20%");
|
||||
test_valid_value("scroll-padding-right", "calc(2em + 3ex)");
|
||||
|
@ -26,6 +28,7 @@ test_valid_value("scroll-padding-right", "calc(50% + 60px)");
|
|||
|
||||
|
||||
test_valid_value("scroll-padding-bottom", "auto");
|
||||
test_valid_value("scroll-padding-bottom", "0", "0px");
|
||||
test_valid_value("scroll-padding-bottom", "10px");
|
||||
test_valid_value("scroll-padding-bottom", "20%");
|
||||
test_valid_value("scroll-padding-bottom", "calc(2em + 3ex)");
|
||||
|
@ -33,6 +36,7 @@ test_valid_value("scroll-padding-bottom", "calc(50% + 60px)");
|
|||
|
||||
|
||||
test_valid_value("scroll-padding-left", "auto");
|
||||
test_valid_value("scroll-padding-left", "0", "0px");
|
||||
test_valid_value("scroll-padding-left", "10px");
|
||||
test_valid_value("scroll-padding-left", "20%");
|
||||
test_valid_value("scroll-padding-left", "calc(2em + 3ex)");
|
||||
|
@ -41,6 +45,7 @@ test_valid_value("scroll-padding-left", "calc(50% + 60px)");
|
|||
|
||||
test_valid_value("scroll-padding", "auto");
|
||||
test_valid_value("scroll-padding", "10px");
|
||||
test_valid_value("scroll-padding", "0", "0px");
|
||||
test_valid_value("scroll-padding", "20%");
|
||||
test_valid_value("scroll-padding", "calc(2em + 3ex)");
|
||||
|
||||
|
@ -48,7 +53,8 @@ test_valid_value("scroll-padding", "1px 2px");
|
|||
test_valid_value("scroll-padding", "1px 2px 3%");
|
||||
test_valid_value("scroll-padding", "1px 2px 3% 4px");
|
||||
test_valid_value("scroll-padding", "1px auto");
|
||||
test_valid_value("scroll-padding", "auto auto auto auto");
|
||||
test_valid_value("scroll-padding", "0 0 0 0", "0px");
|
||||
test_valid_value("scroll-padding", "auto auto auto auto", "auto");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS UI Level 4: getComputedValue().userSelect</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#content-selection">
|
||||
<meta name="assert" content="user-select computed value is as specified.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("user-select", "auto");
|
||||
test_computed_value("user-select", "text");
|
||||
test_computed_value("user-select", "none");
|
||||
test_computed_value("user-select", "contain");
|
||||
test_computed_value("user-select", "all");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS UI Level 4: parsing user-select with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#content-selection">
|
||||
<meta name="assert" content="user-select supports only the grammar 'auto | text | none | contain | all'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("user-select", "visible");
|
||||
test_invalid_value("user-select", "text contain");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS UI Level 4: parsing user-select with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#content-selection">
|
||||
<meta name="assert" content="user-select supports the full grammar 'auto | text | none | contain | all'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("user-select", "auto");
|
||||
test_valid_value("user-select", "text");
|
||||
test_valid_value("user-select", "none");
|
||||
test_valid_value("user-select", "contain");
|
||||
test_valid_value("user-select", "all");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,78 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>CSS Values and Units Test: computed value of 'background-position' when specified with calc() function</title>
|
||||
|
||||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-values-3/#calc-computed-value">
|
||||
|
||||
<meta name="flags" content="">
|
||||
<meta content="This test verifies how 6 calc() functions are computed for 'background-position'." name="assert">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<div id="target"></div>
|
||||
|
||||
<script>
|
||||
function startTesting()
|
||||
{
|
||||
|
||||
var targetElement = document.getElementById("target");
|
||||
|
||||
function verifyComputedStyle(property_name, initial_value, specified_value, expected_value, description)
|
||||
{
|
||||
|
||||
test(function()
|
||||
{
|
||||
|
||||
targetElement.style.setProperty(property_name, initial_value);
|
||||
|
||||
/*
|
||||
The purpose of the initial_value is to act as a fallback
|
||||
value in case the calc() function in the specified value
|
||||
fails or in case it generates an invalid value. Since we
|
||||
are running 6 consecutive tests on the same element,
|
||||
then it is necessary to 'reset' its property to an
|
||||
initial value.
|
||||
*/
|
||||
|
||||
targetElement.style.setProperty(property_name, specified_value);
|
||||
|
||||
assert_equals(getComputedStyle(targetElement)[property_name], expected_value);
|
||||
|
||||
}, description);
|
||||
}
|
||||
|
||||
/* verifyComputedStyle(property_name, initial_value, specified_value, expected_value, description) */
|
||||
|
||||
verifyComputedStyle("background-position", "initial", "calc(2px + 3px) calc(4px + 5px)", "5px 9px", "testing background-position: calc(2px + 3px) calc(4px + 5px)");
|
||||
|
||||
verifyComputedStyle("background-position", "initial", "calc(18px - 7px) calc(19px - 7px)", "11px 12px", "testing background-position: calc(18px - 7px) calc(19px - 7px)");
|
||||
|
||||
verifyComputedStyle("background-position", "initial", "calc(4 * 5px) calc(6px * 4)", "20px 24px", "testing background-position: calc(4 * 5px) calc(6px * 4)");
|
||||
|
||||
verifyComputedStyle("background-position", "initial", "calc(100px / 4) calc(119px / 7)", "25px 17px", "testing background-position: calc(100px / 4) calc(119px / 7)");
|
||||
|
||||
verifyComputedStyle("background-position", "initial", "calc(6px + 21%) calc(7em + 22%)", "calc(21% + 6px) calc(22% + 112px)", "testing background-position: calc(6px + 21%) calc(7em + 22%)");
|
||||
|
||||
/*
|
||||
"
|
||||
(...) background-position has layout-dependent behavior for
|
||||
percentage values, and thus does not resolve percentages
|
||||
until used-value time. Due to this, background-position
|
||||
computation preserves the percentage in a calc(). (...)
|
||||
"
|
||||
https://www.w3.org/TR/css-values-3/#calc-computed-value
|
||||
*/
|
||||
|
||||
verifyComputedStyle("background-position", "initial", "calc(-8px + 23%) calc(-9em + 24%)", "calc(23% - 8px) calc(24% - 144px)", "testing background-position: calc(-8px + 23%) calc(-9em + 24%)");
|
||||
|
||||
/* verifyComputedStyle(property_name, initial_value, specified_value, expected_value, description) */
|
||||
}
|
||||
|
||||
startTesting();
|
||||
|
||||
</script>
|
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>CSS Values and Units Test: serialization of 'background-position' when specified with calc() function</title>
|
||||
|
||||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
|
||||
<link rel="help" href="https://www.w3.org/TR/css4-values/#calc-serialize">
|
||||
|
||||
<meta name="flags" content="">
|
||||
<meta content="This test verifies how 6 calc() functions are serialized for 'background-position'." name="assert">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<div id="target"></div>
|
||||
|
||||
<script>
|
||||
function startTesting()
|
||||
{
|
||||
|
||||
var targetElement = document.getElementById("target");
|
||||
|
||||
function verifySerialization(specified_value, serialization_expected, description)
|
||||
{
|
||||
|
||||
test(function()
|
||||
{
|
||||
|
||||
targetElement.style.backgroundPosition = specified_value;
|
||||
|
||||
assert_equals(targetElement.style.backgroundPosition, serialization_expected);
|
||||
|
||||
}, description);
|
||||
}
|
||||
|
||||
/*
|
||||
verifySerialization(specified_value, serialization_expected, description)
|
||||
*/
|
||||
|
||||
verifySerialization("calc(2px + 3px) calc(4px + 5px)", "calc(5px) calc(9px)", "testing background-position: calc(2px + 3px) calc(4px + 5px)");
|
||||
|
||||
verifySerialization("calc(18px - 7px) calc(19px - 7px)", "calc(11px) calc(12px)", "testing background-position: calc(18px - 7px) calc(19px - 7px)");
|
||||
|
||||
verifySerialization("calc(4 * 5px) calc(6px * 4)", "calc(20px) calc(24px)", "testing background-position: calc(4 * 5px) calc(6px * 4)");
|
||||
|
||||
verifySerialization("calc(100px / 4) calc(119px / 7)", "calc(25px) calc(17px)", "testing background-position: calc(100px / 4) calc(119px / 7)");
|
||||
|
||||
/*
|
||||
verifySerialization(specified_value, serialization_expected, description)
|
||||
*/
|
||||
|
||||
verifySerialization("calc(6px + 21%) calc(7em + 22%)", "calc(21% + 6px) calc(22% + 7em)", "testing background-position: calc(6px + 21%) calc(7em + 22%)");
|
||||
|
||||
verifySerialization("calc(-8px + 23%) calc(-9em + 24%)", "calc(23% - 8px) calc(24% - 9em)", "testing background-position: calc(-8px + 23%) calc(-9em + 24%)");
|
||||
|
||||
/*
|
||||
|
||||
"
|
||||
Sort the terms in the following order:
|
||||
|
||||
The number, if present
|
||||
|
||||
The percentage, if present
|
||||
|
||||
The dimensions, ordered by their units ASCII case-insensitive alphabetically
|
||||
"
|
||||
https://www.w3.org/TR/css-values-4/#math-function-serialize-a-summation
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
startTesting();
|
||||
|
||||
</script>
|
|
@ -0,0 +1,75 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>CSS Values and Units Test: calc() function in 'min-height' and 'box-sizing: border-box' (complex)</title>
|
||||
|
||||
<!--
|
||||
|
||||
Original test is:
|
||||
|
||||
https://chromium.googlesource.com/chromium/src/+/c825d655f6aaf73484f9d56e9012793f5b9668cc/third_party/WebKit/LayoutTests/css3/calc/calc-min-height.html
|
||||
|
||||
The original test is related to:
|
||||
|
||||
Issue 580508: Height of content changes after multiple reloads
|
||||
https://bugs.chromium.org/p/chromium/issues/detail?id=580508
|
||||
|
||||
-->
|
||||
|
||||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-values-3/#calc-notation">
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
|
||||
|
||||
<meta name="flags" content="">
|
||||
<meta name="assert" content="This test checks how 'min-height' with calc(percentage) and 'box-sizing' are handled. The percentage in the calc() is calculated on the content box height of div#container.">
|
||||
|
||||
<style>
|
||||
div#container
|
||||
{
|
||||
border-bottom: transparent solid 100px;
|
||||
border-right: transparent solid 100px;
|
||||
height: 400px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
div#item
|
||||
{
|
||||
background-color: red;
|
||||
box-sizing: border-box;
|
||||
height: 50px;
|
||||
min-height: calc(50% - 100px);
|
||||
}
|
||||
|
||||
div#item > div
|
||||
{
|
||||
background-color: green;
|
||||
border-bottom: green solid 34px; /* arbitrary border-bottom-width value */
|
||||
border-top: green solid 12px; /* arbitrary border-top-width value */
|
||||
box-sizing: border-box;
|
||||
height: 17px;
|
||||
min-height: 100%; /* content height should be 100px - 34px - 12px == 54px */
|
||||
overflow-y: visible;
|
||||
/*
|
||||
If the content height of innermost div is taller
|
||||
than 54px, then a green rectangle (not a square)
|
||||
will be created.
|
||||
|
||||
If the content height of innermost div is less
|
||||
than 54px, then an horizontal stripe of red
|
||||
will become visible.
|
||||
*/
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="item">
|
||||
|
||||
<div></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,78 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>CSS Values and Units Test: serialization of summation involving nested calc()</title>
|
||||
|
||||
<!--
|
||||
|
||||
This test is an adapted version of the portion of the original test
|
||||
|
||||
https://chromium.googlesource.com/chromium/src/+/c825d655f6aaf73484f9d56e9012793f5b9668cc/third_party/WebKit/LayoutTests/css3/calc/calc-nesting.html
|
||||
|
||||
which required using property-parsing-test.js
|
||||
|
||||
-->
|
||||
|
||||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-values-4/#math-function-simplify-an-expression">
|
||||
|
||||
<meta content="This test checks that how a summation involving one or more nested calc() is performed and serialized." name="assert">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<div id="target"></div>
|
||||
|
||||
<script>
|
||||
function startTesting()
|
||||
{
|
||||
|
||||
var targetElement = document.getElementById("target");
|
||||
|
||||
function verifySerialization(specified_value, serialization_expected, description)
|
||||
{
|
||||
|
||||
test(function()
|
||||
{
|
||||
|
||||
targetElement.style.left = specified_value;
|
||||
|
||||
assert_equals(targetElement.style.left, serialization_expected);
|
||||
|
||||
}, description);
|
||||
}
|
||||
|
||||
verifySerialization("calc(20px + calc(80px))", "calc(100px)", "testing calc(20px + calc(80px))");
|
||||
|
||||
verifySerialization("calc(calc(100px))", "calc(100px)", "testing calc(calc(100px))");
|
||||
|
||||
verifySerialization("calc(calc(2) * calc(50px)", "calc(100px)", "testing calc(calc(2) * calc(50px)");
|
||||
|
||||
verifySerialization("calc(calc(150px*2/3)", "calc(100px)", "testing calc(calc(150px*2/3)");
|
||||
|
||||
verifySerialization("calc(calc(2 * calc(calc(3)) + 4) * 10px)", "calc(100px)", "testing calc(calc(2 * calc(calc(3)) + 4) * 10px)");
|
||||
|
||||
verifySerialization("calc(50px + calc(40%))", "calc(40% + 50px)", "testing calc(50px + calc(40%))");
|
||||
|
||||
/*
|
||||
|
||||
"
|
||||
Sort the terms in the following order:
|
||||
|
||||
The number, if present
|
||||
|
||||
The percentage, if present
|
||||
|
||||
The dimensions, ordered by their units ASCII case-insensitive alphabetically
|
||||
"
|
||||
https://www.w3.org/TR/css-values-4/#math-function-serialize-a-summation
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
startTesting();
|
||||
|
||||
</script>
|
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>CSS Values and Units Test: nested calc() functions</title>
|
||||
|
||||
<!--
|
||||
|
||||
This test is the first portion of the original test
|
||||
|
||||
https://chromium.googlesource.com/chromium/src/+/c825d655f6aaf73484f9d56e9012793f5b9668cc/third_party/WebKit/LayoutTests/css3/calc/calc-nesting.html
|
||||
|
||||
-->
|
||||
|
||||
<link rel="help" href="https://www.w3.org/TR/css-values-3/#calc-notation">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<style>
|
||||
#parent { width: 200px; }
|
||||
#div1 { width: calc(calc(50px)); }
|
||||
#div2 { width: calc(calc(60%) - 20px); }
|
||||
#div3 { width: calc(calc(3 * 25%)); }
|
||||
#div4 {
|
||||
--width: calc(10% + 30px);
|
||||
width: calc(2 * var(--width));
|
||||
}
|
||||
</style>
|
||||
<div id=parent>
|
||||
<div id=div1></div>
|
||||
<div id=div2></div>
|
||||
<div id=div3></div>
|
||||
<div id=div4></div>
|
||||
</div>
|
||||
<script>
|
||||
// Tests that require layout
|
||||
test(function(){
|
||||
assert_equals(getComputedStyle(div1).width, "50px");
|
||||
assert_equals(getComputedStyle(div2).width, "100px");
|
||||
assert_equals(getComputedStyle(div3).width, "150px");
|
||||
assert_equals(getComputedStyle(div4).width, "100px");
|
||||
}, "Nested calcs should work with layout");
|
||||
</script>
|
|
@ -0,0 +1,95 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>CSS Values and Units: calc() serialization of a summation (complex)</title>
|
||||
|
||||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-values-4/#compat">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-values-4/#calc-serialize">
|
||||
|
||||
<meta content="This test verifies how 11 summations of mixed length units are serialized. Absolute length units, relative length units, font-relative length units, viewport-percentage length units and percentage units are tested." name="assert">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<div id="target"></div>
|
||||
|
||||
<script>
|
||||
function startTesting()
|
||||
{
|
||||
|
||||
var targetElement = document.getElementById("target");
|
||||
|
||||
function verifySerialization(specified_value, serialization_expected, description)
|
||||
{
|
||||
|
||||
test(function()
|
||||
{
|
||||
|
||||
targetElement.style.height = specified_value;
|
||||
|
||||
assert_equals(targetElement.style.height, serialization_expected);
|
||||
|
||||
}, description);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
"
|
||||
Sort the terms in the following order:
|
||||
|
||||
The number, if present
|
||||
|
||||
The percentage, if present
|
||||
|
||||
The dimensions, ordered by their units ASCII case-insensitive alphabetically
|
||||
"
|
||||
https://www.w3.org/TR/css-values-4/#math-function-serialize-a-summation
|
||||
|
||||
cm centimeters 1cm = 96px/2.54
|
||||
mm millimeters 1mm = 1/10th of 1cm
|
||||
Q quarter-millimeters 1Q = 1/40th of 1cm
|
||||
in inches 1in = 2.54cm = 96px
|
||||
pc picas 1pc = 1/6th of 1in
|
||||
pt points 1pt = 1/72th of 1in
|
||||
px pixels 1px = 1/96th of 1in
|
||||
|
||||
*/
|
||||
|
||||
verifySerialization("calc(1vh + 2px + 3%)", "calc(3% + 2px + 1vh)", "testing calc(1vh + 2px + 3%)");
|
||||
|
||||
verifySerialization("calc(4px + 1vh)", "calc(4px + 1vh)", "testing calc(4px + 1vh)");
|
||||
|
||||
verifySerialization("calc(5px + 6em + 1vh)", "calc(6em + 5px + 1vh)", "testing calc(5px + 6em + 1vh)");
|
||||
|
||||
verifySerialization("calc(1vh - 7px)", "calc(-7px + 1vh)", "testing calc(1vh - 7px)");
|
||||
|
||||
verifySerialization("calc(-8px + 9em + 1vh)", "calc(9em - 8px + 1vh)", "testing calc(-8px + 9em + 1vh)");
|
||||
|
||||
verifySerialization("calc(1pc + 1in + 1vh + 10%)", "calc(10% + 112px + 1vh)", "testing calc(1pc + 1in + 1vh + 10%)");
|
||||
|
||||
/* verifySerialization(specified_value, serialization_expected, description) */
|
||||
|
||||
verifySerialization("calc(25.4q + 1vh + 12%)", "calc(12% + 24px + 1vh)", "testing calc(25.4q + 1vh + 12%)");
|
||||
|
||||
verifySerialization("calc(1em + 1.27cm + 13% + 3em)", "calc(13% + 4em + 48px)", "testing calc(1em + 1.27cm + 13% + 3em)");
|
||||
|
||||
verifySerialization("calc(1vmin - 14%)", "calc(-14% + 1vmin)", "testing calc(1vmin - 14%)");
|
||||
|
||||
verifySerialization("calc(15vw + 16vmin - 17vh)", "calc(-17vh + 16vmin + 15vw)", "testing calc(15vw + 16vmin - 17vh)");
|
||||
|
||||
verifySerialization("calc(-80px + 25.4mm)", "calc(16px)", "testing calc(-80px + 25.4mm)");
|
||||
|
||||
/*
|
||||
This calc(-80px + 25.4mm) test is on purpose last. We want the
|
||||
div#target to occupy 16px and to not cause document box height
|
||||
to be unneedlessly tall.
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
startTesting();
|
||||
|
||||
</script>
|
|
@ -0,0 +1,59 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>CSS Values and Units Test: computed value of 'z-index' when specified with calc() function and fractional values</title>
|
||||
|
||||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-values-4/#calc-range">
|
||||
|
||||
<meta name="flags" content="">
|
||||
<meta content="This test verifies how 2 calc() functions are computed for 'z-index' when involved expressions end up being numbers halfway between adjacent integers." name="assert">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<div id="target"></div>
|
||||
|
||||
<script>
|
||||
function startTesting()
|
||||
{
|
||||
|
||||
var targetElement = document.getElementById("target");
|
||||
|
||||
function verifyComputedStyle(property_name, initial_value, specified_value, expected_value, description)
|
||||
{
|
||||
|
||||
test(function()
|
||||
{
|
||||
|
||||
targetElement.style.setProperty(property_name, initial_value);
|
||||
|
||||
/*
|
||||
The purpose of the initial_value is to act as a fallback
|
||||
value in case the calc() function in the specified value
|
||||
fails or in case it generates an invalid value. Since we
|
||||
are running 2 consecutive tests on the same element,
|
||||
then it is necessary to reset its property to an initial
|
||||
value.
|
||||
*/
|
||||
|
||||
targetElement.style.setProperty(property_name, specified_value);
|
||||
|
||||
assert_equals(getComputedStyle(targetElement)[property_name], expected_value);
|
||||
|
||||
}, description);
|
||||
}
|
||||
|
||||
/* verifyComputedStyle(property_name, initial_value, specified_value, expected_value, description) */
|
||||
|
||||
verifyComputedStyle("z-index", "auto", "calc(3 / 2)", "2", "testing z-index: calc(3 / 2)");
|
||||
|
||||
verifyComputedStyle("z-index", "auto", "calc(-3 / 2)", "-1", "testing z-index: calc(-3 / 2)");
|
||||
|
||||
}
|
||||
|
||||
startTesting();
|
||||
|
||||
</script>
|
|
@ -0,0 +1,80 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>CSS Values Test: percentages in calc() and computed border-radius values</title>
|
||||
|
||||
<!--
|
||||
|
||||
Bugzilla bug report 1516454: Computed value of border-radius with calc(percentage) is incorrect
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1516454
|
||||
|
||||
-->
|
||||
|
||||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-values-3/#calc-computed-value">
|
||||
|
||||
<style>
|
||||
div#target
|
||||
{
|
||||
border: black solid 5px;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<div id="target"></div>
|
||||
|
||||
<script>
|
||||
function startTesting()
|
||||
{
|
||||
|
||||
var targetElement = document.getElementById("target");
|
||||
|
||||
function compareValue(property_name, calcValue, expectedValue, description)
|
||||
{
|
||||
|
||||
test(function()
|
||||
{
|
||||
|
||||
targetElement.style.setProperty(property_name, "initial");
|
||||
|
||||
targetElement.style.setProperty(property_name, calcValue);
|
||||
|
||||
var computedCalcValue = getComputedStyle(targetElement)[property_name];
|
||||
|
||||
targetElement.style.setProperty(property_name, expectedValue);
|
||||
|
||||
var computedExpectedValue = getComputedStyle(targetElement)[property_name];
|
||||
|
||||
assert_equals(computedCalcValue, computedExpectedValue);
|
||||
|
||||
}, description);
|
||||
}
|
||||
|
||||
compareValue("border-top-left-radius", "calc(50%)", "50%", "simple percentage conversion test 1");
|
||||
|
||||
compareValue("border-top-right-radius", "calc(50%)", "50%", "simple percentage conversion test 2");
|
||||
|
||||
compareValue("border-bottom-left-radius", "calc(50%)", "50%", "simple percentage conversion test 3");
|
||||
|
||||
compareValue("border-bottom-right-radius", "calc(50%)", "50%", "simple percentage conversion test 4");
|
||||
|
||||
compareValue("border-top-left-radius", "calc(50%) calc(25%)", "50% 25%", "percentage conversion test 5");
|
||||
|
||||
compareValue("border-top-right-radius", "calc(50%) calc(25%)", "50% 25%", "percentage conversion test 6");
|
||||
|
||||
compareValue("border-bottom-left-radius", "calc(50%) calc(25%)", "50% 25%", "percentage conversion test 7");
|
||||
|
||||
compareValue("border-bottom-right-radius", "calc(50%) calc(25%)", "50% 25%", "percentage conversion test 8");
|
||||
}
|
||||
|
||||
startTesting();
|
||||
|
||||
</script>
|
|
@ -110,7 +110,7 @@ the same way as the test.
|
|||
|
||||
<label>
|
||||
<input type="checkbox">
|
||||
The test and reference render within a 600x600 viewport, only displaying
|
||||
The test and reference render within a 800x600 viewport, only displaying
|
||||
scrollbars if their presence is being tested.
|
||||
</label>
|
||||
|
||||
|
@ -180,7 +180,7 @@ several minutes thinking or asking questions.
|
|||
|
||||
<label>
|
||||
<input type="checkbox">
|
||||
The test renders within a 600x600 viewport, only displaying scrollbars if their
|
||||
The test renders within a 800x600 viewport, only displaying scrollbars if their
|
||||
presence is being tested.
|
||||
</label>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ The tests make a number of assumptions of the user agent, and new
|
|||
tests can freely rely on these assumptions being true:
|
||||
|
||||
* The device is a full-color device.
|
||||
* The device has a viewport width of at least 600px.
|
||||
* The device has a viewport width of at least 800px.
|
||||
* The UA imposes no minimum font size.
|
||||
* The `medium` `font-size` computes to 16px.
|
||||
* The canvas background is `white`.
|
||||
|
|
|
@ -90,7 +90,7 @@ headers.
|
|||
### Be Short
|
||||
|
||||
Tests should be as short as possible. For reftests in particular
|
||||
scrollbars at 600×600px window size must be avoided unless scrolling
|
||||
scrollbars at 800×600px window size must be avoided unless scrolling
|
||||
behavior is specifically being tested. For all tests extraneous
|
||||
elements on the page should be avoided so it is clear what is part of
|
||||
the test (for a typical testharness test, the only content on the page
|
||||
|
|
|
@ -27,7 +27,7 @@ tested. It also contains a `link` element with `rel="match"` or
|
|||
`rel="mismatch"` and `href` attribute pointing to the *reference*
|
||||
file, e.g. `<link rel=match href=references/green-box-ref.html>`. A
|
||||
`match` test only passes if the two files render pixel-for-pixel
|
||||
identically within a 600x600 window *including* scroll-bars if
|
||||
identically within a 800x600 window *including* scroll-bars if
|
||||
present; a `mismatch` test only passes if they *don't* render
|
||||
identically.
|
||||
|
||||
|
|
|
@ -212,6 +212,8 @@ promise_test(function(t) {
|
|||
}, "Another example");
|
||||
```
|
||||
|
||||
## `EventWatcher` ##
|
||||
|
||||
`EventWatcher` is a constructor function that allows DOM events to be handled
|
||||
using Promises, which can make it a lot easier to test a very specific series
|
||||
of events, including ensuring that unexpected events are not fired at any point.
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<!doctype html>
|
||||
<p>innerWidth x innerHeight: <span>600x600</span></p>
|
||||
<p>innerWidth x innerHeight: <span>800x600</span></p>
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
div {
|
||||
font-size: 10px;
|
||||
line-height: 50px;
|
||||
border: 1px solid blue;
|
||||
}
|
||||
img {
|
||||
width: 1em;
|
||||
height: 2em;
|
||||
background: orange;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
.top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div>
|
||||
<img class="text-top" src="/css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="text-bottom" src="/css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="top" src="/css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="bottom" src="/css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="text-top" src="/css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
<div>
|
||||
<img class="text-bottom" src="/css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
<div>
|
||||
<img class="top" src="/css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
<div>
|
||||
<img class="bottom" src="/css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
</body>
|
|
@ -30,27 +30,27 @@ img {
|
|||
</style>
|
||||
<body>
|
||||
<div>
|
||||
<img class="text-top" src="../css/support/60x60-red.png">Y
|
||||
<img class="text-top" src="/css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="text-bottom" src="../css/support/60x60-red.png">Y
|
||||
<img class="text-bottom" src="/css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="top" src="../css/support/60x60-red.png">Y
|
||||
<img class="top" src="/css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="bottom" src="../css/support/60x60-red.png">Y
|
||||
<img class="bottom" src="/css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="text-top" src="../css/support/60x60-red.png"><span>Y</span>
|
||||
<img class="text-top" src="/css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
<div>
|
||||
<img class="text-bottom" src="../css/support/60x60-red.png"><span>Y</span>
|
||||
<img class="text-bottom" src="/css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
<div>
|
||||
<img class="top" src="../css/support/60x60-red.png"><span>Y</span>
|
||||
<img class="top" src="/css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
<div>
|
||||
<img class="bottom" src="../css/support/60x60-red.png"><span>Y</span>
|
||||
<img class="bottom" src="/css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
</body>
|
|
@ -1,52 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
div {
|
||||
font-size: 10px;
|
||||
line-height: 50px;
|
||||
border: 1px solid blue;
|
||||
}
|
||||
img {
|
||||
width: 1em;
|
||||
height: 2em;
|
||||
background: orange;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.text-top {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
.text-bottom {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
.top {
|
||||
vertical-align: top;
|
||||
}
|
||||
.bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div>
|
||||
<img class="text-top" src="../../css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="text-bottom" src="../../css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="top" src="../../css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="bottom" src="../../css/support/60x60-red.png">Y
|
||||
</div>
|
||||
<div>
|
||||
<img class="text-top" src="../../css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
<div>
|
||||
<img class="text-bottom" src="../../css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
<div>
|
||||
<img class="top" src="../../css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
<div>
|
||||
<img class="bottom" src="../../css/support/60x60-red.png"><span>Y</span>
|
||||
</div>
|
||||
</body>
|
|
@ -1,7 +1,7 @@
|
|||
marionette_driver==2.7.0
|
||||
mozprofile==2.2.0
|
||||
mozprocess==1.0.0
|
||||
mozcrash == 1.0
|
||||
mozcrash==1.1.0
|
||||
mozrunner==7.3.0
|
||||
mozleak==0.2
|
||||
mozinstall==2.0.0
|
||||
|
|
|
@ -146,7 +146,7 @@ class FennecBrowser(FirefoxBrowser):
|
|||
"network.preload": True})
|
||||
if self.test_type == "reftest":
|
||||
self.logger.info("Setting android reftest preferences")
|
||||
self.profile.set_preferences({"browser.viewport.desktopWidth": 600,
|
||||
self.profile.set_preferences({"browser.viewport.desktopWidth": 800,
|
||||
# Disable high DPI
|
||||
"layout.css.devPixelsPerPx": "1.0",
|
||||
# Ensure that the full browser element
|
||||
|
|
|
@ -87,6 +87,7 @@ def browser_kwargs(test_type, run_info_data, config, **kwargs):
|
|||
"stylo_threads": kwargs["stylo_threads"],
|
||||
"chaos_mode_flags": kwargs["chaos_mode_flags"],
|
||||
"config": config,
|
||||
"browser_channel": kwargs["browser_channel"],
|
||||
"headless": kwargs["headless"]}
|
||||
|
||||
|
||||
|
@ -187,7 +188,7 @@ class FirefoxBrowser(Browser):
|
|||
symbols_path=None, stackwalk_binary=None, certutil_binary=None,
|
||||
ca_certificate_path=None, e10s=False, lsan_dir=None, stackfix_dir=None,
|
||||
binary_args=None, timeout_multiplier=None, leak_check=False, asan=False,
|
||||
stylo_threads=1, chaos_mode_flags=None, config=None, headless=None, **kwargs):
|
||||
stylo_threads=1, chaos_mode_flags=None, config=None, browser_channel="nightly", headless=None, **kwargs):
|
||||
Browser.__init__(self, logger)
|
||||
self.binary = binary
|
||||
self.prefs_root = prefs_root
|
||||
|
@ -224,6 +225,7 @@ class FirefoxBrowser(Browser):
|
|||
self.lsan_handler = None
|
||||
self.stylo_threads = stylo_threads
|
||||
self.chaos_mode_flags = chaos_mode_flags
|
||||
self.browser_channel = browser_channel
|
||||
self.headless = headless
|
||||
|
||||
def settings(self, test):
|
||||
|
@ -326,7 +328,10 @@ class FirefoxBrowser(Browser):
|
|||
if os.path.isfile(profiles):
|
||||
with open(profiles, 'r') as fh:
|
||||
for name in json.load(fh)['web-platform-tests']:
|
||||
pref_paths.append(os.path.join(self.prefs_root, name, 'user.js'))
|
||||
if self.browser_channel in (None, 'nightly'):
|
||||
pref_paths.append(os.path.join(self.prefs_root, name, 'user.js'))
|
||||
elif name != 'unittest-features':
|
||||
pref_paths.append(os.path.join(self.prefs_root, name, 'user.js'))
|
||||
else:
|
||||
# Old preference files used before the creation of profiles.json (remove when no longer supported)
|
||||
legacy_pref_paths = (
|
||||
|
|
|
@ -868,7 +868,9 @@ class InternalRefTestImplementation(object):
|
|||
{"test": self.executor.test_url(test),
|
||||
"references": references,
|
||||
"expected": test.expected(),
|
||||
"timeout": timeout})["value"]
|
||||
"timeout": timeout,
|
||||
"width": 800,
|
||||
"height": 600})["value"]
|
||||
return rv
|
||||
|
||||
def get_references(self, node):
|
||||
|
|
|
@ -372,7 +372,7 @@ class SeleniumRefTestExecutor(RefTestExecutor):
|
|||
"""return [window.outerWidth - window.innerWidth,
|
||||
window.outerHeight - window.innerHeight];"""
|
||||
)
|
||||
self.protocol.webdriver.set_window_rect(0, 0, 600 + width_offset, 600 + height_offset)
|
||||
self.protocol.webdriver.set_window_rect(0, 0, 800 + width_offset, 600 + height_offset)
|
||||
|
||||
result = self.implementation.run_test(test)
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ class ServoRefTestExecutor(ProcessTestExecutor):
|
|||
for pref, value in test.environment.get('prefs', {}).iteritems():
|
||||
command += ["--pref", "%s=%s" % (pref, value)]
|
||||
|
||||
command += ["--resolution", viewport_size or "600x600"]
|
||||
command += ["--resolution", viewport_size or "800x600"]
|
||||
|
||||
if self.browser.ca_certificate_path:
|
||||
command += ["--certificate-path", self.browser.ca_certificate_path]
|
||||
|
|
|
@ -406,7 +406,7 @@ class WebDriverRefTestExecutor(RefTestExecutor):
|
|||
window.outerHeight - window.innerHeight];"""
|
||||
)
|
||||
self.protocol.webdriver.window.position = (0, 0)
|
||||
self.protocol.webdriver.window.size = (600 + width_offset, 600 + height_offset)
|
||||
self.protocol.webdriver.window.size = (800 + width_offset, 600 + height_offset)
|
||||
|
||||
result = self.implementation.run_test(test)
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
var win = window.open("about:blank", "test", "left=0,top=0,width=600,height=600");
|
||||
var win = window.open("about:blank", "test", "left=0,top=0,width=800,height=600");
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// META: script=/wasm/jsapi/wasm-module-builder.js
|
||||
// META: script=assertions.js
|
||||
|
||||
let functions;
|
||||
let functions = {};
|
||||
setup(() => {
|
||||
const builder = new WasmModuleBuilder();
|
||||
|
||||
|
|
|
@ -98,6 +98,12 @@ class WasmFunctionBuilder {
|
|||
}
|
||||
|
||||
addBody(body) {
|
||||
const bodyCopy = body.slice();
|
||||
bodyCopy.push(kExprEnd);
|
||||
return this.addBodyWithEnd(bodyCopy);
|
||||
}
|
||||
|
||||
addBodyWithEnd(body) {
|
||||
this.body = body;
|
||||
return this;
|
||||
}
|
||||
|
@ -262,6 +268,11 @@ class WasmModuleBuilder {
|
|||
return this.setTableBounds(length);
|
||||
}
|
||||
|
||||
// TODO(ssauleau): legacy, remove this
|
||||
setTableLength(min, max = undefined) {
|
||||
return this.setTableBounds(min, max);
|
||||
}
|
||||
|
||||
toArray(debug = false) {
|
||||
let binary = new Binary;
|
||||
let wasm = this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue