mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Update web-platform-tests to revision 03fff324c7345277c2a581564bd972f2b5c9f74a
This commit is contained in:
parent
525d515a89
commit
c6f0951dbc
61 changed files with 1291 additions and 261 deletions
|
@ -220,10 +220,11 @@ jobs:
|
|||
parameters:
|
||||
packages: virtualenv
|
||||
- template: tools/ci/azure/install_certs.yml
|
||||
- template: tools/ci/azure/install_edge.yml
|
||||
- template: tools/ci/azure/update_hosts.yml
|
||||
- template: tools/ci/azure/update_manifest.yml
|
||||
- script: python ./wpt run --yes --no-manifest-update --install-fonts --manifest MANIFEST.json --metadata infrastructure/metadata/ --webdriver-arg=--verbose --log-tbpl $(Build.ArtifactStagingDirectory)/edge.tbpl.log --log-tbpl-level info edge_webdriver infrastructure/
|
||||
displayName: 'Run tests (Edge)'
|
||||
- script: python ./wpt run --yes --no-manifest-update --install-fonts --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl $(Build.ArtifactStagingDirectory)/edge.tbpl.log --log-tbpl-level info --channel dev edgechromium infrastructure/
|
||||
displayName: 'Run tests (Edge Dev)'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish results'
|
||||
inputs:
|
||||
|
@ -252,10 +253,11 @@ jobs:
|
|||
parameters:
|
||||
packages: virtualenv
|
||||
- template: tools/ci/azure/install_certs.yml
|
||||
- template: tools/ci/azure/install_edge.yml
|
||||
- template: tools/ci/azure/update_hosts.yml
|
||||
- template: tools/ci/azure/update_manifest.yml
|
||||
- script: python ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --install-fonts --webdriver-arg=--verbose --test-types reftest testharness --this-chunk $(System.JobPositionInPhase) --total-chunks $(System.TotalJobsInPhase) --chunk-type hash --log-tbpl - --log-tbpl-level info --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt edge_webdriver
|
||||
displayName: 'Run tests'
|
||||
- script: python ./wpt run --yes --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --install-fonts --this-chunk $(System.JobPositionInPhase) --total-chunks $(System.TotalJobsInPhase) --chunk-type hash --log-tbpl - --log-tbpl-level info --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt edgechromium
|
||||
displayName: 'Run tests (Edge Dev)'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish results'
|
||||
inputs:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
spec: https://heycam.github.io/webidl/
|
||||
suggested_reviewers:
|
||||
- domenic
|
||||
- tobie
|
||||
- yuki3
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Decoration Test: parsing text-decoration-width computed values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property">
|
||||
<meta name="assert" content="text-decoration-width 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("text-decoration-width", "auto");
|
||||
test_computed_value("text-decoration-width", "from-font");
|
||||
test_computed_value("text-decoration-width", "calc(10px - 8px)", "2px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" title="2.4 Text Decoration Width: the 'text-decoration-width' property"
|
||||
href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property" />
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(getComputedStyle(document.body)["text-decoration-width"], "auto", "Must be set to value auto as initial value.");
|
||||
}, "Initial value of text-decoration-width should be auto");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Decoration Test: parsing text-decoration-width with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property">
|
||||
<meta name="assert" content="text-decoration-width supports the following values: auto | from-font | <length>">
|
||||
<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("text-decoration-width", "otto");
|
||||
test_invalid_value("text-decoration-width", "asdlflj");
|
||||
test_invalid_value("text-decoration-width", "-10");
|
||||
test_invalid_value("text-decoration-width", "60002020");
|
||||
test_invalid_value("text-decoration-width", "!@#$%^&");
|
||||
test_invalid_value("text-decoration-width", "10e2");
|
||||
test_invalid_value("text-decoration-width", "from font");
|
||||
test_invalid_value("text-decoration-width", "10%");
|
||||
test_invalid_value("text-decoration-width", "-27%");
|
||||
test_invalid_value("text-decoration-width", "calc(40% - 20px)");
|
||||
test_invalid_value("text-decoration-width", "calc(100% - 40em)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Decoration Test: parsing text-decoration-width longhands with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property">
|
||||
<meta name="assert" content="text-decoration-width supports the following values: auto | from-font | <length>">
|
||||
<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("text-decoration-width", "auto");
|
||||
test_valid_value("text-decoration-width", "from-font");
|
||||
test_valid_value("text-decoration-width", "-10px");
|
||||
test_valid_value("text-decoration-width", "2001em");
|
||||
test_valid_value("text-decoration-width", "-49em");
|
||||
test_valid_value("text-decoration-width", "53px");
|
||||
test_valid_value("text-decoration-width", "calc(40em - 10px)");
|
||||
test_valid_value("text-decoration-width", "calc(-50em + 13px)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -19,8 +19,18 @@ runListValuedPropertyTests('animation-timing-function', [
|
|||
{ syntax: 'ease-in' },
|
||||
{ syntax: 'ease-out' },
|
||||
{ syntax: 'ease-in-out' },
|
||||
{ syntax: 'step-start' },
|
||||
{ syntax: 'step-end' },
|
||||
{
|
||||
syntax: 'step-start',
|
||||
computed: (_, result) => {
|
||||
assert_equals(result.toString(), 'steps(1, start)');
|
||||
}
|
||||
},
|
||||
{
|
||||
syntax: 'step-end',
|
||||
computed: (_, result) => {
|
||||
assert_equals(result.toString(), 'steps(1)');
|
||||
}
|
||||
},
|
||||
]);
|
||||
|
||||
runUnsupportedPropertyTests('animation-timing-function', [
|
||||
|
|
|
@ -19,8 +19,18 @@ runListValuedPropertyTests('transition-timing-function', [
|
|||
{ syntax: 'ease-in' },
|
||||
{ syntax: 'ease-out' },
|
||||
{ syntax: 'ease-in-out' },
|
||||
{ syntax: 'step-start' },
|
||||
{ syntax: 'step-end' },
|
||||
{
|
||||
syntax: 'step-start',
|
||||
computed: (_, result) => {
|
||||
assert_equals(result.toString(), 'steps(1, start)');
|
||||
}
|
||||
},
|
||||
{
|
||||
syntax: 'step-end',
|
||||
computed: (_, result) => {
|
||||
assert_equals(result.toString(), 'steps(1)');
|
||||
}
|
||||
},
|
||||
]);
|
||||
|
||||
runUnsupportedPropertyTests('transition-timing-function', [
|
||||
|
|
|
@ -10,15 +10,10 @@
|
|||
const values = ["none",
|
||||
"auto",
|
||||
"button",
|
||||
"button-bevel",
|
||||
"caret",
|
||||
"checkbox",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"menulist",
|
||||
"menulist-button",
|
||||
"menulist-text",
|
||||
"menulist-textfield",
|
||||
"meter",
|
||||
"progress-bar",
|
||||
"push-button",
|
||||
|
@ -51,6 +46,7 @@
|
|||
|
||||
const invalidValues = ["bogus-button",
|
||||
"attachment",
|
||||
"button-bevel",
|
||||
"borderless-attachment",
|
||||
"button-arrow-down",
|
||||
"button-arrow-next",
|
||||
|
@ -58,6 +54,7 @@
|
|||
"button-arrow-up",
|
||||
"button-focus",
|
||||
"caps-lock-indicator",
|
||||
"caret",
|
||||
"checkbox-container",
|
||||
"checkbox-label",
|
||||
"checkmenuitem",
|
||||
|
@ -67,40 +64,42 @@
|
|||
"discrete-capacity-level-indicator",
|
||||
"dualbutton",
|
||||
"groupbox",
|
||||
"inner-spin-button",
|
||||
"image-controls-button",
|
||||
"inner-spin-button",
|
||||
"list-button",
|
||||
"listitem",
|
||||
"media-enter-fullscreen-button",
|
||||
"media-exit-fullscreen-button",
|
||||
"media-fullscreen-volume-slider",
|
||||
"media-fullscreen-volume-slider-thumb",
|
||||
"media-mute-button",
|
||||
"media-play-button",
|
||||
"media-overlay-play-button",
|
||||
"media-return-to-realtime-button",
|
||||
"media-rewind-button",
|
||||
"media-seek-back-button",
|
||||
"media-seek-forward-button",
|
||||
"media-toggle-closed-captions-button",
|
||||
"media-slider",
|
||||
"media-sliderthumb",
|
||||
"media-volume-slider-container",
|
||||
"media-volume-slider-mute-button",
|
||||
"media-volume-slider",
|
||||
"media-volume-sliderthumb",
|
||||
"media-controls-background",
|
||||
"media-controls-dark-bar-background",
|
||||
"media-controls-fullscreen-background",
|
||||
"media-controls-light-bar-background",
|
||||
"media-current-time-display",
|
||||
"media-enter-fullscreen-button",
|
||||
"media-exit-fullscreen-button",
|
||||
"media-fullscreen-volume-slider",
|
||||
"media-fullscreen-volume-slider-thumb",
|
||||
"media-mute-button",
|
||||
"media-overlay-play-button",
|
||||
"media-play-button",
|
||||
"media-return-to-realtime-button",
|
||||
"media-rewind-button",
|
||||
"media-seek-back-button",
|
||||
"media-seek-forward-button",
|
||||
"media-slider",
|
||||
"media-sliderthumb",
|
||||
"media-time-remaining-display",
|
||||
"media-toggle-closed-captions-button",
|
||||
"media-volume-slider",
|
||||
"media-volume-slider-container",
|
||||
"media-volume-slider-mute-button",
|
||||
"media-volume-sliderthumb",
|
||||
"menuarrow",
|
||||
"menubar",
|
||||
"menucheckbox",
|
||||
"menuimage",
|
||||
"menuitem",
|
||||
"menuitemtext",
|
||||
"menulist-text",
|
||||
"menulist-textfield",
|
||||
"menupopup",
|
||||
"menuradio",
|
||||
"menuseparator",
|
||||
|
@ -118,15 +117,16 @@
|
|||
"range",
|
||||
"range-thumb",
|
||||
"rating-level-indicator",
|
||||
"relevancy-level-indicator",
|
||||
"resizer",
|
||||
"resizerpanel",
|
||||
"scale-horizontal",
|
||||
"scalethumbend",
|
||||
"scale-vertical",
|
||||
"scalethumb-horizontal",
|
||||
"scalethumb-vertical",
|
||||
"scalethumbend",
|
||||
"scalethumbstart",
|
||||
"scalethumbtick",
|
||||
"scalethumb-vertical",
|
||||
"scale-vertical",
|
||||
"scrollbarbutton-down",
|
||||
"scrollbarbutton-left",
|
||||
"scrollbarbutton-right",
|
||||
|
@ -135,16 +135,16 @@
|
|||
"scrollbarthumb-vertical",
|
||||
"scrollbartrack-horizontal",
|
||||
"scrollbartrack-vertical",
|
||||
"searchfield-decoration",
|
||||
"searchfield-results-decoration",
|
||||
"searchfield-results-button",
|
||||
"searchfield-cancel-button",
|
||||
"snapshotted-plugin-overlay",
|
||||
"searchfield-decoration",
|
||||
"searchfield-results-button",
|
||||
"searchfield-results-decoration",
|
||||
"separator",
|
||||
"sheet",
|
||||
"slider-vertical",
|
||||
"sliderthumb-horizontal",
|
||||
"sliderthumb-vertical",
|
||||
"snapshotted-plugin-overlay",
|
||||
"spinner",
|
||||
"spinner-downbutton",
|
||||
"spinner-textfield",
|
||||
|
@ -153,10 +153,10 @@
|
|||
"statusbar",
|
||||
"statusbarpanel",
|
||||
"tab",
|
||||
"tabpanel",
|
||||
"tabpanels",
|
||||
"tab-scroll-arrow-back",
|
||||
"tab-scroll-arrow-forward ",
|
||||
"tabpanel",
|
||||
"tabpanels",
|
||||
"textfield-multiline",
|
||||
"toolbar",
|
||||
"toolbarbutton",
|
||||
|
@ -172,11 +172,11 @@
|
|||
"treetwisty",
|
||||
"treetwistyopen",
|
||||
"treeview",
|
||||
"relevancy-level-indicator",
|
||||
"-apple-pay-button",
|
||||
"-moz-win-borderless-glass",
|
||||
"-moz-win-browsertabbar-toolbox",
|
||||
"-moz-win-communicationstext",
|
||||
"-moz-win-communications-toolbox",
|
||||
"-moz-win-communicationstext",
|
||||
"-moz-win-exclude-glass",
|
||||
"-moz-win-glass",
|
||||
"-moz-win-media-toolbox",
|
||||
|
@ -191,7 +191,6 @@
|
|||
"-moz-window-frame-right",
|
||||
"-moz-window-titlebar",
|
||||
"-moz-window-titlebar-maximized",
|
||||
"-apple-pay-button",
|
||||
];
|
||||
for (const invalidValue of invalidValues) {
|
||||
test(() => {
|
||||
|
|
|
@ -46,9 +46,15 @@ var waitOnMessageFromSW = async t => {
|
|||
// worker destination
|
||||
/////////////////////
|
||||
promise_test(async t => {
|
||||
// We can use an html file as we don't really care about the worker successfully loading.
|
||||
// We can use an html file as we don't really care about the dedicated worker successfully loading.
|
||||
let worker = new frame.contentWindow.Worker("dummy.html?t=worker&dest=worker");
|
||||
await waitOnMessageFromSW(t);
|
||||
}, 'Worker fetches with a "worker" Request.destination');
|
||||
}, 'DedicatedWorker fetches with a "worker" Request.destination');
|
||||
|
||||
promise_test(async t => {
|
||||
// We can use an html file as we don't really care about the shared worker successfully loading.
|
||||
let worker = new frame.contentWindow.SharedWorker("dummy.html?t=sharedworker&dest=sharedworker");
|
||||
await waitOnMessageFromSW(t);
|
||||
}, 'SharedWorker fetches with a "sharedworker" Request.destination');
|
||||
|
||||
</script>
|
||||
|
|
|
@ -126,7 +126,7 @@ enum XREye {
|
|||
interface XRRigidTransform {
|
||||
[SameObject] readonly attribute DOMPointReadOnly position;
|
||||
[SameObject] readonly attribute DOMPointReadOnly orientation;
|
||||
[SameObject] readonly attribute Float32Array matrix;
|
||||
readonly attribute Float32Array matrix;
|
||||
[SameObject] readonly attribute XRRigidTransform inverse;
|
||||
};
|
||||
|
||||
|
@ -136,7 +136,7 @@ interface XRRigidTransform {
|
|||
interface XRRay {
|
||||
[SameObject] readonly attribute DOMPointReadOnly origin;
|
||||
[SameObject] readonly attribute DOMPointReadOnly direction;
|
||||
[SameObject] readonly attribute Float32Array matrix;
|
||||
readonly attribute Float32Array matrix;
|
||||
};
|
||||
|
||||
[SecureContext, Exposed=Window] interface XRPose {
|
||||
|
|
|
@ -319,6 +319,7 @@ SET TIMEOUT: resources/test/tests/functional/api-tests-1.html
|
|||
SET TIMEOUT: resources/test/tests/functional/worker.js
|
||||
SET TIMEOUT: resources/test/tests/functional/worker-uncaught-allow.js
|
||||
SET TIMEOUT: resources/test/tests/unit/exceptional-cases.html
|
||||
SET TIMEOUT: resources/test/tests/unit/exceptional-cases-timeouts.html
|
||||
SET TIMEOUT: resources/testharness.js
|
||||
|
||||
# setTimeout use in reftests
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>mfrac created dynamically</title>
|
||||
|
@ -7,7 +7,11 @@
|
|||
<meta name="assert" content="A dynamically added mfrac should render like the equivalent markup.">
|
||||
<link rel="match" href="frac-created-dynamically-2-ref.html">
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
window.addEventListener("load", function() {
|
||||
|
||||
// force initial layout so we're sure what we're testing against
|
||||
document.documentElement.getBoundingClientRect();
|
||||
|
||||
var mfrac = document.createElementNS("http://www.w3.org/1998/Math/MathML","mfrac");
|
||||
var mspace1 = document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");
|
||||
mspace1.setAttribute("width", "50px");
|
||||
|
@ -25,6 +29,8 @@
|
|||
mfrac.appendChild(mspace1);
|
||||
mfrac.appendChild(mspace2);
|
||||
mfrac.appendChild(mspace3);
|
||||
|
||||
document.documentElement.classList.remove('reftest-wait');
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<p>This test passes if you see a fraction 1/3.</p>
|
||||
<math>
|
||||
<mfrac>
|
||||
<mi>1</mi>
|
||||
<mi>3</mi>
|
||||
<mn>1</mn>
|
||||
<mn>3</mn>
|
||||
</mfrac>
|
||||
</math>
|
||||
</body>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>mfrac created dynamically</title>
|
||||
|
@ -7,11 +7,17 @@
|
|||
<meta name="assert" content="A dynamically added mfrac should render like the equivalent markup.">
|
||||
<link rel="match" href="frac-created-dynamically-3-ref.html">
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
var mi3 = document.createElementNS("http://www.w3.org/1998/Math/MathML","mi");
|
||||
mi3.appendChild(document.createTextNode("3"));
|
||||
document.getElementsByTagName("mfrac")[0].appendChild(mi3);
|
||||
document.getElementById("mi2").remove();
|
||||
window.addEventListener("load", function() {
|
||||
|
||||
// force initial layout so we're sure what we're testing against
|
||||
document.documentElement.getBoundingClientRect();
|
||||
|
||||
var mn3 = document.createElementNS("http://www.w3.org/1998/Math/MathML","mn");
|
||||
mn3.appendChild(document.createTextNode("3"));
|
||||
document.getElementsByTagName("mfrac")[0].appendChild(mn3);
|
||||
document.getElementById("mn2").remove();
|
||||
|
||||
document.documentElement.classList.remove('reftest-wait');
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
@ -19,8 +25,8 @@
|
|||
<p>This test passes if you see a fraction 1/3.</p>
|
||||
<math>
|
||||
<mfrac>
|
||||
<mi>1</mi>
|
||||
<mi id="mi2">2</mi>
|
||||
<mn>1</mn>
|
||||
<mn id="mn2">2</mn>
|
||||
</mfrac>
|
||||
</math>
|
||||
</body>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>mfrac created dynamically</title>
|
||||
|
@ -7,7 +7,11 @@
|
|||
<meta name="assert" content="A dynamically added mfrac should render like the equivalent markup.">
|
||||
<link rel="match" href="frac-created-dynamically-ref.html">
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
window.addEventListener("load", function() {
|
||||
|
||||
// force initial layout so we're sure what we're testing against
|
||||
document.documentElement.getBoundingClientRect();
|
||||
|
||||
var mfrac = document.createElementNS("http://www.w3.org/1998/Math/MathML","mfrac");
|
||||
var mspace1 = document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");
|
||||
mspace1.setAttribute("width", "50px");
|
||||
|
@ -20,6 +24,8 @@
|
|||
mfrac.appendChild(mspace1);
|
||||
mfrac.appendChild(mspace2);
|
||||
document.getElementsByTagName("math")[0].appendChild(mfrac);
|
||||
|
||||
document.documentElement.classList.remove('reftest-wait');
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title><mo> dynamic form</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>The test should render the same as the static reference.</p>
|
||||
|
||||
_<math><merror><mi>x</mi><mo>+</mo><mi>y</mi></merror></math>_
|
||||
_<math><mi>x</mi><mo>+</mo><mi>y</mi></math>_
|
||||
_<math><mphantom><mi>x</mi><mo>+</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt><mi>x</mi><mo>+</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle><mi>x</mi><mo>+</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
_<math><merror><mo>−</mo><mi>y</mi></merror></math>_
|
||||
_<math><mo>−</mo><mi>y</mi></math>_
|
||||
_<math><mphantom><mo>−</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow><mo>−</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt><mo>−</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle><mo>−</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title><mo> dynamic form</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#tokenmo">
|
||||
<meta name="assert" content="This test verifies that the form of the operators (and thus their spacing) is updated when you change the child list.">
|
||||
<link rel="match" href="mo-form-dynamic-ref.html">
|
||||
|
||||
<script>
|
||||
window.addEventListener("load", () => {
|
||||
|
||||
// force initial layout so we're sure what we're testing against
|
||||
document.documentElement.getBoundingClientRect();
|
||||
|
||||
for (var i = 1; i <= 6; i++) {
|
||||
var row = document.getElementById("row" + i);
|
||||
var x = document.getElementById("x" + i);
|
||||
|
||||
x.parentNode.removeChild(x);
|
||||
|
||||
row.insertBefore(x, row.firstElementChild);
|
||||
}
|
||||
|
||||
document.documentElement.classList.remove('reftest-wait');
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>The test should render the same as the static reference.</p>
|
||||
|
||||
_<math><merror id="row1"><mo>+</mo><mi>y</mi></merror></math>_
|
||||
_<math id="row2"><mo>+</mo><mi>y</mi></math>_
|
||||
_<math><mphantom id="row3"><mo>+</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow id="row4"><mo>+</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt id="row5"><mo>+</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle id="row6"><mo>+</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
_<math><merror><mi id="x1">x</mi><mo>−</mo><mi>y</mi></merror></math>_
|
||||
_<math><mi id="x2">x</mi><mo>−</mo><mi>y</mi></math>_
|
||||
_<math><mphantom><mi id="x3">x</mi><mo>−</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow><mi id="x4">x</mi><mo>−</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt><mi id="x5">x</mi><mo>−</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle><mi id="x6">x</mi><mo>−</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>form fallback</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<math>
|
||||
<mo stretchy="true">(</mo> <mspace height="3em" depth="3em"/> <mo stretchy="true">)</mo>
|
||||
<mo stretchy="true">(</mo> <mspace height="3em" depth="3em"/> <mo stretchy="true">)</mo>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>form fallback</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#tokenmo">
|
||||
<meta name="assert" content="Verify fallback to postfix/prefix forms.">
|
||||
<link rel="match" href="mo-form-fallback-ref.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- The left (respectively right) parenthesis only has a prefix
|
||||
(respectively postfix) form which gives its stretchiness.
|
||||
In theory, the parenthesis in the middle of the <math> element are
|
||||
considered infix operators and should not stretch. Let's check that we
|
||||
fallback to the postfix/prefix forms and actually make them stretchy.
|
||||
This is to handle bad MathML markup that misses explicit <mrow> tags.
|
||||
-->
|
||||
|
||||
<math>
|
||||
<mo>(</mo> <mspace height="3em" depth="3em"/> <mo>)</mo>
|
||||
<mo>(</mo> <mspace height="3em" depth="3em"/> <mo>)</mo>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,84 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>form plus/minus</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- These operators should have form "prefix" -->
|
||||
|
||||
_<math><merror><mo form="prefix" lspace="0em" rspace="0.055555em">−</mo><mi>x</mi></merror></math>_
|
||||
_<math><mo form="prefix" lspace="0em" rspace="0.055555em">−</mo><mi>x</mi></math>_
|
||||
_<math><mphantom><mo form="prefix" lspace="0em" rspace="0.055555em">−</mo><mi>x</mi></mphantom></math>_
|
||||
_<math><mrow><mo form="prefix" lspace="0em" rspace="0.055555em">−</mo><mi>x</mi></mrow></math>_
|
||||
_<math><msqrt><mo form="prefix" lspace="0em" rspace="0.055555em">−</mo><mi>x</mi></msqrt></math>_
|
||||
_<math><mstyle><mo form="prefix" lspace="0em" rspace="0.055555em">−</mo><mi>x</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mo form="prefix" lspace="0em" rspace="0.055555em">+</mo><mi>x</mi></merror></math>_
|
||||
_<math><mo form="prefix" lspace="0em" rspace="0.055555em">+</mo><mi>x</mi></math>_
|
||||
_<math><mphantom><mo form="prefix" lspace="0em" rspace="0.055555em">+</mo><mi>x</mi></mphantom></math>_
|
||||
_<math><mrow><mo form="prefix" lspace="0em" rspace="0.055555em">+</mo><mi>x</mi></mrow></math>_
|
||||
_<math><msqrt><mo form="prefix" lspace="0em" rspace="0.055555em">+</mo><mi>x</mi></msqrt></math>_
|
||||
_<math><mstyle><mo form="prefix" lspace="0em" rspace="0.055555em">+</mo><mi>x</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mo form="prefix" lspace="0em" rspace="0.055555em">±</mo><mi>x</mi></merror></math>_
|
||||
_<math><mo form="prefix" lspace="0em" rspace="0.055555em">±</mo><mi>x</mi></math>_
|
||||
_<math><mphantom><mo form="prefix" lspace="0em" rspace="0.055555em">±</mo><mi>x</mi></mphantom></math>_
|
||||
_<math><mrow><mo form="prefix" lspace="0em" rspace="0.055555em">±</mo><mi>x</mi></mrow></math>_
|
||||
_<math><msqrt><mo form="prefix" lspace="0em" rspace="0.055555em">±</mo><mi>x</mi></msqrt></math>_
|
||||
_<math><mstyle><mo form="prefix" lspace="0em" rspace="0.055555em">±</mo><mi>x</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mo form="prefix" lspace="0em" rspace="0.055555em">∓</mo><mi>x</mi></merror></math>_
|
||||
_<math><mo form="prefix" lspace="0em" rspace="0.055555em">∓</mo><mi>x</mi></math>_
|
||||
_<math><mphantom><mo form="prefix" lspace="0em" rspace="0.055555em">∓</mo><mi>x</mi></mphantom></math>_
|
||||
_<math><mrow><mo form="prefix" lspace="0em" rspace="0.055555em">∓</mo><mi>x</mi></mrow></math>_
|
||||
_<math><msqrt><mo form="prefix" lspace="0em" rspace="0.055555em">∓</mo><mi>x</mi></msqrt></math>_
|
||||
_<math><mstyle><mo form="prefix" lspace="0em" rspace="0.055555em">∓</mo><mi>x</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
<!-- These operators should have form "infix" -->
|
||||
|
||||
_<math><merror><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">−</mo><mi>y</mi></merror></math>_
|
||||
_<math><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">−</mo><mi>y</mi></math>_
|
||||
_<math><mphantom><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">−</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">−</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">−</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">−</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">+</mo><mi>y</mi></merror></math>_
|
||||
_<math><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">+</mo><mi>y</mi></math>_
|
||||
_<math><mphantom><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">+</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">+</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">+</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">+</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">±</mo><mi>y</mi></merror></math>_
|
||||
_<math><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">±</mo><mi>y</mi></math>_
|
||||
_<math><mphantom><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">±</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">±</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">±</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">±</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">∓</mo><mi>y</mi></merror></math>_
|
||||
_<math><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">∓</mo><mi>y</mi></math>_
|
||||
_<math><mphantom><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">∓</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">∓</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">∓</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle><mi>x</mi><mo form="infix" lspace="0.22222em" rspace="0.22222em">∓</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,87 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>form plus/minus</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#tokenmo">
|
||||
<meta name="assert" content="Verifies behavior of form of plus/minus etc.">
|
||||
<link rel="match" href="mo-form-minus-plus-ref.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- These operators should have form "prefix" -->
|
||||
|
||||
_<math><merror><mo>−</mo><mi>x</mi></merror></math>_
|
||||
_<math><mo>−</mo><mi>x</mi></math>_
|
||||
_<math><mphantom><mo>−</mo><mi>x</mi></mphantom></math>_
|
||||
_<math><mrow><mo>−</mo><mi>x</mi></mrow></math>_
|
||||
_<math><msqrt><mo>−</mo><mi>x</mi></msqrt></math>_
|
||||
_<math><mstyle><mo>−</mo><mi>x</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mo>+</mo><mi>x</mi></merror></math>_
|
||||
_<math><mo>+</mo><mi>x</mi></math>_
|
||||
_<math><mphantom><mo>+</mo><mi>x</mi></mphantom></math>_
|
||||
_<math><mrow><mo>+</mo><mi>x</mi></mrow></math>_
|
||||
_<math><msqrt><mo>+</mo><mi>x</mi></msqrt></math>_
|
||||
_<math><mstyle><mo>+</mo><mi>x</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mo>±</mo><mi>x</mi></merror></math>_
|
||||
_<math><mo>±</mo><mi>x</mi></math>_
|
||||
_<math><mphantom><mo>±</mo><mi>x</mi></mphantom></math>_
|
||||
_<math><mrow><mo>±</mo><mi>x</mi></mrow></math>_
|
||||
_<math><msqrt><mo>±</mo><mi>x</mi></msqrt></math>_
|
||||
_<math><mstyle><mo>±</mo><mi>x</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mo>∓</mo><mi>x</mi></merror></math>_
|
||||
_<math><mo>∓</mo><mi>x</mi></math>_
|
||||
_<math><mphantom><mo>∓</mo><mi>x</mi></mphantom></math>_
|
||||
_<math><mrow><mo>∓</mo><mi>x</mi></mrow></math>_
|
||||
_<math><msqrt><mo>∓</mo><mi>x</mi></msqrt></math>_
|
||||
_<math><mstyle><mo>∓</mo><mi>x</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
<!-- These operators should have form "infix" -->
|
||||
|
||||
_<math><merror><mi>x</mi><mo>−</mo><mi>y</mi></merror></math>_
|
||||
_<math><mi>x</mi><mo>−</mo><mi>y</mi></math>_
|
||||
_<math><mphantom><mi>x</mi><mo>−</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow><mi>x</mi><mo>−</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt><mi>x</mi><mo>−</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle><mi>x</mi><mo>−</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mi>x</mi><mo>+</mo><mi>y</mi></merror></math>_
|
||||
_<math><mi>x</mi><mo>+</mo><mi>y</mi></math>_
|
||||
_<math><mphantom><mi>x</mi><mo>+</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt><mi>x</mi><mo>+</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle><mi>x</mi><mo>+</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mi>x</mi><mo>±</mo><mi>y</mi></merror></math>_
|
||||
_<math><mi>x</mi><mo>±</mo><mi>y</mi></math>_
|
||||
_<math><mphantom><mi>x</mi><mo>±</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow><mi>x</mi><mo>±</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt><mi>x</mi><mo>±</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle><mi>x</mi><mo>±</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
<br/>
|
||||
|
||||
_<math><merror><mi>x</mi><mo>∓</mo><mi>y</mi></merror></math>_
|
||||
_<math><mi>x</mi><mo>∓</mo><mi>y</mi></math>_
|
||||
_<math><mphantom><mi>x</mi><mo>∓</mo><mi>y</mi></mphantom></math>_
|
||||
_<math><mrow><mi>x</mi><mo>∓</mo><mi>y</mi></mrow></math>_
|
||||
_<math><msqrt><mi>x</mi><mo>∓</mo><mi>y</mi></msqrt></math>_
|
||||
_<math><mstyle><mi>x</mi><mo>∓</mo><mi>y</mi></mstyle></math>_
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title><mo> form attribute</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- This checks the effect of @form on a prefix operator. -->
|
||||
_<math><mo lspace="0.27777em" rspace="0.27777em">∇</mo></math>_
|
||||
_<math><mo lspace="0.11111em" rspace="0.05555em">∇</mo></math>_
|
||||
_<math><mo lspace="0.27777em" rspace="0.27777em">∇</mo></math>_
|
||||
|
||||
<!-- This checks the effect of @form on an infix operator. -->
|
||||
_<math><mo lspace="0.22222em" rspace="0.22222em">⋉</mo></math>_
|
||||
_<math><mo lspace="0.27777em" rspace="0.27777em">⋉</mo></math>_
|
||||
_<math><mo lspace="0.27777em" rspace="0.27777em">⋉</mo></math>_
|
||||
|
||||
<!-- This checks the effect of @form on a postfix operator. -->
|
||||
_<math><mo lspace="0.27777em" rspace="0.27777em">♭</mo></math>_
|
||||
_<math><mo lspace="0.27777em" rspace="0.27777em">♭</mo></math>_
|
||||
_<math><mo lspace="0em" rspace="0.11111em">♭</mo></math>_
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title><mo> form attribute</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#tokenmo">
|
||||
<meta name="assert" content="Verifies behavior of form attribute.">
|
||||
<link rel="match" href="mo-form-ref.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- This checks the effect of @form on a prefix operator. -->
|
||||
_<math><mo form="infix">∇</mo></math>_
|
||||
_<math><mo form="prefix">∇</mo></math>_
|
||||
_<math><mo form="postfix">∇</mo></math>_
|
||||
|
||||
<!-- This checks the effect of @form on an infix operator. -->
|
||||
_<math><mo form="infix">⋉</mo></math>_
|
||||
_<math><mo form="prefix">⋉</mo></math>_
|
||||
_<math><mo form="postfix">⋉</mo></math>_
|
||||
|
||||
<!-- This checks the effect of @form on a postfix operator. -->
|
||||
_<math><mo form="infix">♭</mo></math>_
|
||||
_<math><mo form="prefix">♭</mo></math>_
|
||||
_<math><mo form="postfix">♭</mo></math>_
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,2 +0,0 @@
|
|||
suggested_reviewers:
|
||||
- tobie
|
|
@ -0,0 +1,120 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="timeout" content="long">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<title>Exceptional cases - timeouts</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
The tests in this file are executed in parallel to avoid exceeding the "long"
|
||||
timeout duration.
|
||||
</p>
|
||||
<script>
|
||||
function makeTest(...bodies) {
|
||||
const closeScript = '<' + '/script>';
|
||||
let src = `
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Document title</title>
|
||||
<script src="/resources/testharness.js?${Math.random()}">${closeScript}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="log"></div>`;
|
||||
bodies.forEach((body) => {
|
||||
src += '<script>(' + body + ')();' + closeScript;
|
||||
});
|
||||
|
||||
const iframe = document.createElement('iframe');
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
iframe.contentDocument.write(src);
|
||||
|
||||
return new Promise((resolve) => {
|
||||
window.addEventListener('message', function onMessage(e) {
|
||||
if (e.source !== iframe.contentWindow) {
|
||||
return;
|
||||
}
|
||||
if (!e.data || e.data.type !=='complete') {
|
||||
return;
|
||||
}
|
||||
window.removeEventListener('message', onMessage);
|
||||
resolve(e.data);
|
||||
});
|
||||
|
||||
iframe.contentDocument.close();
|
||||
}).then(({ tests, status }) => {
|
||||
const summary = {
|
||||
harness: getEnumProp(status, status.status),
|
||||
tests: {}
|
||||
};
|
||||
|
||||
tests.forEach((test) => {
|
||||
summary.tests[test.name] = getEnumProp(test, test.status);
|
||||
});
|
||||
|
||||
return summary;
|
||||
});
|
||||
}
|
||||
|
||||
function getEnumProp(object, value) {
|
||||
for (let property in object) {
|
||||
if (!/^[A-Z]+$/.test(property)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (object[property] === value) {
|
||||
return property;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(() => {
|
||||
window.asyncTestCleanupCount1 = 0;
|
||||
const nestedTest = makeTest(
|
||||
() => {
|
||||
async_test((t) => {
|
||||
t.add_cleanup(() => window.parent.asyncTestCleanupCount1 += 1);
|
||||
setTimeout(() => {
|
||||
throw new Error('this error is expected');
|
||||
});
|
||||
}, 'test');
|
||||
}
|
||||
);
|
||||
promise_test(() => {
|
||||
return nestedTest.then(({harness, tests}) => {
|
||||
assert_equals(harness, 'ERROR');
|
||||
assert_equals(tests.test, 'TIMEOUT');
|
||||
assert_equals(window.asyncTestCleanupCount1, 1);
|
||||
});
|
||||
}, 'uncaught exception during async_test which times out');
|
||||
})();
|
||||
|
||||
(() => {
|
||||
window.promiseTestCleanupCount2 = 0;
|
||||
const nestedTest = makeTest(
|
||||
() => {
|
||||
promise_test((t) => {
|
||||
t.add_cleanup(() => window.parent.promiseTestCleanupCount2 += 1);
|
||||
setTimeout(() => {
|
||||
throw new Error('this error is expected');
|
||||
});
|
||||
|
||||
return new Promise(() => {});
|
||||
}, 'test');
|
||||
}
|
||||
);
|
||||
promise_test(() => {
|
||||
return nestedTest.then(({harness, tests}) => {
|
||||
assert_equals(harness, 'ERROR');
|
||||
assert_equals(tests.test, 'TIMEOUT');
|
||||
assert_equals(window.promiseTestCleanupCount2, 1);
|
||||
});
|
||||
}, 'uncaught exception during promise_test which times out');
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -115,44 +115,6 @@ promise_test(() => {
|
|||
});
|
||||
}, 'uncaught exception during promise_test');
|
||||
|
||||
promise_test(() => {
|
||||
window.asyncTestCleanupCount = 0;
|
||||
return makeTest(
|
||||
() => {
|
||||
async_test((t) => {
|
||||
t.add_cleanup(() => window.parent.asyncTestCleanupCount += 1);
|
||||
setTimeout(() => {
|
||||
throw new Error('this error is expected');
|
||||
});
|
||||
}, 'test');
|
||||
}
|
||||
).then(({harness, tests}) => {
|
||||
assert_equals(harness, 'ERROR');
|
||||
assert_equals(tests.test, 'TIMEOUT');
|
||||
assert_equals(window.asyncTestCleanupCount, 1);
|
||||
});
|
||||
}, 'uncaught exception during async_test which times out');
|
||||
|
||||
promise_test(() => {
|
||||
window.promiseTestCleanupCount = 0;
|
||||
return makeTest(
|
||||
() => {
|
||||
promise_test((t) => {
|
||||
t.add_cleanup(() => window.parent.promiseTestCleanupCount += 1);
|
||||
setTimeout(() => {
|
||||
throw new Error('this error is expected');
|
||||
});
|
||||
|
||||
return new Promise(() => {});
|
||||
}, 'test');
|
||||
}
|
||||
).then(({harness, tests}) => {
|
||||
assert_equals(harness, 'ERROR');
|
||||
assert_equals(tests.test, 'TIMEOUT');
|
||||
assert_equals(window.promiseTestCleanupCount, 1);
|
||||
});
|
||||
}, 'uncaught exception during promise_test which times out');
|
||||
|
||||
promise_test(() => {
|
||||
return makeTest(
|
||||
() => { test(() => {}, 'before'); },
|
||||
|
@ -194,7 +156,6 @@ if ('onunhandledrejection' in window) {
|
|||
promise_test(() => {
|
||||
return makeTest(
|
||||
() => {
|
||||
async_test('pending');
|
||||
async_test((t) => {
|
||||
Promise.reject(new Error('this error is expected'));
|
||||
|
||||
|
@ -207,7 +168,6 @@ if ('onunhandledrejection' in window) {
|
|||
}
|
||||
).then(({harness, tests}) => {
|
||||
assert_equals(harness, 'ERROR');
|
||||
assert_equals(tests.pending, 'NOTRUN');
|
||||
assert_equals(tests.during, 'PASS');
|
||||
assert_equals(tests.after, 'PASS');
|
||||
});
|
||||
|
@ -249,8 +209,7 @@ if ('onunhandledrejection' in window) {
|
|||
).then(({harness, tests}) => {
|
||||
assert_equals(harness, 'ERROR');
|
||||
assert_equals(tests.before, 'PASS');
|
||||
// TODO: investigate why this is not present
|
||||
assert_false('after' in tests);
|
||||
assert_true('after' in tests);
|
||||
});
|
||||
}, 'unhandled rejection between tests');
|
||||
|
||||
|
@ -286,8 +245,7 @@ if ('onunhandledrejection' in window) {
|
|||
).then(({harness, tests}) => {
|
||||
assert_equals(harness, 'ERROR');
|
||||
assert_equals(tests.before, 'PASS');
|
||||
// TODO: investigate why this is not present
|
||||
assert_false('after' in tests);
|
||||
assert_true('after' in tests);
|
||||
});
|
||||
}, 'unhandled rejection between promise_tests');
|
||||
|
||||
|
|
|
@ -250,51 +250,68 @@ promise_test(function(t) {
|
|||
}, 'access ready after it has been resolved');
|
||||
|
||||
promise_test(async function(t) {
|
||||
var url = 'resources/empty-worker.js';
|
||||
var matched_scope = 'resources/blank.html?ready-after-resurrect';
|
||||
const url1 = 'resources/empty-worker.js';
|
||||
const url2 = url1 + '?2';
|
||||
const matched_scope = 'resources/blank.html?ready-after-unregister';
|
||||
|
||||
let reg1 = await service_worker_unregister_and_register(t, url, matched_scope);
|
||||
add_completion_callback(function() {
|
||||
reg1.unregister();
|
||||
});
|
||||
await wait_for_state(t, reg1.installing, 'activated');
|
||||
const reg1 = await service_worker_unregister_and_register(t, url1, matched_scope);
|
||||
t.add_cleanup(() => reg1.unregister());
|
||||
|
||||
// Hold the worker alive with a controlled worker
|
||||
let frame = await with_iframe(matched_scope);
|
||||
add_completion_callback(function() {
|
||||
frame.remove();
|
||||
});
|
||||
await wait_for_state(t, reg1.installing, 'activating');
|
||||
// This registration will resolve all ready promises in clients that match the scope.
|
||||
// But there are no clients.
|
||||
|
||||
// Doom the registration as uninstalling.
|
||||
await reg1.unregister();
|
||||
const frame = await with_iframe(matched_scope);
|
||||
t.add_cleanup(() => frame.remove());
|
||||
|
||||
// Access the ready promise while the registration is doomed.
|
||||
let readyPromise = frame.contentWindow.navigator.serviceWorker.ready;
|
||||
await reg1.unregister();
|
||||
|
||||
// Resurrect the doomed registration;
|
||||
let reg2 = await service_worker_unregister_and_register(t, url, matched_scope);
|
||||
assert_equals(reg1, reg2, 'existing registration should be resurrected');
|
||||
// Access the ready promise while the registration is unregistering.
|
||||
const readyPromise = frame.contentWindow.navigator.serviceWorker.ready;
|
||||
|
||||
// We are trying to test if the ready promise ever resolves here. Use
|
||||
// an explicit timeout check here rather than forcing a full infrastructure
|
||||
// level timeout.
|
||||
let timeoutId;
|
||||
let timeoutPromise = new Promise(resolve => {
|
||||
timeoutId = setTimeout(_ => {
|
||||
timeoutId = null;
|
||||
resolve();
|
||||
}, 500);
|
||||
});
|
||||
// Create a new registration.
|
||||
const reg2 = await navigator.serviceWorker.register(url2, { scope: matched_scope });
|
||||
t.add_cleanup(() => reg2.unregister());
|
||||
// This registration will resolve all ready promises in clients that match the scope.
|
||||
// That includes frame's client.
|
||||
|
||||
// This should resolve immediately since there is an alive registration
|
||||
// with an active promise for the matching scope.
|
||||
await Promise.race([readyPromise, timeoutPromise]);
|
||||
const readyReg = await readyPromise;
|
||||
|
||||
assert_not_equals(timeoutId, null,
|
||||
'ready promise should resolve before timeout');
|
||||
clearTimeout(timeoutId);
|
||||
assert_equals(readyReg.active.scriptURL, reg2.active.scriptURL, 'Resolves with the second registration');
|
||||
assert_not_equals(reg1, reg2, 'Registrations should be different');
|
||||
}, 'resolve ready after unregistering and reregistering');
|
||||
|
||||
// We should get here and not time out.
|
||||
promise_test(async function(t) {
|
||||
const url1 = 'resources/empty-worker.js';
|
||||
const url2 = url1 + '?2';
|
||||
const matched_scope = 'resources/blank.html?ready-after-unregister';
|
||||
|
||||
}, 'access ready on uninstalling registration that is resurrected');
|
||||
const frame = await with_iframe(matched_scope);
|
||||
t.add_cleanup(() => frame.remove());
|
||||
|
||||
const reg1 = await service_worker_unregister_and_register(t, url1, matched_scope);
|
||||
t.add_cleanup(() => reg1.unregister());
|
||||
|
||||
await wait_for_state(t, reg1.installing, 'activated');
|
||||
// This registration will resolve all ready promises in clients that match the scope.
|
||||
// That includes frame's client.
|
||||
|
||||
const reg1Active = reg1.active;
|
||||
|
||||
await reg1.unregister();
|
||||
|
||||
// Access the ready promise while the registration is unregistering.
|
||||
const readyPromise = frame.contentWindow.navigator.serviceWorker.ready;
|
||||
|
||||
// Create a new registration.
|
||||
const reg2 = await navigator.serviceWorker.register(url2, { scope: matched_scope });
|
||||
t.add_cleanup(() => reg2.unregister());
|
||||
// This registration will resolve all ready promises in clients that match the scope.
|
||||
// That includes frame's client, but its ready promise has already resolved.
|
||||
|
||||
const readyReg = await readyPromise;
|
||||
|
||||
assert_equals(readyReg.active.scriptURL, reg1Active.scriptURL, 'Resolves with the first registration');
|
||||
assert_not_equals(reg1, reg2, 'Registrations should be different');
|
||||
}, 'resolve ready before unregistering and reregistering');
|
||||
</script>
|
||||
|
|
|
@ -11,16 +11,11 @@ t.step(function() {
|
|||
var serviceWorkerStates = [];
|
||||
var lastServiceWorkerState = '';
|
||||
var receivedMessageFromPort = '';
|
||||
var currentChangeCount = 0;
|
||||
|
||||
assert_true(navigator.serviceWorker instanceof ServiceWorkerContainer);
|
||||
assert_equals(typeof navigator.serviceWorker.register, 'function');
|
||||
assert_equals(typeof navigator.serviceWorker.getRegistration, 'function');
|
||||
|
||||
navigator.serviceWorker.oncurrentchange = function() {
|
||||
++currentChangeCount;
|
||||
};
|
||||
|
||||
service_worker_unregister_and_register(
|
||||
t, 'resources/end-to-end-worker.js', scope)
|
||||
.then(onRegister)
|
||||
|
@ -75,9 +70,6 @@ t.step(function() {
|
|||
['installing', 'installed', 'activating', 'activated'],
|
||||
'Service worker should pass through all states');
|
||||
|
||||
assert_equals(currentChangeCount, 0,
|
||||
'Should not see current changes since document is out of scope');
|
||||
|
||||
assert_equals(receivedMessageFromPort, 'Ack for: registering doc');
|
||||
|
||||
var sawRedundant = new Promise(t.step_func(function(resolve) {
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Should not crash on foreignObject under defs</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>test(()=>{})</script>
|
||||
<div style="will-change: opacity; mix-blend-mode: exclusion;"></div>
|
||||
<svg>
|
||||
<defs>
|
||||
<foreignObject width="100" height="100">
|
||||
<div style="will-change: opacity;">FAIL</div>
|
||||
</foreignObject>
|
||||
</defs>
|
||||
</svg>
|
||||
<div style="will-change: opacity;"></div>
|
|
@ -3,10 +3,35 @@
|
|||
# necessary because the Windows 10 agents aren't reset between each job.
|
||||
steps:
|
||||
- powershell: |
|
||||
function UninstallEdge($edgePath, $uninstallArgs) {
|
||||
try {
|
||||
cmd /c taskkill /f /im msedge* `> nul 2`> nul
|
||||
cmd /c taskkill /f /im setup.exe `> nul 2`> nul
|
||||
if (Test-Path $edgePath) {
|
||||
$installerPath = Get-ChildItem -PATH $edgePath -Filter "setup.exe" -Recurse | Select -First 1 FullName
|
||||
if (Test-Path $installerPath.FullName) {
|
||||
Write-Host "Uninstall: $($installerPath.FullName) $uninstallArgs"
|
||||
Start-Process "$($installerPath.FullName)" -ArgumentList $uninstallArgs -Wait
|
||||
Remove-Item -Path $edgePath -Recurse -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
} catch [Exception] {
|
||||
Write-Host "Failed to unstall Edge from $edgePath. ERROR= $($_.Exception.Message)" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
# restore hosts file
|
||||
$hostFile = "$env:systemroot\System32\drivers\etc\hosts"
|
||||
Copy-Item -Path "$hostFile.back" -Destination $hostFile -Force
|
||||
taskkill /f /im MicrosoftEdge*
|
||||
taskkill /f /im MicrosoftWebDriver.exe
|
||||
|
||||
# uninstall Edge
|
||||
UninstallEdge "$env:localappdata\Microsoft\Edge\Application" "--uninstall --force-uninstall"
|
||||
# uninstall Edge Canary channel
|
||||
UninstallEdge "$env:localappdata\Microsoft\Edge SxS\Application" "--uninstall --msedge-sxs --system-level --force-uninstall"
|
||||
# uninstall Edge Dev channel
|
||||
UninstallEdge "$env:systemdrive\Program Files (x86)\Microsoft\Edge Dev\Application" "--uninstall --msedge-dev --system-level --force-uninstall"
|
||||
# uninstall Edge Beta channel
|
||||
UninstallEdge "$env:systemdrive\Program Files (x86)\Microsoft\Edge Beta\Application" "--uninstall --msedge-beta --system-level --force-uninstall"
|
||||
displayName: 'Restore hosts file and cleanup test machine'
|
||||
condition: always()
|
||||
errorActionPreference: silentlyContinue
|
||||
|
|
32
tests/wpt/web-platform-tests/tools/ci/azure/install_edge.yml
Normal file
32
tests/wpt/web-platform-tests/tools/ci/azure/install_edge.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
parameters:
|
||||
channel: dev
|
||||
|
||||
# Should match https://web-platform-tests.org/running-tests/chrome.html
|
||||
# Just replace chrome with edgechromium
|
||||
steps:
|
||||
- ${{ if eq(parameters.channel, 'canary') }}:
|
||||
- powershell: |
|
||||
$edgeInstallerName = 'MicrosoftEdgeSetup.exe'
|
||||
# Link to Canary channel installer
|
||||
Start-BitsTransfer -Source 'https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en-us' -Destination MicrosoftEdgeSetup.exe
|
||||
cmd /c START /WAIT $edgeInstallerName /silent /install
|
||||
$edgePath = "$env:localappdata\Microsoft\Edge SxS\Application"
|
||||
if (Test-Path $edgePath) {
|
||||
Write-Host "##vso[task.prependpath]$edgePath"
|
||||
} else {
|
||||
Throw "Failed to install Edge at $edgePath"
|
||||
}
|
||||
displayName: 'Install Edge Canary'
|
||||
- ${{ if eq(parameters.channel, 'dev') }}:
|
||||
- powershell: |
|
||||
$edgeInstallerName = 'MicrosoftEdgeSetup.exe'
|
||||
# Link to Dev channel installer
|
||||
Start-BitsTransfer -Source 'https://go.microsoft.com/fwlink/?linkid=2069324&Channel=Dev&language=en-us' -Destination MicrosoftEdgeSetup.exe
|
||||
cmd /c START /WAIT $edgeInstallerName /silent /install
|
||||
$edgePath = "$env:systemdrive\Program Files (x86)\Microsoft\Edge Dev\Application"
|
||||
if (Test-Path $edgePath) {
|
||||
Write-Host "##vso[task.prependpath]$edgePath"
|
||||
} else {
|
||||
Throw "Failed to install Edge at $edgePath"
|
||||
}
|
||||
displayName: 'Install Edge Dev'
|
|
@ -7,7 +7,10 @@ steps:
|
|||
- script: |
|
||||
# This is equivalent to `Homebrew/homebrew-cask-versions/safari-technology-preview`,
|
||||
# but the raw URL is used to bypass caching.
|
||||
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask-versions/master/Casks/safari-technology-preview.rb
|
||||
# Safari Technology Preview version 83 includes a regression that
|
||||
# interferes with results collection. The version of the installation
|
||||
# script referenced here installs STP at version 82.
|
||||
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask-versions/dbde508bb83254c53be4eb6387dbd9fbf9797a35/Casks/safari-technology-preview.rb
|
||||
sudo "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --enable
|
||||
defaults write com.apple.SafariTechnologyPreview WebKitJavaScriptCanOpenWindowsAutomatically 1
|
||||
defaults write com.apple.SafariTechnologyPreview ExperimentalServerTimingEnabled 1
|
||||
|
|
|
@ -697,7 +697,7 @@ class EdgeChromium(Browser):
|
|||
return find_executable("msedgedriver")
|
||||
|
||||
def install_webdriver(self, dest=None, channel=None, browser_binary=None):
|
||||
if self.platform == "win":
|
||||
if self.platform != "win":
|
||||
raise ValueError("Only Windows platform is currently supported")
|
||||
|
||||
if dest is None:
|
||||
|
|
|
@ -354,6 +354,9 @@ class EdgeChromium(BrowserSetup):
|
|||
kwargs["webdriver_binary"] = webdriver_binary
|
||||
else:
|
||||
raise WptrunError("Unable to locate or install msedgedriver binary")
|
||||
if kwargs["browser_channel"] == "dev":
|
||||
logger.info("Automatically turning on experimental features for Edge Dev")
|
||||
kwargs["binary_args"].append("--enable-experimental-web-platform-features")
|
||||
|
||||
|
||||
class Edge(BrowserSetup):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue