Auto merge of #20861 - servo-wpt-sync:wpt_update_24-05-2018, r=jdm

Sync WPT with upstream (24-05-2018)

Automated downstream sync of changes from upstream as of 24-05-2018.
[no-wpt-sync]

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20861)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-05-25 02:29:38 -04:00 committed by GitHub
commit c35379c683
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
102 changed files with 1119 additions and 421 deletions

View file

@ -120945,6 +120945,54 @@
{}
]
],
"css/css-layout-api/perform-child-layout-available-inline-size-htb-htb.https.html": [
[
"/css/css-layout-api/perform-child-layout-available-inline-size-htb-htb.https.html",
[
[
"/css/css-layout-api/layout-child-ref.html",
"=="
]
],
{}
]
],
"css/css-layout-api/perform-child-layout-available-inline-size-htb-vrl.https.html": [
[
"/css/css-layout-api/perform-child-layout-available-inline-size-htb-vrl.https.html",
[
[
"/css/css-layout-api/layout-child-ref.html",
"=="
]
],
{}
]
],
"css/css-layout-api/perform-child-layout-available-inline-size-vrl-htb.https.html": [
[
"/css/css-layout-api/perform-child-layout-available-inline-size-vrl-htb.https.html",
[
[
"/css/css-layout-api/layout-child-ref.html",
"=="
]
],
{}
]
],
"css/css-layout-api/perform-child-layout-available-inline-size-vrl-vrl.https.html": [
[
"/css/css-layout-api/perform-child-layout-available-inline-size-vrl-vrl.https.html",
[
[
"/css/css-layout-api/layout-child-ref.html",
"=="
]
],
{}
]
],
"css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html": [
[
"/css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html",
@ -126153,6 +126201,18 @@
{}
]
],
"css/css-pseudo/first-line-and-placeholder.html": [
[
"/css/css-pseudo/first-line-and-placeholder.html",
[
[
"/css/css-pseudo/first-line-and-placeholder-ref.html",
"=="
]
],
{}
]
],
"css/css-pseudo/marker-and-other-pseudo-elements.html": [
[
"/css/css-pseudo/marker-and-other-pseudo-elements.html",
@ -130405,6 +130465,18 @@
{}
]
],
"css/css-sizing/whitespace-and-break.html": [
[
"/css/css-sizing/whitespace-and-break.html",
[
[
"/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
"css/css-style-attr/style-attr-braces-001.xht": [
[
"/css/css-style-attr/style-attr-braces-001.xht",
@ -178201,6 +178273,18 @@
{}
]
],
"css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context.html": [
[
"/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context.html",
[
[
"/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context-ref.html",
"=="
]
],
{}
]
],
"css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-zero-2.html": [
[
"/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-zero-2.html",
@ -190049,6 +190133,11 @@
{}
]
],
"./CODEOWNERS": [
[
{}
]
],
"./CONTRIBUTING.md": [
[
{}
@ -194684,6 +194773,11 @@
{}
]
],
"async-local-storage/OWNERS": [
[
{}
]
],
"audio-output/OWNERS": [
[
{}
@ -253494,7 +253588,7 @@
{}
]
],
"css/css-layout-api/support/layout-child-fixed-sizes-worklet.js": [
"css/css-layout-api/support/layout-child-sizes-worklet.js": [
[
{}
]
@ -255074,6 +255168,11 @@
{}
]
],
"css/css-pseudo/first-line-and-placeholder-ref.html": [
[
{}
]
],
"css/css-pseudo/marker-and-other-pseudo-elements-ref.html": [
[
{}
@ -273829,6 +273928,11 @@
{}
]
],
"css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context-ref.html": [
[
{}
]
],
"css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-zero-2-ref.html": [
[
{}
@ -291324,6 +291428,11 @@
{}
]
],
"keyboard-map/OWNERS": [
[
{}
]
],
"longtask-timing/OWNERS": [
[
{}
@ -336240,9 +336349,9 @@
{}
]
],
"html/browsers/windows/nested-browsing-contexts/frameElement.html": [
"html/browsers/windows/nested-browsing-contexts/frameElement.sub.html": [
[
"/html/browsers/windows/nested-browsing-contexts/frameElement.html",
"/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html",
{}
]
],
@ -337940,6 +338049,16 @@
{}
]
],
"html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html": [
[
"/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html?encoding=utf8",
{}
],
[
"/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html?encoding=x-cp1251",
{}
]
],
"html/infrastructure/urls/resolving-urls/query-encoding/location.sub.html": [
[
"/html/infrastructure/urls/resolving-urls/query-encoding/location.sub.html?encoding=utf8",
@ -379456,6 +379575,12 @@
{}
]
],
"workers/WorkerGlobalScope_requestAnimationFrame.htm": [
[
"/workers/WorkerGlobalScope_requestAnimationFrame.htm",
{}
]
],
"workers/WorkerGlobalScope_setInterval.htm": [
[
"/workers/WorkerGlobalScope_setInterval.htm",
@ -382186,6 +382311,26 @@
{}
]
],
"xhr/sync-no-timeout.any.js": [
[
"/xhr/sync-no-timeout.any.html",
{
"timeout": "long"
}
],
[
"/xhr/sync-no-timeout.any.sharedworker.html",
{
"timeout": "long"
}
],
[
"/xhr/sync-no-timeout.any.worker.html",
{
"timeout": "long"
}
]
],
"xhr/template-element.html": [
[
"/xhr/template-element.html",
@ -401887,6 +402032,10 @@
"db79dd9531259cfaf670e7b780a9a205ec712369",
"support"
],
"./CODEOWNERS": [
"27076c48623ad8788d0e0cc7679ad86be678744c",
"support"
],
"./CONTRIBUTING.md": [
"d29b019e9828ee3b23b428c684412aa402ec9fff",
"support"
@ -401900,7 +402049,7 @@
"support"
],
"./README.md": [
"2ecef188cb7cb27d10b6bf148eddb3f9a031771b",
"8ab843e17aa153bcf91282be3770ed2009061b11",
"support"
],
"./check_stability.ini": [
@ -401908,7 +402057,7 @@
"support"
],
"./lint.whitelist": [
"b740ea6ee933d028f6b2bef92cc473778b76002f",
"f18a6bb277d2392446c790aa85eb008d5f3fe05d",
"support"
],
"./serve.py": [
@ -411567,6 +411716,10 @@
"32cf112fb1dcb4e7ec3c91bdf5bd6b976a1e4eac",
"testharness"
],
"async-local-storage/OWNERS": [
"0dadd13ec6f4267b77fb4ec782ca528408051a11",
"support"
],
"async-local-storage/storage-smoke-test.https.tentative.html": [
"1e00cf5aff9d85ca66d8b831ee4c2c3cb8259071",
"testharness"
@ -514231,20 +514384,36 @@
"567ff67317cae9906e6d159dc232c41464a4e7c6",
"reftest"
],
"css/css-layout-api/perform-child-layout-available-inline-size-htb-htb.https.html": [
"7db4f5c2bebe031f0689be2569ba4ca266535052",
"reftest"
],
"css/css-layout-api/perform-child-layout-available-inline-size-htb-vrl.https.html": [
"f22cc9627b7b2ad797cc722f3d369355ffce4f60",
"reftest"
],
"css/css-layout-api/perform-child-layout-available-inline-size-vrl-htb.https.html": [
"0e34d5b8b86aa6551e6e6a31eb086bd84b61c636",
"reftest"
],
"css/css-layout-api/perform-child-layout-available-inline-size-vrl-vrl.https.html": [
"d619b57c395710bc2e133e05774c9a06bfd19749",
"reftest"
],
"css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html": [
"341711737d74fb068bb3a2e348e47820c236fa49",
"907b9b1255516caab731555686e5c6b5517eb3f9",
"reftest"
],
"css/css-layout-api/perform-child-layout-fixed-block-size.https.html": [
"486fe671afaa9275bc6b32c49ca4c8143290f9be",
"3560b1f8249f945e1453e3e8e53745ef1941405f",
"reftest"
],
"css/css-layout-api/perform-child-layout-fixed-inline-size-vrl.https.html": [
"3c3b4c800af40a85eb9ddb588a07fc0d8ceec5cf",
"dfc48415ddbfecad7b382c4efe290b1b8da4ebac",
"reftest"
],
"css/css-layout-api/perform-child-layout-fixed-inline-size.https.html": [
"a25a85095781de557edde6dd02b82ee052642bf1",
"bae125f32f28d0cfa7db449cfb10437cb4df12a3",
"reftest"
],
"css/css-layout-api/position-fragment-htb-ltr.https.html": [
@ -514295,8 +514464,8 @@
"ed0224a380c50a7e83d23a95be5a4348ce5bf706",
"support"
],
"css/css-layout-api/support/layout-child-fixed-sizes-worklet.js": [
"5ddda72e3c9d077508622511e8685249c7803028",
"css/css-layout-api/support/layout-child-sizes-worklet.js": [
"3797af00861ae44369a90a0ae05b3a6e13a2ef54",
"support"
],
"css/css-layout-api/support/layout-child-worklet.js": [
@ -515180,7 +515349,7 @@
"support"
],
"css/css-masking/parsing/clip-invalid.html": [
"fad5d0257532a5c1572d41f83d045c92a6fe0d61",
"81cd98170ea4abe216c0cf155aa493c58079bd53",
"testharness"
],
"css/css-masking/parsing/clip-path-invalid.html": [
@ -515200,7 +515369,7 @@
"testharness"
],
"css/css-masking/parsing/clip-valid.html": [
"e7805a38a0634d760bdc31e4c331da1a56582bc9",
"2630e55883c57a0a733071ad2f49b55e2bd77a59",
"testharness"
],
"css/css-masking/parsing/resources/parsing-testcommon.js": [
@ -517531,6 +517700,14 @@
"38d0844f6ef10d214b7d23af45d02c8093d9c00e",
"testharness"
],
"css/css-pseudo/first-line-and-placeholder-ref.html": [
"b1aaba95588025ae60b324f23cc14e3b0ef40836",
"support"
],
"css/css-pseudo/first-line-and-placeholder.html": [
"829ee2c50f5b6198f9cc0b3ae01b208d20ed7702",
"reftest"
],
"css/css-pseudo/marker-and-other-pseudo-elements-ref.html": [
"73ab862dcf3131ae7d7166ef06e52db0cd0eb7c7",
"support"
@ -521355,6 +521532,10 @@
"33aa880de7eb7c4128022871dfd5e2895be30dcc",
"reftest"
],
"css/css-sizing/whitespace-and-break.html": [
"54107f6567df03437aebb1fe8aa5c6403cb1ecf1",
"reftest"
],
"css/css-speech/Integer.html": [
"8db91e711b22ead393b1d9a18c224a7f838b85b0",
"manual"
@ -551652,7 +551833,7 @@
"reftest"
],
"css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-anonymous-items-001-ref.html": [
"034e0ab0215239f057137323feada9b6a8540e50",
"88f1d3fd76beb69334a236fd60c4c94ba9a4d437",
"support"
],
"css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-anonymous-items-001.html": [
@ -556867,6 +557048,14 @@
"1f6e81539cf5a3c3a339e3a69f4c6446688c3cd3",
"reftest"
],
"css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context-ref.html": [
"af82ff9650987818b6a5a5c3e82386d0fd882325",
"support"
],
"css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context.html": [
"3d2248b6f9200cd23607c1fe6ff543260c43e378",
"reftest"
],
"css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-zero-2-ref.html": [
"54a7661d6ae90a46a811d988687e2d4b9b927a96",
"support"
@ -556884,7 +557073,7 @@
"support"
],
"css/vendor-imports/mozilla/mozilla-central-reftests/transforms/reftest.list": [
"791816169df64e27949974a29a47805c91592dc5",
"56d1d0dca24abcb9a9147b55f10f2a47b5efd61f",
"support"
],
"css/vendor-imports/mozilla/mozilla-central-reftests/transforms/transform-containing-block-dynamic-1a.html": [
@ -558180,7 +558369,7 @@
"reftest"
],
"css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/reftest.list": [
"b9954b5e7f7ae188dc9323e7ae4b29147e80e96c",
"30fbc616b8608ca9b5dc1aa1a17a0dc12011ddc0",
"support"
],
"css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/support/WidthTest-Regular.otf": [
@ -558632,7 +558821,7 @@
"support"
],
"docs/_running-tests/chrome_android.md": [
"7a26348aabd414f1d8e2da68717dd0a16d3f6ce8",
"f1e09247c9f41cf3c55aa087b063e42d48d88319",
"support"
],
"docs/_running-tests/index.md": [
@ -564432,7 +564621,7 @@
"support"
],
"fetch/corb/README.md": [
"c786c1df10c1edad9b25be4ec112250864c328e5",
"a20a0aec267558052757c8dd368219730a206e34",
"support"
],
"fetch/corb/img-html-correctly-labeled.sub-ref.html": [
@ -568711,8 +568900,8 @@
"0f2e164f656015ba43e2b3471af67a5d16fb97ea",
"support"
],
"html/browsers/windows/nested-browsing-contexts/frameElement.html": [
"9272ddfc9d2d7301e7adadc5ca06f03d9a224b1f",
"html/browsers/windows/nested-browsing-contexts/frameElement.sub.html": [
"480ab947e93b63641f6920b17851ae2d98605b5c",
"testharness"
],
"html/browsers/windows/nested-browsing-contexts/resources/frameElement-nested-frame.html": [
@ -575167,6 +575356,10 @@
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"support"
],
"html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html": [
"a467530a931aae564a73518487b12521c6dd6377",
"testharness"
],
"html/infrastructure/urls/resolving-urls/query-encoding/location.sub.html": [
"34aa7e5a7d4daba412fa700859913cf9def77565",
"testharness"
@ -575188,7 +575381,7 @@
"support"
],
"html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js": [
"03fc73b64f0fd6f80bbb5616da4a4528162638ee",
"d0eac1b59b0514b526be649a28d9fbd54e47db99",
"support"
],
"html/infrastructure/urls/resolving-urls/query-encoding/resources/resource.py": [
@ -586271,6 +586464,10 @@
"2ac2738dd428f3937fc2fd15dae2f98df5e3feb1",
"support"
],
"keyboard-map/OWNERS": [
"3151ee04a3b456d750df980594a192161868a337",
"support"
],
"keyboard-map/idlharness.https.html": [
"3215b6729d83ca2841baf6eb33445eb07e0a7c25",
"testharness"
@ -587552,7 +587749,7 @@
"manual"
],
"mediacapture-streams/MediaStreamTrack-getCapabilities.https.html": [
"3a6bdcf56d9414934be70d32765c04449532b853",
"2121f9fcccf971874eb2fe41422db05da35b44ba",
"testharness"
],
"mediacapture-streams/MediaStreamTrack-getSettings.https.html": [
@ -594912,11 +595109,11 @@
"testharness"
],
"offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.html": [
"bc7b9afa9ae08d707bc6de78b6ca16c5ed6ff425",
"265026f5618d6a538291509c51c323a8810f8e9e",
"testharness"
],
"offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html": [
"8dafe883a6f52b66e528fcb6a86c72a147f8cf9d",
"6462aca7d799136064e86fe71d7adda4aed68127",
"testharness"
],
"offscreen-canvas/the-offscreen-canvas/offscreencanvas.constructor.html": [
@ -594936,7 +595133,7 @@
"testharness"
],
"offscreen-canvas/the-offscreen-canvas/offscreencanvas.resize.html": [
"1963e2f24313314c99e39e29f6818d39c2385a0d",
"1b4d2ea0c251aac3f35425bd9f871d258074853b",
"testharness"
],
"offscreen-canvas/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html": [
@ -608852,7 +609049,7 @@
"testharness"
],
"shadow-dom/Document-prototype-currentScript.html": [
"eadcbb987e528dee0bd773ce48026f64513a299e",
"c19ae5aa7d8ee63a50514fedd66231e48c31297e",
"testharness"
],
"shadow-dom/Document-prototype-importNode.html": [
@ -622627,6 +622824,10 @@
"c67d281e78f9672e5f25fdde6b978e0fb7bd806e",
"testharness"
],
"workers/WorkerGlobalScope_requestAnimationFrame.htm": [
"812f9da59bd8b440aad647f60227c0f66a1404c3",
"testharness"
],
"workers/WorkerGlobalScope_setInterval.htm": [
"30371bcd0af113ee5dc0a7c4a40a67b99efdfa78",
"testharness"
@ -625371,6 +625572,10 @@
"db6171c61a37cd98ea5b9c1549432f1e2b53e7eb",
"testharness"
],
"xhr/sync-no-timeout.any.js": [
"d1078052ef5593c33de085f9e0c5ceb73c47f02e",
"testharness"
],
"xhr/template-element.html": [
"748f12beaa646e244f8312afd545f56075cac727",
"testharness"

View file

@ -1,5 +1,4 @@
[javascript-url-abort-return-value-undefined.tentative.html]
expected: TIMEOUT
[Not aborting fetch for javascript:undefined navigation]
expected: TIMEOUT
expected: FAIL

View file

@ -1,5 +1,4 @@
[frameElement.html]
type: testharness
[frameElement.sub.html]
expected: TIMEOUT
[The window's frameElement attribute must return its container element if it is a nested browsing context]
expected: FAIL

View file

@ -0,0 +1,5 @@
[WorkerGlobalScope_requestAnimationFrame.htm]
expected: ERROR
[ WorkerGlobalScope API: requestAnimationFrame()]
expected: TIMEOUT

View file

@ -0,0 +1,8 @@
[sync-no-timeout.any.sharedworker.html]
[Untitled]
expected: FAIL
[sync-no-timeout.any.worker.html]
[sync-no-timeout.any.html]

View file

@ -1,5 +1,5 @@
[xmlhttprequest-sync-default-feature-policy.sub.html]
expected: TIMEOUT
expected: ERROR
[Default "sync-xhr" feature policy ["*"\] allows same-origin iframes.]
expected: TIMEOUT

View file

@ -0,0 +1,5 @@
[context-release-upon-reload.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN

View file

@ -0,0 +1,5 @@
[shader-uniform-packing-restrictions.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN

View file

@ -0,0 +1,5 @@
[shader-with-non-reserved-words.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN

View file

@ -0,0 +1,2 @@
# Prevent accidentially touching CSS submodules
/css/tools/ @plinss @kojiishi @jgraham @gsnedders

View file

@ -286,6 +286,14 @@ To prevent browser SSL warnings when running HTTPS tests locally, the
web-platform-tests Root CA file `cacert.pem` in [tools/certs](tools/certs)
must be added as a trusted certificate in your OS/browser.
**NOTE**: The CA should not be installed in any browser profile used
outside of tests, since it may be used to generate fake
certificates. For browsers that use the OS certificate store, tests
should therefore not be run manually outside a dedicated OS instance
(e.g. a VM). To avoid this problem when running tests in Chrome or
Firefox use `wpt run`, which disables certificate checks and therefore
doesn't require the root CA to be trusted.
Publication
===========

View file

@ -0,0 +1 @@
@domenic

View file

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html class=reftest-wait>
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-availableinlinesize">
<link rel="match" href="layout-child-ref.html">
<meta name="assert" content="This test checks that setting the available inline size of children works as expected." />
<style>
.test {
writing-mode: horizontal-tb;
background: red;
margin: 10px;
width: 100px;
}
.child {
writing-mode: horizontal-tb;
visibility: hidden;
line-height: 0;
--available-inline-size: 20;
}
.inline {
display: inline-block;
height: 8px;
}
.inline-size-10 { width: 10px; }
.inline-size-30 { width: 30px; }
@supports (display: layout(test)) {
.test {
background: green;
display: layout(test);
}
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/worklet-reftest.js"></script>
<div class="test">
<!-- As the inlines don't fit within 20px, we'll end up with two lines. -->
<div class="child" style="--inline-size-expected: 30; --block-size-expected: 16;">
<span class="inline inline-size-10"></span>
<span class="inline inline-size-30"></span>
</div>
<!-- The single inline doesn't take up the whole 20px, so will be shrink fitted. -->
<div class="child" style="--inline-size-expected: 10; --block-size-expected: 8;">
<span class="inline inline-size-10"></span>
</div>
<!-- Make sure the max-width property clamps the size. -->
<div class="child" style="max-width: 25px; --inline-size-expected: 25; --block-size-expected: 8;">
<span class="inline inline-size-30"></span>
</div>
<!-- Make sure the min-width property clamps the size. -->
<div class="child" style="min-width: 25px; --inline-size-expected: 25; --block-size-expected: 8;">
<span class="inline inline-size-10"></span>
</div>
</div>
<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'});
</script>

View file

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html class=reftest-wait>
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-availableinlinesize">
<link rel="match" href="layout-child-ref.html">
<meta name="assert" content="This test checks that setting the available inline size of children works as expected." />
<style>
.test {
writing-mode: horizontal-tb;
background: red;
margin: 10px;
width: 100px;
}
.child {
writing-mode: vertical-rl;
visibility: hidden;
line-height: 0;
--available-block-size: 20;
}
.inline {
display: inline-block;
width: 8px;
}
.inline-size-10 { height: 10px; }
.inline-size-30 { height: 30px; }
@supports (display: layout(test)) {
.test {
background: green;
display: layout(test);
}
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/worklet-reftest.js"></script>
<div class="test">
<!-- As the inlines don't fit within 20px, we'll end up with two lines. -->
<div class="child" style="--block-size-expected: 30; --inline-size-expected: 16;">
<span class="inline inline-size-10"></span>
<span class="inline inline-size-30"></span>
</div>
<!-- The single inline doesn't take up the whole 20px, so will be shrink fitted. -->
<div class="child" style="--block-size-expected: 10; --inline-size-expected: 8;">
<span class="inline inline-size-10"></span>
</div>
<!-- Make sure the max-height property clamps the size. -->
<div class="child" style="max-height: 25px; --block-size-expected: 25; --inline-size-expected: 8;">
<span class="inline inline-size-30"></span>
</div>
<!-- Make sure the min-height property clamps the size. -->
<div class="child" style="min-height: 25px; --block-size-expected: 25; --inline-size-expected: 8;">
<span class="inline inline-size-10"></span>
</div>
</div>
<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'});
</script>

View file

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html class=reftest-wait>
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-availableinlinesize">
<link rel="match" href="layout-child-ref.html">
<meta name="assert" content="This test checks that setting the available inline size of children works as expected." />
<style>
.test {
writing-mode: vertical-rl;
background: red;
margin: 10px;
height: 100px;
}
.child {
writing-mode: horizontal-tb;
visibility: hidden;
line-height: 0;
--available-block-size: 20;
}
.inline {
display: inline-block;
height: 8px;
}
.inline-size-10 { width: 10px; }
.inline-size-30 { width: 30px; }
@supports (display: layout(test)) {
.test {
background: green;
display: layout(test);
}
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/worklet-reftest.js"></script>
<div class="test">
<!-- As the inlines don't fit within 20px, we'll end up with two lines. -->
<div class="child" style="--block-size-expected: 30; --inline-size-expected: 16;">
<span class="inline inline-size-10"></span>
<span class="inline inline-size-30"></span>
</div>
<!-- The single inline doesn't take up the whole 20px, so will be shrink fitted. -->
<div class="child" style="--block-size-expected: 10; --inline-size-expected: 8;">
<span class="inline inline-size-10"></span>
</div>
<!-- Make sure the max-width property clamps the size. -->
<div class="child" style="max-width: 25px; --block-size-expected: 25; --inline-size-expected: 8;">
<span class="inline inline-size-30"></span>
</div>
<!-- Make sure the min-width property clamps the size. -->
<div class="child" style="min-width: 25px; --block-size-expected: 25; --inline-size-expected: 8;">
<span class="inline inline-size-10"></span>
</div>
</div>
<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'});
</script>

View file

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html class=reftest-wait>
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-availableinlinesize">
<link rel="match" href="layout-child-ref.html">
<meta name="assert" content="This test checks that setting the available inline size of children works as expected." />
<style>
.test {
writing-mode: vertical-rl;
background: red;
margin: 10px;
height: 100px;
}
.child {
writing-mode: vertical-rl;
visibility: hidden;
line-height: 0;
--available-inline-size: 20;
}
.inline {
display: inline-block;
width: 8px;
}
.inline-size-10 { height: 10px; }
.inline-size-30 { height: 30px; }
@supports (display: layout(test)) {
.test {
background: green;
display: layout(test);
}
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/worklet-reftest.js"></script>
<div class="test">
<!-- As the inlines don't fit within 20px, we'll end up with two lines. -->
<div class="child" style="--inline-size-expected: 30; --block-size-expected: 16;">
<span class="inline inline-size-10"></span>
<span class="inline inline-size-30"></span>
</div>
<!-- The single inline doesn't take up the whole 20px, so will be shrink fitted. -->
<div class="child" style="--inline-size-expected: 10; --block-size-expected: 8;">
<span class="inline inline-size-10"></span>
</div>
<!-- Make sure the max-height property clamps the size. -->
<div class="child" style="max-height: 25px; --inline-size-expected: 25; --block-size-expected: 8;">
<span class="inline inline-size-30"></span>
</div>
<!-- Make sure the min-height property clamps the size. -->
<div class="child" style="min-height: 25px; --inline-size-expected: 25; --block-size-expected: 8;">
<span class="inline inline-size-10"></span>
</div>
</div>
<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'});
</script>

View file

@ -57,5 +57,5 @@
</div>
<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-fixed-sizes-worklet.js'});
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'});
</script>

View file

@ -56,5 +56,5 @@
</div>
<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-fixed-sizes-worklet.js'});
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'});
</script>

View file

@ -57,5 +57,5 @@
</div>
<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-fixed-sizes-worklet.js'});
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'});
</script>

View file

@ -56,5 +56,5 @@
</div>
<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-fixed-sizes-worklet.js'});
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'});
</script>

View file

@ -9,6 +9,8 @@ function parseNumber(value) {
registerLayout('test', class {
static get childInputProperties() {
return [
'--available-inline-size',
'--available-block-size',
'--fixed-inline-size',
'--fixed-block-size',
'--inline-size-expected',
@ -20,9 +22,16 @@ registerLayout('test', class {
*layout(children, edges, constraints, styleMap) {
const childFragments = yield children.map((child) => {
const childConstraints = {};
const availableInlineSize = parseNumber(child.styleMap.get('--available-inline-size'));
const availableBlockSize = parseNumber(child.styleMap.get('--available-block-size'));
const fixedInlineSize = parseNumber(child.styleMap.get('--fixed-inline-size'));
const fixedBlockSize = parseNumber(child.styleMap.get('--fixed-block-size'));
return child.layoutNextFragment({fixedInlineSize, fixedBlockSize});
return child.layoutNextFragment({
availableInlineSize,
availableBlockSize,
fixedInlineSize,
fixedBlockSize
});
});
const actual = childFragments.map((childFragment) => {

View file

@ -14,6 +14,7 @@
<script>
test_invalid_value("clip", "none");
test_invalid_value("clip", "rect(10px, 20px, 30px)");
test_invalid_value("clip", "rect(10%, -20%, auto, auto)");
</script>
</body>
</html>

View file

@ -14,7 +14,7 @@
<script>
test_valid_value("clip", "auto");
test_valid_value("clip", "rect(10px, 20px, -30px, 40px)", ["rect(10px, 20px, -30px, 40px)", "rect(10px 20px -30px 40px)"]);
test_valid_value("clip", "rect(10%, -20%, auto, auto)");
test_valid_value("clip", "rect(10px, -20px, auto, auto)", ["rect(10px, -20px, auto, auto)", "rect(10px -20px auto auto)"]);
</script>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<meta charset="utf-8">
<style>
input::placeholder {
color: red;
}
</style>
<form>
<input placeholder="this text should be red">
</form>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Interaction of ::first-line and ::placeholder</title>
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#placeholder-pseudo">
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-line-pseudo">
<link rel="match" href="first-line-and-placeholder-ref.html">
<meta name="assert" content="Tests ::placeholder interaction with ::first-line pseudo element">
<style>
input::first-line {
background-color: initial;
}
input::placeholder {
color: red;
}
</style>
<form>
<input placeholder="this text should be red">
</form>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<title>Collapsable whitespace and break after inline-block</title>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-sizing-3/#intrinsic-sizes" title="4.1. Intrinsic Sizes">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="width:fit-content; background:red;">
<div style="display:inline-block; vertical-align:top; width:100px; height:100px; background:green;"></div>
<br>
</div>

View file

@ -10,6 +10,6 @@
<meta charset="utf-8">
</head>
<body>
a ab bx x
a a<div style="display:inline-block">b b</div>x x
</body>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS transforms: 'perspective' on a non-transformable element doesn't create a stacking context</title>
<link rel="author" title="Matt Woodrow" href="mailto:mwoodrow@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<style>
html, body { margin: 0; padding: 0 }
#fixedmoves {
position: absolute;
background: green;
height: 100px;
width: 100px;
}
</style>
<body>
<div id="fixedmoves"></div>
</body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS transforms: 'perspective' on a non-transformable element doesn't create a stacking context</title>
<link rel="author" title="Matt Woodrow" href="mailto:mwoodrow@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#perspective-property">
<link rel="match" href="perspective-untransformable-no-stacking-context-ref.html">
<meta name="assert" content="Perspective on a non-transformable element shouldn't create a stacking context.">
<style>
* { margin: 0; padding: 0; }
div, span { width: 100px; height: 100px }
#perspective { background: green; padding-top: 100px; perspective: 100px; }
#child { display:inline-block; z-index: -1; position:absolute; background: red; }
#spacer { display:inline-block; }
#wrapper { overflow:hidden }
</style>
<body>
<div id="wrapper">
<span id="perspective">
<div id="child">
</div>
<span id="spacer"></span>
</span>
</div>
</body>

View file

@ -4,6 +4,7 @@
== perspective-containing-block-dynamic-1b.html containing-block-dynamic-1-ref.html
== perspective-zero.html reference/green.html
== perspective-zero-2.html perspective-zero-2-ref.html
== perspective-untransformable-no-stacking-context.html perspective-untransformable-no-stacking-context-ref.html
== individual-transform-1.html individual-transform-1-ref.html
== individual-transform-2a.html individual-transform-2-ref.html

View file

@ -1,4 +1,3 @@
== text-combine-upright-break-inside-001.html text-combine-upright-break-inside-001-ref.html
== text-combine-upright-break-inside-001a.html text-combine-upright-break-inside-001-ref.html
== text-combine-upright-compression-001.html text-combine-upright-compression-001-ref.html

View file

@ -36,6 +36,9 @@ Downloads/ as it'll be easier to find). Open Settings -> Security & location ->
Encryption & credentials -> Install from storage. Find and install `cacert.crt`.
(The setting entries might be slightly different based your Android version.)
Note that having this CA installed on your device outside of a test
environment represents a security risk.
Finally, we may run wpt with the `chrome_android` product

View file

@ -12,20 +12,22 @@ because all of these tests verify behavior that is important to the CORB
algorithm.
### Disclaimer: CORB is not standardized yet
### CORB is not universally implemented yet
Note that CORB is currently in very early stages of standardization path. At
the same time, some tests in this directory (e.g.
CORB has been included
in the [Fetch spec](https://fetch.spec.whatwg.org/#corb)
since [May 2018](https://github.com/whatwg/fetch/pull/686).
Some tests in this directory (e.g.
`css-with-json-parser-breaker`) cover behavior spec-ed outside of CORB (making
sure that CORB doesn't change the existing web behavior) and therefore are
valuable independently from CORB's standardization efforts.
valuable independently from CORB's standardization efforts and should already
be passing across all browsers.
Tests that cover behavior that is changed by CORB have to be marked as
Tests that cover behavior that is changed by CORB are currently marked as
[tentative](https://web-platform-tests.org/writing-tests/file-names.html)
(using `.tentative` substring in their filename) until CORB
is included in the official
[Fetch spec](https://fetch.spec.whatwg.org/). Such tests may fail unless
CORB is enabled. In practice this means that:
(using `.tentative` substring in their filename).
Such tests may fail unless CORB is enabled. In practice this means that:
* Such tests will pass in Chromium
(where CORB is enabled by default [since M68](https://crrev.com/553830)).
* Such tests may fail in other browsers.
@ -53,12 +55,13 @@ WPT tests can cover the following:
* blocking of CORB-protected documents can prevent triggering
syntax errors in scripts -
`script-html-via-cross-origin-blob-url.tentative.sub.html`
* Helping verify which MIME types are protected by CORB.
Examples of aspects that WPT tests cannot cover (these aspects have to be
covered in other, browser-specific tests):
* Verifying that CORB doesn't affect things that are only indirectly
observable by the web (like
[prefetch](https://html.spec.whatwg.org/#link-type-prefetch).
* Verifying that CORB strips non-safe-listed headers of blocked responses.
* Verifying that CORB strips headers of blocked responses.
* Verifying that CORB blocks responses before they reach the process hosting
a cross-origin execution context.

View file

@ -4,7 +4,6 @@
<link rel="author" title="Intel" href="http://www.intel.com/" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script>
var t1 = async_test("The window's frameElement attribute must return its container element if it is a nested browsing context");
@ -50,21 +49,14 @@ function on_load() {
<body onload="on_load()">
<div id="log"></div>
<iframe id="fr1"></iframe>
<iframe id="fr2" src="resources/frameElement-nested-frame.html"></iframe> <!-- cross origin -->
<iframe id="fr2" src="http://{{hosts[alt][]}}:{{ports[http][0]}}/html/browsers/windows/nested-browsing-contexts/resources/frameElement-nested-frame.html"></iframe><!--cross origin -->
<iframe id="fr3" src="" style="display:none"></iframe>
<object id="obj" name="win2" type="text/html" data="about:blank"></object>
<embed id="emb" name="win3" type="image/svg+xml" src="/images/green.svg" />
<iframe id="fr4" src="resources/frameElement-nested-frame.html"></iframe> <!-- same origin -->
<iframe id="fr5" src="resources/frameElement-window-post.html"></iframe> <!-- cross origin -->
<iframe id="fr5" src="http://{{hosts[alt][]}}:{{ports[http][0]}}/html/browsers/windows/nested-browsing-contexts/resources/frameElement-window-post.html"></iframe> <!-- cross origin -->
<script>
setup(function () {
var src_base = get_host_info().HTTP_REMOTE_ORIGIN;
src_base += document.location.pathname.substring(0, document.location.pathname.lastIndexOf("/") + 1);
document.getElementById("fr2").src = src_base + "/resources/frameElement-nested-frame.html";
document.getElementById("fr5").src = src_base + "/resources/frameElement-window-post.html";
});
test(function () {
assert_equals(window.frameElement, null,
"The frameElement attribute should be null.");

View file

@ -0,0 +1,66 @@
<!doctype html>
<meta charset={{GET[encoding]}}> <!-- ends up as <meta charset> by default which is windows-1252 -->
<meta name=variant content="?encoding=x-cp1251">
<meta name=variant content="?encoding=utf8">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<link rel=help href=https://html.spec.whatwg.org/multipage/rendering.html#the-page>
<link rel=help href=https://html.spec.whatwg.org/multipage/rendering.html#tables-2>
<link rel=help href=https://html.spec.whatwg.org/multipage/#reflecting-content-attributes-in-idl-attributes>
<div id=log></div>
<script>
function expected(encoding) {
return "?" + {
"UTF-8": "%C3%BF",
"windows-1251": "%26%23255%3B",
"windows-1252": "%FF"
}[encoding];
}
function assert_ends_with(input, endsWith) {
assert_true(input.endsWith(endsWith), input + " did not end with " + endsWith);
}
"body table thead tbody tfoot tr td th".split(" ").forEach(localName => {
test(t => {
const elm = document.createElement(localName);
document.body.appendChild(elm);
t.add_cleanup(() => document.body.removeChild(elm));
elm.setAttribute("background", "?\u00FF");
assert_ends_with(getComputedStyle(elm).backgroundImage, expected(document.characterSet) + "\")");
}, "getComputedStyle <" + localName + " background>");
});
function test_url_reflecting(localName, attr, idlAttr) {
idlAttr = idlAttr || attr;
test(() => {
let input = "?\u00FF";
const elm = document.createElement(localName);
assert_true(idlAttr in elm, idlAttr + " is not supported");
elm.setAttribute(attr, input);
assert_ends_with(elm[idlAttr], expected(document.characterSet));
}, "Getting <" + localName + ">." + idlAttr);
}
("iframe src, a href, area href, base href, link href, img src, embed src, object data, " +
"track src, video src, audio src, input src, form action, input formaction formAction, " +
"button formaction formAction, script src").split(", ").forEach(str => {
const arr = str.split(" ");
test_url_reflecting(arr[0], arr[1], arr[2]);
});
function test_string_reflecting(localName, attr) {
test(() => {
let input = "?\u00FF ?\u00FF";
const elm = document.createElement(localName);
assert_true(attr in elm, attr + " is not supported");
elm.setAttribute(attr, input);
assert_equals(elm[attr], input);
}, "Getting <" + localName + ">." + attr);
}
"a ping, area ping".split(", ").forEach(str => {
const arr = str.split(" ");
test_string_reflecting(arr[0], arr[1]);
});
</script>

View file

@ -49,55 +49,6 @@ onload = function() {
test_obj.step_timeout(poll, 200);
}
// background attribute, check with getComputedStyle
function test_background(tag) {
var spec_url = 'https://html.spec.whatwg.org/multipage/rendering.html';
spec_url += tag == 'body' ? '#the-page' : '#tables';
test(function() {
var elm = document.createElement(tag);
document.body.appendChild(elm);
this.add_cleanup(function() {
document.body.removeChild(elm);
});
elm.setAttribute('background', input_url_png);
var got = getComputedStyle(elm).backgroundImage;
assert_true(got.indexOf(expected_current) > -1, msg(expected_current, got));
}, 'getComputedStyle <'+tag+' background>',
{help:spec_url});
}
'body, table, thead, tbody, tfoot, tr, td, th'.split(', ').forEach(function(str) {
test_background(str);
});
// get a reflecting IDL attributes whose content attribute takes a URL or a list of space-separated URLs
function test_reflecting(tag, attr, idlAttr, multiple) {
idlAttr = idlAttr || attr;
var input = input_url_html;
if (multiple) {
input += ' ' + input;
}
test(function() {
var elm = document.createElement(tag);
assert_true(idlAttr in elm, idlAttr + ' is not supported');
elm.setAttribute(attr, input);
var got = elm[idlAttr];
assert_true(got.indexOf(expected_current) > -1, msg(expected_current, got));
}, 'Getting <'+tag+'>.'+idlAttr + (multiple ? ' (multiple URLs)' : ''),
{help:'https://html.spec.whatwg.org/multipage/#reflecting-content-attributes-in-idl-attributes'});
}
('iframe src, a href, base href, link href, img src, embed src, object data, track src, video src, audio src, input src, form action, ' +
'input formaction formAction, button formaction formAction, script src').split(', ').forEach(function(str) {
var arr = str.split(' ');
test_reflecting(arr[0], arr[1], arr[2]);
});
'a ping'.split(', ').forEach(function(str) {
var arr = str.split(' ');
test_reflecting(arr[0], arr[1], arr[2], true);
});
function setup_navigation(elm, iframe, id, test_obj) {
iframe.name = id;
elm.target = id;

View file

@ -0,0 +1 @@
@garykac

View file

@ -214,7 +214,7 @@ SET TIMEOUT: xhr/resources/init.htm
SET TIMEOUT: xhr/resources/xmlhttprequest-timeout.js
# generate_tests implementation and sample usage
GENERATE_TESTS: resources/test/tests/generate-callback.html
GENERATE_TESTS: resources/test/tests/functional/generate-callback.html
GENERATE_TESTS: resources/testharness.js
# generate_tests usage (should be got rid of)
@ -289,9 +289,9 @@ SET TIMEOUT: html/browsers/windows/auxiliary-browsing-contexts/resources/close-o
SET TIMEOUT: html/dom/documents/dom-tree-accessors/Document.currentScript.html
SET TIMEOUT: html/webappapis/timers/*
SET TIMEOUT: resources/chromium/*
SET TIMEOUT: resources/test/tests/add_cleanup.html
SET TIMEOUT: resources/test/tests/api-tests-1.html
SET TIMEOUT: resources/test/tests/worker.js
SET TIMEOUT: resources/test/tests/functional/add_cleanup.html
SET TIMEOUT: resources/test/tests/functional/api-tests-1.html
SET TIMEOUT: resources/test/tests/functional/worker.js
SET TIMEOUT: resources/testharness.js
# setTimeout use in reftests

View file

@ -11,6 +11,7 @@
var audioCapabilities = stream.getAudioTracks()[0].getCapabilities();
var videoCapabilities = stream.getVideoTracks()[0].getCapabilities();
assert_true(undefined !== audioCapabilities.deviceId, "MediaTrackCapabilities's deviceId should exist for an audio track.");
assert_true(undefined !== audioCapabilities.groupId, "MediaTrackCapabilities's groupId should exist for an audio track.");
assert_true(undefined !== audioCapabilities.echoCancellation, "MediaTrackCapabilities's echoCancellation should exist for an audio track.");
assert_true(undefined !== audioCapabilities.autoGainControl, "MediaTrackCapabilities's autoGainControl should exist for an audio track.");
assert_true(undefined !== audioCapabilities.noiseSuppression, "MediaTrackCapabilities's noiseSuppression should exist for an audio track.");

View file

@ -21,7 +21,6 @@ test(function() {
var ctx = offscreenCanvas.getContext('2d');
ctx.fillStyle = "#0f0";
ctx.fillRect(0, 0, 10, 10);
ctx.commit();
// commit() propagation is taken care of by an async task, which means the
// place holder contents should still be transparent black at this moment.
verifyPlaceholder(placeholder, 0,0,0,0, "0,0,0,0");
@ -36,8 +35,7 @@ test(function() {
var ctx = offscreenCanvas.getContext('2d');
ctx.fillStyle = "#0f0";
ctx.fillRect(0, 0, 10, 10);
assert_throws("InvalidStateError", function() { ctx.commit(); });
}, "Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement throws an exception.");
ctx.commit();
}, "Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement is a noop.");
</script>

View file

@ -6,8 +6,7 @@
<script id="myWorker" type="text/worker">
function testCommitPushesContents(offscreenCanvas)
{
function testCommitPushesContents(offscreenCanvas) {
try {
var ctx = offscreenCanvas.getContext('2d');
ctx.fillStyle = "#0f0";
@ -19,24 +18,12 @@ function testCommitPushesContents(offscreenCanvas)
}
}
function isInvalidStateError(funcStr, ctx)
{
try {
eval(funcStr);
} catch (e) {
if (e instanceof DOMException && e.name == "InvalidStateError")
return true;
return false;
}
}
function testCommitException()
{
function testCommitException() {
var offscreenCanvas = new OffscreenCanvas(10, 10);
var ctx = offscreenCanvas.getContext('2d');
ctx.fillStyle = "#0f0";
ctx.fillRect(0, 0, 10, 10);
return isInvalidStateError("ctx.commit()", ctx);
return true;
}
self.onmessage = function(e) {
@ -54,8 +41,7 @@ self.onmessage = function(e) {
<script>
function verifyPlaceholder(placeholder)
{
function verifyPlaceholder(placeholder) {
var canvas = document.createElement('canvas');
canvas.width = canvas.height = 10;
var ctx = canvas.getContext('2d');
@ -63,8 +49,7 @@ function verifyPlaceholder(placeholder)
_assertPixel(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255");
}
function makeWorker(script)
{
function makeWorker(script) {
var blob = new Blob([script]);
return new Worker(URL.createObjectURL(blob));
}

View file

@ -100,7 +100,6 @@ async_test(function(t) {
assert_equals(placeholder.height, 20);
});
var asyncStepsCompleted = 0;
ctx.commit();
createImageBitmap(placeholder).then(image => {
t.step(function() {
// Verify that the placeholder was not updated synchronously.
@ -112,29 +111,33 @@ async_test(function(t) {
t.done();
}
});
// Set timeout acts as a sync barrier to allow commit to propagate
setTimeout(function(){
t.step(function() {
// Verify that commit() asynchronously updates the size of its placeholder canvas.
assert_equals(placeholder.width, 30);
assert_equals(placeholder.height, 40);
var computedStyle = window.getComputedStyle(placeholder);
assert_equals(computedStyle.getPropertyValue('width'), "30px");
assert_equals(computedStyle.getPropertyValue('height'), "40px");
});
createImageBitmap(placeholder).then(image => {
// We wait for up to 3 frames before checking the information has propagated.
requestAnimationFrame(() => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
t.step(function() {
// Verify that an image grabbed from the placeholder has the correct dimensions
assert_equals(image.width, 30);
assert_equals(image.height, 40);
// Verify that updates the size of its placeholder canvas.
assert_equals(placeholder.width, 30);
assert_equals(placeholder.height, 40);
var computedStyle = window.getComputedStyle(placeholder);
assert_equals(computedStyle.getPropertyValue('width'), "30px");
assert_equals(computedStyle.getPropertyValue('height'), "40px");
});
createImageBitmap(placeholder).then(image => {
t.step(function() {
// Verify that an image grabbed from the placeholder has the correct dimensions
assert_equals(image.width, 30);
assert_equals(image.height, 40);
});
asyncStepsCompleted = asyncStepsCompleted + 1;
if (asyncStepsCompleted == 2) {
t.done();
}
});
asyncStepsCompleted = asyncStepsCompleted + 1;
if (asyncStepsCompleted == 2) {
t.done();
}
});
}, 0);
}, "Verify that resizing an OffscreenCanvas with a 2d context propagates the new size to its placeholder canvas asynchronously, upon commit.");
});
});
}, "Verify that resizing an OffscreenCanvas with a 2d context propagates the new size to its placeholder canvas asynchronously.");
async_test(function(t) {
var placeholder = document.createElement('canvas');
@ -159,7 +162,6 @@ async_test(function(t) {
assert_equals(placeholder.height, 20);
});
var asyncStepsCompleted = 0;
ctx.commit();
createImageBitmap(placeholder).then(image => {
t.step(function() {
// Verify that the placeholder was not updated synchronously.
@ -171,29 +173,33 @@ async_test(function(t) {
t.done();
}
});
// Set timeout acts as a sync barrier to allow commit to propagate
setTimeout(function(){
t.step(function() {
// Verify that commit() asynchronously updates the size of its placeholder canvas.
assert_equals(placeholder.width, 30);
assert_equals(placeholder.height, 40);
var computedStyle = window.getComputedStyle(placeholder);
assert_equals(computedStyle.getPropertyValue('width'), "30px");
assert_equals(computedStyle.getPropertyValue('height'), "40px");
});
createImageBitmap(placeholder).then(image => {
t.step(function() {
// Verify that an image grabbed from the placeholder has the correct dimensions
assert_equals(image.width, 30);
assert_equals(image.height, 40);
// We wait for up to 3 frames before checking the information has propagated.
requestAnimationFrame(() => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
t.step(function() {
// Verify that updates the size of its placeholder canvas.
assert_equals(placeholder.width, 30);
assert_equals(placeholder.height, 40);
var computedStyle = window.getComputedStyle(placeholder);
assert_equals(computedStyle.getPropertyValue('width'), "30px");
assert_equals(computedStyle.getPropertyValue('height'), "40px");
});
createImageBitmap(placeholder).then(image => {
t.step(function() {
// Verify that an image grabbed from the placeholder has the correct dimensions
assert_equals(image.width, 30);
assert_equals(image.height, 40);
});
asyncStepsCompleted = asyncStepsCompleted + 1;
if (asyncStepsCompleted == 2) {
t.done();
}
});
});
asyncStepsCompleted = asyncStepsCompleted + 1;
if (asyncStepsCompleted == 2) {
t.done();
}
});
}, 0);
}, "Verify that resizing an OffscreenCanvas with a webgl context propagates the new size to its placeholder canvas asynchronously, upon commit.");
});
}, "Verify that resizing an OffscreenCanvas with a webgl context propagates the new size to its placeholder canvas asynchronously.");
async_test(function(t){
var placeholder = document.createElement('canvas');
@ -204,24 +210,27 @@ async_test(function(t){
offscreen.width = offscreen.height = 10;
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 10, 10);
ctx.commit();
// Set timeout acts as a sync barrier to allow commit to propagate
setTimeout(function(){
var testCanvas = document.createElement('canvas');
testCanvas.width = testCanvas.height = 20;
testCtx = testCanvas.getContext('2d');
testCtx.drawImage(placeholder, 0, 0);
var pixel1 = testCtx.getImageData(9, 9, 1, 1).data;
var pixel2 = testCtx.getImageData(9, 10, 1, 1).data;
var pixel3 = testCtx.getImageData(10, 9, 1, 1).data;
t.step(function() {
assert_equals(placeholder.width, 10);
assert_equals(placeholder.height, 10);
assert_array_equals(pixel1, [0, 255, 0, 255]);
assert_array_equals(pixel2, [0, 0, 0, 0]);
assert_array_equals(pixel3, [0, 0, 0, 0]);
// We wait for up to 3 frames before checking the information has propagated.
requestAnimationFrame(() => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
var testCanvas = document.createElement('canvas');
testCanvas.width = testCanvas.height = 20;
testCtx = testCanvas.getContext('2d');
testCtx.drawImage(placeholder, 0, 0);
var pixel1 = testCtx.getImageData(9, 9, 1, 1).data;
var pixel2 = testCtx.getImageData(9, 10, 1, 1).data;
var pixel3 = testCtx.getImageData(10, 9, 1, 1).data;
t.step(function() {
assert_equals(placeholder.width, 10);
assert_equals(placeholder.height, 10);
assert_array_equals(pixel1, [0, 255, 0, 255]);
assert_array_equals(pixel2, [0, 0, 0, 0]);
assert_array_equals(pixel3, [0, 0, 0, 0]);
});
t.done();
});
});
t.done();
});
}, "Verify that drawImage uses the size of the committed frame as the intinsic size of a placeholder canvas.");
}, "Verify that drawImage uses the size of the frame as the intinsic size of a placeholder canvas.");
</script>

View file

@ -26,12 +26,12 @@ the correct arguments.
## Authoring Tests
Test cases are expressed as `.html` files located within the `tests/`
sub-directory. Each test should include the `testharness.js` library with the
following markup:
Test cases are expressed as `.html` files located within the `tests/unit/` and
`tests/funtional/` sub-directories. Each test should include the
`testharness.js` library with the following markup:
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
This should be followed by one or more `<script>` tags that interface with the
`testharness.js` API in some way. For example:
@ -42,8 +42,25 @@ This should be followed by one or more `<script>` tags that interface with the
}, 'This test is expected to fail.');
</script>
Finally, each test may include a summary of the expected results as a JSON
string within a `<script>` tag with an `id` of `"expected"`, e.g.:
### Unit tests
The "unit test" type allows for concisely testing the expected behavior of
assertion methods. These tests may define any number of sub-tests; the
acceptance criteria is simply that all tests executed pass.
### Functional tests
Thoroughly testing the behavior of the harness itself requires ensuring a
number of considerations which cannot be verified with the "unit testing"
strategy. These include:
- Ensuring that some tests are not run
- Ensuring conditions that cause test failures
- Ensuring conditions that cause harness errors
Functional tests allow for these details to be verified. Every functional test
must include a summary of the expected results as a JSON string within a
`<script>` tag with an `id` of `"expected"`, e.g.:
<script type="text/json" id="expected">
{
@ -64,6 +81,3 @@ string within a `<script>` tag with an `id` of `"expected"`, e.g.:
"type": "complete"
}
</script>
This is useful to test, for example, whether asserations that should fail or
throw actually do.

View file

@ -17,8 +17,13 @@ def pytest_addoption(parser):
parser.addoption("--binary", action="store", default=None, help="path to browser binary")
def pytest_collect_file(path, parent):
if path.ext.lower() == '.html':
return HTMLItem(str(path), parent)
if path.ext.lower() != '.html':
return
# Tests are organized in directories by type
test_type = os.path.relpath(str(path), HERE).split(os.path.sep)[1]
return HTMLItem(str(path), test_type, parent)
def pytest_configure(config):
config.driver = webdriver.Firefox(firefox_binary=config.getoption("--binary"))
@ -28,8 +33,13 @@ def pytest_configure(config):
config.add_cleanup(config.driver.quit)
class HTMLItem(pytest.Item, pytest.Collector):
def __init__(self, filename, parent):
def __init__(self, filename, test_type, parent):
self.filename = filename
self.type = test_type
if test_type not in ('functional', 'unit'):
raise ValueError('Unrecognized test type: "%s"' % test_type)
with io.open(filename, encoding=ENC) as f:
markup = f.read()
@ -47,6 +57,10 @@ class HTMLItem(pytest.Item, pytest.Collector):
if not name:
raise ValueError('No name found in file: %s' % filename)
elif self.type == 'functional' and not self.expected:
raise ValueError('Functional tests must specify expected report data')
elif self.type == 'unit' and self.expected:
raise ValueError('Unit tests must not specify expected report data')
super(HTMLItem, self).__init__(name, parent)
@ -58,6 +72,29 @@ class HTMLItem(pytest.Item, pytest.Collector):
return pytest.Collector.repr_failure(self, excinfo)
def runtest(self):
if self.type == 'unit':
self._run_unit_test()
elif self.type == 'functional':
self._run_functional_test()
else:
raise NotImplementedError
def _run_unit_test(self):
driver = self.session.config.driver
server = self.session.config.server
driver.get(server.url(HARNESS))
actual = driver.execute_async_script('runTest("%s", "foo", arguments[0])' % server.url(str(self.filename)))
summarized = self._summarize(actual)
assert summarized[u'summarized_status'][u'status_string'] == u'OK', summarized[u'summarized_status'][u'message']
for test in summarized[u'summarized_tests']:
msg = "%s\n%s" % (test[u'name'], test[u'message'])
assert test[u'status_string'] == u'PASS', msg
def _run_functional_test(self):
driver = self.session.config.driver
server = self.session.config.server
@ -70,20 +107,20 @@ class HTMLItem(pytest.Item, pytest.Collector):
indices = [test_obj.get('index') for test_obj in actual['tests']]
self._assert_sequence(indices)
summarized = self._summarize(actual)
assert summarized == self.expected
def _summarize(self, actual):
summarized = {}
summarized[u'summarized_status'] = self._summarize_status(actual['status'])
summarized[u'summarized_tests'] = [
self._summarize_test(test) for test in actual['tests']]
summarized[u'summarized_tests'].sort(key=lambda test_obj: test_obj.get('name'))
summarized[u'type'] = actual['type']
if not self.expected:
assert summarized[u'summarized_status'][u'status_string'] == u'OK', summarized[u'summarized_status'][u'message']
for test in summarized[u'summarized_tests']:
msg = "%s\n%s" % (test[u'name'], test[u'message'])
assert test[u'status_string'] == u'PASS', msg
else:
assert summarized == self.expected
return summarized
@staticmethod
def _assert_sequence(nums):

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Test#add_cleanup</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Test#add_cleanup reported count</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Test#add_cleanup: error</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Test#add_cleanup: multiple functions with one in error</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>

View file

@ -7,8 +7,8 @@
<body onload="load_test_attr.done()">
<h1>Sample HTML5 API Tests</h1>
<div id="log"></div>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
setup_run = false;
setup(function() {

View file

@ -7,8 +7,8 @@
<h1>Sample HTML5 API Tests</h1>
<p>There should be two results</p>
<div id="log"></div>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
setup({explicit_done:true})
test(function() {assert_true(true)}, "Test defined before onload");

View file

@ -3,7 +3,7 @@
<head>
<title>Sample HTML5 API Tests</title>
</head>
<script src="../../testharness.js"></script>
<script src="/resources/testharness.js"></script>
<body>
<h1>Sample HTML5 API Tests</h1>

View file

@ -6,8 +6,8 @@
<body>
<h1>Test#force_timeout</h1>
<div id="log"></div>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
setup({ explicit_timeout: true });

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Sample for using generate_tests to create a series of tests that share the same callback.</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>

View file

@ -3,10 +3,10 @@
<head>
<meta charset="utf-8">
<title>idlharness: Immutable prototypes</title>
<script src="../../../../testharness.js"></script>
<script src="../../../../testharnessreport.js"></script>
<script src="../../../../WebIDLParser.js"></script>
<script src="../../../../idlharness.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
</head>
<body>
<script>

View file

@ -7,7 +7,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../helper.js"></script>
<script src="../../../../idl-helper.js"></script>
</head>
<body>
<script>

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Example with iframe that notifies containing document via callbacks</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body onload="start_test_in_iframe()">
<h1>Callbacks From Tests Running In An IFRAME</h1>

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Example with iframe that consolidates errors via fetch_tests_from_window</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var parent_test = async_test("Test executing in parent context");
</script>

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Example with iframe that consolidates tests via fetch_tests_from_window</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var parent_test = async_test("Test executing in parent context");
</script>

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Example with iframe that notifies containing document via cross document messaging</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>Notifications From Tests Running In An IFRAME</h1>

View file

@ -6,8 +6,8 @@
</head>
<body>
<div id="log"></div>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {}, 'second');
test(function() {}, 'first');

View file

@ -7,8 +7,8 @@
<h1>Async Tests and Promises</h1>
<p>This test assumes ECMAScript 6 Promise support. Some failures are expected.</p>
<div id="log"></div>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {

View file

@ -8,8 +8,8 @@
<p>This test demonstrates the use of <tt>promise_test</tt>. Assumes ECMAScript 6
Promise support. Some failures are expected.</p>
<div id="log"></div>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(
function() {

View file

@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<title>Example with file_is_test (should fail)</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
onload = function() {
assert_true(false);

View file

@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<title>Example single page test with no asserts</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
done();
</script>

View file

@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<title>Example single page test with no body</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
assert_true(true);
done();

View file

@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<title>Example with file_is_test</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
onload = function() {
assert_true(true);

View file

@ -3,7 +3,7 @@
<head>
<title>Harness Handling Uncaught Exception</title>
</head>
<script src="../../testharness.js"></script>
<script src="/resources/testharness.js"></script>
<body>
<h1>Harness Handling Uncaught Exception</h1>

View file

@ -3,7 +3,7 @@
<head>
<title>Harness Ignoring Uncaught Exception</title>
</head>
<script src="../../testharness.js"></script>
<script src="/resources/testharness.js"></script>
<body>
<h1>Harness Ignoring Uncaught Exception</h1>

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Dedicated Worker Tests</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>Dedicated Web Worker Tests</h1>

View file

@ -1,3 +1,3 @@
importScripts("../../testharness.js");
importScripts("/resources/testharness.js");
throw new Error("This failure is expected.");

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Example with a service worker</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>Service Worker Tests</h1>

View file

@ -2,8 +2,8 @@
<html>
<head>
<title>Example with a shared worker</title>
<script src="../../testharness.js"></script>
<script src="../../testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>Shared Web Worker Tests</h1>

View file

@ -1,4 +1,4 @@
importScripts("../../testharness.js");
importScripts("/resources/testharness.js");
test(
function(test) {

View file

@ -9,7 +9,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../helper.js"></script>
<script src="../../../idl-helper.js"></script>
<script>
"use strict";

View file

@ -9,7 +9,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../helper.js"></script>
<script src="../../../idl-helper.js"></script>
<script>
"use strict";
test(function() {

View file

@ -8,7 +8,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../helper.js"></script>
<script src="../../../idl-helper.js"></script>
</head>
<body>

View file

@ -9,7 +9,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../helper.js"></script>
<script src="../../../idl-helper.js"></script>
<pre id=fragments>
interface A : B {
attribute DOMString a;

View file

@ -9,7 +9,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../helper.js"></script>
<script src="../../../idl-helper.js"></script>
<script>
"use strict";
test(function() {

View file

@ -9,7 +9,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../helper.js"></script>
<script src="../../../idl-helper.js"></script>
<script>
"use strict";
test(function() {

View file

@ -9,7 +9,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../helper.js"></script>
<script src="../../../idl-helper.js"></script>
<script>
"use strict";
test(function() {

View file

@ -9,7 +9,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../helper.js"></script>
<script src="../../../idl-helper.js"></script>
<pre id=fragments>
interface A : B { };
interface B : C { };

View file

@ -9,7 +9,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script src="../helper.js"></script>
<script src="../../../idl-helper.js"></script>
<script>
"use strict";
test(function() {

View file

@ -1,102 +0,0 @@
html {
font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans;
}
#log .warning,
#log .warning a {
color: black;
background: yellow;
}
#log .error,
#log .error a {
color: white;
background: red;
}
section#summary {
margin-bottom:1em;
}
table#results {
border-collapse:collapse;
table-layout:fixed;
width:100%;
}
table#results th:first-child,
table#results td:first-child {
width:4em;
}
table#results th:last-child,
table#results td:last-child {
width:50%;
}
table#results.assertions th:last-child,
table#results.assertions td:last-child {
width:35%;
}
table#results th {
padding:0;
padding-bottom:0.5em;
border-bottom:medium solid black;
}
table#results td {
padding:1em;
padding-bottom:0.5em;
border-bottom:thin solid black;
}
tr.pass > td:first-child {
color:green;
}
tr.fail > td:first-child {
color:red;
}
tr.timeout > td:first-child {
color:red;
}
tr.notrun > td:first-child {
color:blue;
}
.pass > td:first-child, .fail > td:first-child, .timeout > td:first-child, .notrun > td:first-child {
font-variant:small-caps;
}
table#results span {
display:block;
}
table#results span.expected {
font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
white-space:pre;
}
table#results span.actual {
font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
white-space:pre;
}
span.ok {
color:green;
}
tr.error {
color:red;
}
span.timeout {
color:red;
}
span.ok, span.timeout, span.error {
font-variant:small-caps;
}

View file

@ -2403,15 +2403,11 @@ policies and contribution forms [3].
log.removeChild(log.lastChild);
}
var harness_url = get_harness_url();
if (harness_url !== undefined) {
var stylesheet = output_document.createElementNS(xhtml_ns, "link");
stylesheet.setAttribute("rel", "stylesheet");
stylesheet.setAttribute("href", harness_url + "testharness.css");
var heads = output_document.getElementsByTagName("head");
if (heads.length) {
heads[0].appendChild(stylesheet);
}
var stylesheet = output_document.createElementNS(xhtml_ns, "style");
stylesheet.textContent = stylesheetContent;
var heads = output_document.getElementsByTagName("head");
if (heads.length) {
heads[0].appendChild(stylesheet);
}
var status_text_harness = {};
@ -2921,16 +2917,6 @@ policies and contribution forms [3].
return undefined;
}
/** Returns the URL path at which the files for testharness.js are assumed to reside (e.g., '/resources/').
The path is derived from inspecting the 'src' of the <script> tag that included 'testharness.js'. */
function get_harness_url()
{
var script_url = get_script_url();
// Exclude the 'testharness.js' file from the returned path, but '+ 1' to include the trailing slash.
return script_url ? script_url.slice(0, script_url.lastIndexOf('/') + 1) : undefined;
}
function supports_post_message(w)
{
var supports;
@ -3009,5 +2995,113 @@ policies and contribution forms [3].
test_environment.on_tests_ready();
/**
* Stylesheet
*/
var stylesheetContent = `
html {
font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans;
}
#log .warning,
#log .warning a {
color: black;
background: yellow;
}
#log .error,
#log .error a {
color: white;
background: red;
}
section#summary {
margin-bottom:1em;
}
table#results {
border-collapse:collapse;
table-layout:fixed;
width:100%;
}
table#results th:first-child,
table#results td:first-child {
width:4em;
}
table#results th:last-child,
table#results td:last-child {
width:50%;
}
table#results.assertions th:last-child,
table#results.assertions td:last-child {
width:35%;
}
table#results th {
padding:0;
padding-bottom:0.5em;
border-bottom:medium solid black;
}
table#results td {
padding:1em;
padding-bottom:0.5em;
border-bottom:thin solid black;
}
tr.pass > td:first-child {
color:green;
}
tr.fail > td:first-child {
color:red;
}
tr.timeout > td:first-child {
color:red;
}
tr.notrun > td:first-child {
color:blue;
}
.pass > td:first-child, .fail > td:first-child, .timeout > td:first-child, .notrun > td:first-child {
font-variant:small-caps;
}
table#results span {
display:block;
}
table#results span.expected {
font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
white-space:pre;
}
table#results span.actual {
font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
white-space:pre;
}
span.ok {
color:green;
}
tr.error {
color:red;
}
span.timeout {
color:red;
}
span.ok, span.timeout, span.error {
font-variant:small-caps;
}
`;
})(this);
// vim: set expandtab shiftwidth=4 tabstop=4:

View file

@ -40,10 +40,11 @@ var testedScriptElement = null;
function executeNextTest()
{
var testCase = asyncScriptTests.shift();
var mode = testCase.mode;
if (!testCase)
return;
var mode = testCase.mode;
testCase.test.step(function () {
testedScriptElement = document.createElement('script');
testedScriptElement.src = 'resources/Document-prototype-currentScript-helper.js';
@ -75,7 +76,7 @@ var asyncScriptTests = [
test: async_test('document.currentScript must be set to a script element that loads an external script in a document tree'),
mode: null, remove: false, expected: function () { return testedScriptElement; }},
{
test: async_test('document.currentScript must be set to a script element that loads an external script in a document tree'),
test: async_test('document.currentScript must be set to a script element that loads an external script in a document tree (2)'),
mode: null, remove: true, expected: function () { return testedScriptElement; }},
{
test: async_test('document.currentScript must not be set to a script element that loads an external script in an open shadow tree'),

View file

@ -1,7 +1,9 @@
#!/bin/bash
set -e
if [[ -z ${RUN_JOB+x} && $(./wpt test-jobs --includes $JOB; echo $?) -eq 0 ]] || [[ $RUN_JOB -eq 1 ]]; then
RELEVANT_JOBS=$(./wpt test-jobs)
RELEVANT_CHANGES=$(echo "$RELEVANT_JOBS" | grep $JOB || true)
if [[ -z ${RUN_JOB+x} && ! -z $RELEVANT_CHANGES ]] || [[ $RUN_JOB -eq 1 ]]; then
export RUN_JOB=1
git submodule update --init --recursive 1>&2
export DISPLAY=:99.0

View file

@ -18,8 +18,10 @@ run_applicable_tox () {
export TOXENV="$OLD_TOXENV"
}
RELEVANT_JOBS=$(./wpt test-jobs)
if [[ $(./wpt test-jobs --includes tools_unittest; echo $?) -eq 0 ]]; then
RELEVANT_CHANGES_TOOLS=$(echo "$RELEVANT_JOBS" | grep "tools_unittest" || true)
if [[ ! -z $RELEVANT_CHANGES_TOOLS ]]; then
pip install -U tox codecov
cd tools
run_applicable_tox
@ -28,7 +30,8 @@ else
echo "Skipping tools unittest"
fi
if [[ $(./wpt test-jobs --includes wptrunner_unittest; echo $?) -eq 0 ]]; then
RELEVANT_CHANGES_WPTRUNNER=$(echo "$RELEVANT_JOBS" | grep "wptrunner_unittest" || true)
if [[ ! -z $RELEVANT_CHANGES_WPTRUNNER ]]; then
cd tools/wptrunner
run_applicable_tox
cd $WPT_ROOT

View file

@ -12,8 +12,8 @@ wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))
docker_image = "harjgam/web-platform-tests:0.11"
task_template = {
"provisionerId": "{{ taskcluster.docker.provisionerId }}",
"workerType": "{{ taskcluster.docker.workerType }}",
"provisionerId": "aws-provisioner-v1",
"workerType": "wpt-docker-worker",
"extra": {
"github": {
"events": ["push"],

View file

@ -28,7 +28,7 @@ then
deb_archive=google-chrome-unstable_current_amd64.deb
wget https://dl.google.com/linux/direct/$deb_archive
sudo gdebi -n $deb_archive
sudo apt-get -qqy update && gdebi -n $deb_archive
fi
sudo Xvfb $DISPLAY -screen 0 ${SCREEN_WIDTH}x${SCREEN_HEIGHT}x${SCREEN_DEPTH} &

View file

@ -40,10 +40,8 @@ select = E,W,F,N
# E901: SyntaxError or IndentationError
# W601: .has_key() is deprecated, use in
# F401: module imported but unused
# F403: from module import * used; unable to detect undefined names
# F405: name may be undefined, or defined from star imports: module
# N801: class names should use CapWords convention
# N802: function name should be lowercase
ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,F403,F405,N801,N802
ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,N801,N802
max-line-length = 141
exclude = .tox,html5lib,third_party/py,third_party/pytest,third_party/funcsigs,third_party/attrs,third_party/pluggy/,pywebsocket,six,_venv,webencodings,wptserve/docs,wptserve/tests/functional/docroot/,wpt,wptrunner

View file

@ -43,9 +43,7 @@ select = E,W,F,N
# E901: SyntaxError or IndentationError
# W601: .has_key() is deprecated, use in
# F401: module imported but unused
# F403: from module import * used; unable to detect undefined names
# F405: name may be undefined, or defined from star imports: module
# N801: class names should use CapWords convention
# N802: function name should be lowercase
ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,F403,F405,N801,N802
ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,N801,N802
max-line-length = 141

View file

@ -53,9 +53,7 @@ select = E,W,F,N
# E901: SyntaxError or IndentationError
# W601: .has_key() is deprecated, use in
# F401: module imported but unused
# F403: from module import * used; unable to detect undefined names
# F405: name may be undefined, or defined from star imports: module
# N801: class names should use CapWords convention
# N802: function name should be lowercase
ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,F403,F405,N801,N802
ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,N801,N802
max-line-length = 141

View file

@ -1,6 +1,5 @@
import subprocess
from ..config import *
from .base import Browser, ExecutorBrowser, require_arg
from ..webdriver_server import ChromeDriverServer
from ..executors import executor_kwargs as base_executor_kwargs

View file

@ -43,7 +43,7 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
executor_kwargs["timeout_multiplier"] = get_timeout_multiplier(test_type,
run_info_data,
**kwargs)
executor_kwargs["capabilities"] = dict(DesiredCapabilities.EDGE.items())
executor_kwargs["capabilities"] = {}
return executor_kwargs
def env_extras(**kwargs):

View file

@ -17,7 +17,10 @@ from __future__ import unicode_literals
import types
from cStringIO import StringIO
from node import *
from node import (AtomNode, BinaryExpressionNode, BinaryOperatorNode,
ConditionalNode, DataNode, IndexNode, KeyValueNode, ListNode,
NumberNode, StringNode, UnaryExpressionNode,
UnaryOperatorNode, ValueNode, VariableNode)
class ParseError(Exception):

Some files were not shown because too many files have changed in this diff Show more