Update web-platform-tests to revision 71e901cf4534417abfabe4d77a317817f5cc09db

This commit is contained in:
WPT Sync Bot 2019-01-03 20:37:31 -05:00
parent 7c34a70ca8
commit 0bc27d4696
48 changed files with 1125 additions and 147 deletions

View file

@ -14,6 +14,9 @@
[Revoke blob URL after creating Request, will fetch]
expected: FAIL
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL
[url-with-fetch.any.html]
[Untitled]

View file

@ -12571,6 +12571,12 @@
{}
]
],
"html/editing/dnd/the-datatransferitem-interface/getAsString-manual.html": [
[
"/html/editing/dnd/the-datatransferitem-interface/getAsString-manual.html",
{}
]
],
"html/editing/dnd/the-dragevent-interface/dragevent-manual.html": [
[
"/html/editing/dnd/the-dragevent-interface/dragevent-manual.html",
@ -13165,6 +13171,12 @@
{}
]
],
"mediacapture-depth/dictionary-manual.https.html": [
[
"/mediacapture-depth/dictionary-manual.https.html",
{}
]
],
"mediacapture-streams/MediaStream-MediaElement-preload-none-manual.https.html": [
[
"/mediacapture-streams/MediaStream-MediaElement-preload-none-manual.https.html",
@ -86525,6 +86537,18 @@
{}
]
],
"css/CSS2/stacking-context/opacity-change-parent-stacking-context.html": [
[
"/css/CSS2/stacking-context/opacity-change-parent-stacking-context.html",
[
[
"/css/CSS2/stacking-context/opacity-change-parent-stacking-context-ref.html",
"=="
]
],
{}
]
],
"css/CSS2/syntax/at-charset-001.xht": [
[
"/css/CSS2/syntax/at-charset-001.xht",
@ -125637,6 +125661,18 @@
{}
]
],
"css/css-lists/li-with-height-001.html": [
[
"/css/css-lists/li-with-height-001.html",
[
[
"/css/css-lists/li-with-height-001-ref.html",
"=="
]
],
{}
]
],
"css/css-logical/cascading-001.html": [
[
"/css/css-logical/cascading-001.html",
@ -149121,6 +149157,18 @@
{}
]
],
"css/css-transforms/size-change-under-backface-visibility-hidden.html": [
[
"/css/css-transforms/size-change-under-backface-visibility-hidden.html",
[
[
"/css/css-transforms/size-change-under-backface-visibility-hidden-ref.html",
"=="
]
],
{}
]
],
"css/css-transforms/skew-test1.html": [
[
"/css/css-transforms/skew-test1.html",
@ -204075,6 +204123,11 @@
{}
]
],
"bluetooth/resources/bluetooth-scanning-helpers.js": [
[
{}
]
],
"bluetooth/resources/health-thermometer-iframe.html": [
[
{}
@ -245495,6 +245548,11 @@
{}
]
],
"css/CSS2/stacking-context/opacity-change-parent-stacking-context-ref.html": [
[
{}
]
],
"css/CSS2/support/100x100-lime.png": [
[
{}
@ -265335,6 +265393,11 @@
{}
]
],
"css/css-lists/li-with-height-001-ref.html": [
[
{}
]
],
"css/css-logical/META.yml": [
[
{}
@ -272395,6 +272458,11 @@
{}
]
],
"css/css-transforms/size-change-under-backface-visibility-hidden-ref.html": [
[
{}
]
],
"css/css-transforms/skewX/reference/svg-skewx-ref.html": [
[
{}
@ -288255,6 +288323,11 @@
{}
]
],
"fonts/Ahem.ttf.headers": [
[
{}
]
],
"fonts/CSSTest/LICENSE": [
[
{}
@ -298110,6 +298183,11 @@
{}
]
],
"html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/empty-iframe.html": [
[
{}
]
],
"html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/Function.js": [
[
{}
@ -301640,6 +301718,11 @@
{}
]
],
"mediacapture-depth/dictionary-helper.js": [
[
{}
]
],
"mediacapture-fromelement/META.yml": [
[
{}
@ -377270,6 +377353,12 @@
{}
]
],
"html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html": [
[
"/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html",
{}
]
],
"html/semantics/scripting-1/the-script-element/module/error-and-slow-dependency.html": [
[
"/html/semantics/scripting-1/the-script-element/module/error-and-slow-dependency.html",
@ -396524,6 +396613,12 @@
{}
]
],
"portals/portals-host-null.html": [
[
"/portals/portals-host-null.html",
{}
]
],
"portals/portals-no-referrer.html": [
[
"/portals/portals-no-referrer.html",
@ -407224,6 +407319,12 @@
{}
]
],
"resource-timing/no-entries-for-cross-origin-css-fetched.sub.html": [
[
"/resource-timing/no-entries-for-cross-origin-css-fetched.sub.html",
{}
]
],
"resource-timing/resource-timing-tojson.html": [
[
"/resource-timing/resource-timing-tojson.html",
@ -421028,9 +421129,9 @@
{}
]
],
"webxr/xrSession_requestFrameOfReference.https.html": [
"webxr/xrSession_requestReferenceSpace.https.html": [
[
"/webxr/xrSession_requestFrameOfReference.https.html",
"/webxr/xrSession_requestReferenceSpace.https.html",
{}
]
],
@ -455504,7 +455605,11 @@
"testharness"
],
"bluetooth/resources/bluetooth-helpers.js": [
"c4e26077c34283cc6d442cc8bc57f799eadd5a99",
"64a20c2f994164abd16d77143b5e39da89927ed4",
"support"
],
"bluetooth/resources/bluetooth-scanning-helpers.js": [
"9b173e6367ce2173336299e4ea005668ca53a03f",
"support"
],
"bluetooth/resources/health-thermometer-iframe.html": [
@ -521775,6 +521880,14 @@
"1946e4f25e483b384e55e75cae4a1cd2da2c4cfa",
"reftest"
],
"css/CSS2/stacking-context/opacity-change-parent-stacking-context-ref.html": [
"0e38f92ae4743552c86ac4a65cd8b054ea03a880",
"support"
],
"css/CSS2/stacking-context/opacity-change-parent-stacking-context.html": [
"94587c5f6e21b92ab7ab1d5ca3b447eb2bdab15b",
"reftest"
],
"css/CSS2/support/100x100-lime.png": [
"1b947700808585e8c224cee096247eb5d30a1ded",
"support"
@ -561999,6 +562112,14 @@
"ff1bcdcfb4690df571dc2d5c93df71b55ffad5e6",
"testharness"
],
"css/css-lists/li-with-height-001-ref.html": [
"486009d5604ab7a2cb66df735efff3c11c00b685",
"support"
],
"css/css-lists/li-with-height-001.html": [
"ad2ac65e179714dd5fb85de6b67a6f097823a507",
"reftest"
],
"css/css-lists/list-style-type-armenian-002.xht": [
"02e06b707f709870b30e810e4b1a4ec330ada296",
"visual"
@ -576588,7 +576709,7 @@
"support"
],
"css/css-transforms/animation/list-interpolation.html": [
"90cdebbb6cdb643e4c55cb7c0dcd5340fad9a9bd",
"af221e5feaee92734f89185a413e3cd2dc57bc29",
"testharness"
],
"css/css-transforms/animation/matrix-interpolation.html": [
@ -578743,6 +578864,14 @@
"b1e0e8b14b6df8df2d135a0032822b1489b73b1e",
"reftest"
],
"css/css-transforms/size-change-under-backface-visibility-hidden-ref.html": [
"e9362c35745416a4ca19a9ab0bf92dd69afb8634",
"support"
],
"css/css-transforms/size-change-under-backface-visibility-hidden.html": [
"1543eeb3da3e0efb58239097fe486f1ca85d7c63",
"reftest"
],
"css/css-transforms/skew-test1.html": [
"1f366673488b1a1a4cc2f95096f57a9ef358a23e",
"reftest"
@ -615163,6 +615292,10 @@
"4d4785a4123287a5ca08439a6230514de91df0e7",
"support"
],
"fonts/Ahem.ttf.headers": [
"cb762eff806849df46dc758ef7b98b63f27f54c9",
"support"
],
"fonts/CSSTest/LICENSE": [
"9b3c1a6df54771041e357b1ed65aee572dc97bed",
"support"
@ -623995,6 +624128,10 @@
"1730c4bc738897d8bd6f0e74febba949e25a932a",
"manual"
],
"html/editing/dnd/the-datatransferitem-interface/getAsString-manual.html": [
"c328f0031b8e04cb7494e3e97516eb92787eb68c",
"manual"
],
"html/editing/dnd/the-dragevent-interface/dragevent-manual.html": [
"aafe83205fdf3fda301caba3a5313a9a177771b6",
"manual"
@ -631711,6 +631848,10 @@
"f3322773a42b11868bd472cb004ea5ca41f224f1",
"testharness"
],
"html/semantics/scripting-1/the-script-element/module/dynamic-import/resources/empty-iframe.html": [
"ad5ab30eda15c3f755c8c00b3b81029432e242d9",
"support"
],
"html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/Function.js": [
"bc88bf7bd637a06e5f1fc23743470144b1dfb55f",
"support"
@ -631779,6 +631920,10 @@
"e0e3ec8a94df8b0a27ae513fc6412da1fb87062c",
"testharness"
],
"html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html": [
"a9c0528216166a458e48902c2c722a548432f4dd",
"testharness"
],
"html/semantics/scripting-1/the-script-element/module/error-and-slow-dependency.html": [
"f336276f3fcdbe1777b0c3bcf3140999655011b4",
"testharness"
@ -637888,9 +638033,17 @@
"support"
],
"mediacapture-depth/META.yml": [
"434612091df41dcf66859c46c66ed8cdaa6ba316",
"e083c9b8c3ab0b20b24976d8ab94f5d04fb243dd",
"support"
],
"mediacapture-depth/dictionary-helper.js": [
"46853525f08768617fa5102821e52f1f788caca4",
"support"
],
"mediacapture-depth/dictionary-manual.https.html": [
"e464f293fb1d74a2820fc58217a77895396457ba",
"manual"
],
"mediacapture-depth/idlharness.html": [
"1afc6e5a05b2b8e0a288e7b680cf2920bdd1c525",
"testharness"
@ -649163,6 +649316,10 @@
"29134d490f7bdfb09255e190fe91576629057c78",
"support"
],
"portals/portals-host-null.html": [
"e0f1d63743c54c687d62f86abe278873fa823430",
"testharness"
],
"portals/portals-no-referrer.html": [
"0386272f441a0c2e19452821968a624d3ab16700",
"testharness"
@ -659132,7 +659289,7 @@
"support"
],
"resource-timing/buffer-full-add-after-full-event.html": [
"07897b5d28dfb281463dc49dc5481d2a1de187b5",
"73ad841e92fddff1e05395241d69a0079e7a84da",
"testharness"
],
"resource-timing/buffer-full-add-entries-during-callback-that-drop.html": [
@ -659187,6 +659344,10 @@
"944ee10c44259ac84281cd802144068583d539db",
"support"
],
"resource-timing/no-entries-for-cross-origin-css-fetched.sub.html": [
"92d94a17ec0df642b0a500dbd9fb5aa06eaacb64",
"testharness"
],
"resource-timing/resource-timing-tojson.html": [
"77094f4b843a43fb30aeca48c505337b4322ca81",
"testharness"
@ -659456,7 +659617,7 @@
"support"
],
"resource-timing/resources/webperftestharnessextension.js": [
"230f2ac6769d745a7647b16b13d8c6e96fc982b1",
"901cb1db8284a967e87e93afb9da8752fa7a2a7f",
"support"
],
"resource-timing/resources/worker_with_images.js": [
@ -686060,15 +686221,15 @@
"testharness"
],
"webxr/xrSession_requestAnimationFrame_data_valid.https.html": [
"4093d7afdb3ad08533521ffb096a92a461c13747",
"5f825fa3d58314479c08716616558666b6eac211",
"testharness"
],
"webxr/xrSession_requestAnimationFrame_getViewerPose.https.html": [
"c6d5c1024fbadfa95af7a70216b2338fc43aef1b",
"17b5307f019dc7ec4696dbceef5eb3d5cd21d361",
"testharness"
],
"webxr/xrSession_requestFrameOfReference.https.html": [
"ea758761e59de144a742019cc386b083639db6c9",
"webxr/xrSession_requestReferenceSpace.https.html": [
"d97852c917bc8f42f4999e5b0d1c13a7fef364ab",
"testharness"
],
"workers/META.yml": [

View file

@ -0,0 +1,2 @@
[opacity-change-parent-stacking-context.html]
expected: TIMEOUT

View file

@ -65,3 +65,18 @@
[none -> something: Animation between "none" and "translate(200px) rotate(720deg)" at progress 0.25]
expected: FAIL
[Mismatched lengths (from is shorter), partial match: Animation between "rotate(0deg) scaleX(1)" and "rotate(720deg) translateX(0px) scaleX(2)" at progress 0.25]
expected: FAIL
[Common prefix on primitive: Animation between "scaleY(-3) translateX(0px)" and "scaleX(-3) scaleY(2)" at progress 0.25]
expected: FAIL
[Mismatched lengths (to is shorter), partial match on primitive: Animation between "scaleY(-3) translateX(0px) scaleX(2)" and "scaleX(-3) scaleY(2)" at progress 0.25]
expected: FAIL
[Mismatched lengths (from is shorter), partial match on primitive: Animation between "scaleX(-3) scaleY(2)" and "scaleY(-3) translateX(0px) scaleX(2)" at progress 0.25]
expected: FAIL
[Mismatched lengths (to is shorter), partial match: Animation between "rotate(720deg) translateX(0px) scaleX(2)" and "rotate(0deg) scaleX(1)" at progress 0.25]
expected: FAIL

View file

@ -0,0 +1,2 @@
[size-change-under-backface-visibility-hidden.html]
expected: TIMEOUT

View file

@ -509,21 +509,3 @@
[text-indent percentage(%) / values]
expected: FAIL
[margin-right length(in) / values]
expected: FAIL
[margin-top length(px) / values]
expected: FAIL
[margin-top length(pt) / values]
expected: FAIL
[margin-right length(cm) / values]
expected: FAIL
[padding-bottom length(cm) / values]
expected: FAIL
[margin-top length(pc) / values]
expected: FAIL

View file

@ -74,6 +74,3 @@
[opacity end]
expected: FAIL
[border-left-width end]
expected: FAIL

View file

@ -2,7 +2,7 @@
type: testharness
[single-byte-decoder.html?document]
expected: CRASH
expected: TIMEOUT
[ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)]
expected: FAIL
@ -55,7 +55,7 @@
expected: FAIL
[windows-1252: iso_8859-1:1987 (XMLHttpRequest)]
expected: TIMEOUT
expected: FAIL
[windows-1254: iso_8859-9:1989 (XMLHttpRequest)]
expected: TIMEOUT
@ -141,26 +141,8 @@
[windows-1254: cp1254 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: x-cp1252 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: windows-1252 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: latin1 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1253: cp1253 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: us-ascii (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: iso8859-1 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: l1 (XMLHttpRequest)]
expected: TIMEOUT
[single-byte-decoder.html?TextDecoder]

View file

@ -0,0 +1,4 @@
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -5,7 +5,7 @@
expected: TIMEOUT
[picture: source (max-width:500px) valid image, img valid image, resize to wide]
expected: TIMEOUT
expected: FAIL
[picture: source (max-width:500px) valid image, img broken image, resize to narrow]
expected: TIMEOUT
@ -22,3 +22,12 @@
[picture: same URL in source (max-width:500px) and img, resize to narrow]
expected: FAIL
[img (srcset 1 cand) valid image, resize to wide]
expected: FAIL
[picture: same URL in source (max-width:500px) and img, resize to wide]
expected: FAIL
[picture: source (max-width:500px) valid image, img broken image, resize to wide]
expected: FAIL

View file

@ -0,0 +1,10 @@
[non-active-document.html]
[DOMParser]
expected: FAIL
[createHTMLDocument]
expected: FAIL
[<template>]
expected: FAIL

View file

@ -0,0 +1,2 @@
[script-onerror-insertion-point-2.html]
expected: TIMEOUT

View file

@ -0,0 +1,4 @@
[aborted-parser.window.html]
[document.open() after parser is aborted]
expected: FAIL

View file

@ -9,3 +9,6 @@
[document.open should throw an InvalidStateError with XML document even when the ignore-opens-during-unload counter is greater than 0 (during pagehide event)]
expected: FAIL
[document.open should throw an InvalidStateError with XML document even when there is an active parser executing script]
expected: FAIL

View file

@ -12,6 +12,3 @@
[Verifies the resolution of entry.startTime is at least 5 microseconds.]
expected: TIMEOUT
[Verifies the resolution of performance.now() is at least 5 microseconds.]
expected: FAIL

View file

@ -1,5 +1,5 @@
[buffer-full-add-after-full-event.html]
expected: ERROR
[Test that entry was added to the buffer after a buffer full event]
expected: FAIL
expected: TIMEOUT

View file

@ -1,5 +1,5 @@
[buffer-full-set-to-current-buffer.html]
expected: ERROR
[Test that entries added and event firing happened in the right sequence]
expected: TIMEOUT
expected: FAIL

View file

@ -11,3 +11,6 @@
[http://web-platform.test:8000/resource-timing/resources/inject_resource_test.html is expected to have initiatorType iframe]
expected: FAIL
[Testing resource entries]
expected: FAIL

View file

@ -5,3 +5,6 @@
[http://web-platform.test:8000/resource-timing/resources/green_frame.htm is not expected to be in the Resource Timing buffer]
expected: FAIL
[Testing resource entries]
expected: FAIL

View file

@ -18,3 +18,6 @@
[http://web-platform.test:8000/resource-timing/resources/inject_resource_test.html is not expected to be in the Resource Timing buffer]
expected: FAIL
[Testing resource entries]
expected: FAIL

View file

@ -17,3 +17,6 @@
[http://web-platform.test:8000/resource-timing/resources/inject_resource_test.html is not expected to be in the Resource Timing buffer]
expected: FAIL
[Testing resource entries]
expected: FAIL

View file

@ -5,3 +5,6 @@
[http://web-platform.test:8000/resource-timing/resources/inject_resource_test.html is not expected to be in the Resource Timing buffer]
expected: FAIL
[Testing resource entries]
expected: FAIL

View file

@ -29,3 +29,6 @@
[http://web-platform.test:8000/resource-timing/resources/inject_resource_test.html is not expected to be in the Resource Timing buffer]
expected: FAIL
[Testing resource entries]
expected: FAIL

View file

@ -0,0 +1,2 @@
[transition_calc_implicit.html]
expected: TIMEOUT

View file

@ -261,6 +261,12 @@ function requestDeviceWithTrustedClick() {
() => navigator.bluetooth.requestDevice.apply(navigator.bluetooth, args));
}
// Calls requestLEScan() in a context that's 'allowed to show a popup'.
function requestLEScanWithTrustedClick() {
return callWithTrustedClick(
() => navigator.bluetooth.requestLEScan.apply(navigator.bluetooth));
}
// errorUUID(alias) returns a UUID with the top 32 bits of
// '00000000-97e5-4cd7-b9f1-f5a427670c59' replaced with the bits of |alias|.
// For example, errorUUID(0xDEADBEEF) returns

View file

@ -0,0 +1,42 @@
'use strict';
const company_id = '224';
const data = new TextEncoder().encode('foo');
const manufacturerDataMap = {[company_id]: data};
const health_uuid = health_thermometer.uuid;
const serviceDataMap = {[health_uuid]: data};
const scanRecord = {
name: 'Health Thermometer',
uuids: ['generic_access', health_uuid],
txPower: 20,
appearance: 100,
manufacturerData: manufacturerDataMap,
serviceData: serviceDataMap,
};
const scanResult = {
deviceAddress: '09:09:09:09:09:09',
rssi: 100,
scanRecord: scanRecord,
};
function verifyBluetoothAdvertisingEvent(e) {
assert_equals(e.constructor.name, 'BluetoothAdvertisingEvent')
assert_equals(e.device.name, scanRecord.name)
assert_equals(e.name, scanRecord.name)
assert_array_equals(e.uuids,
["00001800-0000-1000-8000-00805f9b34fb",
"00001809-0000-1000-8000-00805f9b34fb"])
assert_equals(e.txPower, 20)
assert_equals(e.rssi, 100)
assert_equals(e.manufacturerData.constructor.name,
'BluetoothManufacturerDataMap')
assert_equals(data[0], e.manufacturerData.get(224).getUint8(0))
assert_equals(data[1], e.manufacturerData.get(224).getUint8(1))
assert_equals(data[2], e.manufacturerData.get(224).getUint8(2))
assert_equals(e.serviceData.constructor.name, 'BluetoothServiceDataMap')
assert_equals(data[0], e.serviceData.get(health_uuid).getUint8(0))
assert_equals(data[1], e.serviceData.get(health_uuid).getUint8(1))
assert_equals(data[2], e.serviceData.get(health_uuid).getUint8(2))
}

View file

@ -0,0 +1,8 @@
<!doctype HTML>
<title>CSS Test Reference</title>
<link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org" />
<div style="width: 100px; height: 100px; background: lightblue; will-change: transform; position: absolute">
<div id=target style="backface-visibility: hidden">
<div style="width: 50px; height: 50px; background: lightgray; top: 75px; position: relative">
</div>
</div>

View file

@ -0,0 +1,21 @@
<!doctype HTML>
<html class="reftest-wait">
<title>CSS Test: Test for re-paint after stacking context removal due to opacity</title>
<link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org" />
<link rel="help" href="https://www.w3.org/TR/CSS2/zindex.html">
<link rel="match" href="opacity-change-parent-stacking-context-ref.html">
<script src="/common/reftest-wait.js"></script>
<div style="width: 100px; height: 100px; background: lightblue; will-change: transform; position: absolute">
<div id=target style="opacity: 0; backface-visibility: hidden">
<div style="width: 50px; height: 50px; background: lightgray; top: 75px; position: relative">
</div>
</div>
<script>
onload = function() {
requestAnimationFrame(() => requestAnimationFrame(() => {
target.style.opacity = 1;
takeScreenshot();
}));
}
</script>
</html

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Lists: list with height</title>
<p>The test passes if "second" is in the following line of "first".</p>
<ul>
<li id="li_target" style="height:200px; border:1px solid black; width:200px">
first<div id="div_target" style="overflow:hidden;">second</div>
</li>
</ul>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Lists: list with height</title>
<link rel=help href="https://www.w3.org/TR/CSS22/generate.html#lists">
<link rel=match href="li-with-height-001-ref.html">
<meta name="assert" content="This is to check the behavior of adding an element at the begining of li" />
<p>The test passes if "second" is in the following line of "first".</p>
<ul>
<li id="li_target" style="height:200px; border:1px solid black; width:200px">
<div id="div_target" style="overflow:hidden;">second</div>
</li>
</ul>
<script>
document.body.clientHeight;
var text_node = document.createTextNode("first");
var li_target = document.getElementById("li_target");
var div_target = document.getElementById("div_target");
li_target.insertBefore(text_node,div_target);
</script>

View file

@ -135,6 +135,56 @@ test_interpolation(
[{ at: 0.25, expect: 'matrix(2, 0, 0, 2, 100, 0)' }],
'Complete mismatch including length'
);
test_interpolation(
{
property: 'transform',
from: 'rotate(0deg) scaleX(1)',
to: 'rotate(720deg) translateX(0px) scaleX(2)'
},
[{at: 0.25, expect: 'rotate(180deg) matrix(1.25, 0, 0, 1, 0, 0)'}],
'Mismatched lengths (from is shorter), partial match'
);
test_interpolation(
{
property: 'transform',
from: 'rotate(720deg) translateX(0px) scaleX(2)',
to: 'rotate(0deg) scaleX(1)'
},
[{at: 0.25, expect: 'rotate(540deg) matrix(1.75, 0, 0, 1, 0, 0)'}],
'Mismatched lengths (to is shorter), partial match'
);
test_interpolation(
{
property: 'transform',
from: 'scaleX(-3) scaleY(2)',
to: 'scaleY(-3) translateX(0px) scaleX(2)'
},
[{at: 0.25, expect: 'scale(-2, 0) matrix(1.25, 0, 0, 1.75, 0, 0)'}],
'Mismatched lengths (from is shorter), partial match on primitive'
);
test_interpolation(
{
property: 'transform',
from: 'scaleY(-3) translateX(0px) scaleX(2)',
to: 'scaleX(-3) scaleY(2)'
},
[{at: 0.25, expect: 'scale(0, -2) matrix(1.75, 0, 0, 1.25, 0, 0)'}],
'Mismatched lengths (to is shorter), partial match on primitive'
);
test_interpolation(
{
property: 'transform',
from: 'scaleY(-3) translateX(0px)',
to: 'scaleX(-3) scaleY(2)'
},
[{at: 0.25, expect: 'scale(0, -2) matrix(1, 0, 0, 1.25, 0, 0)'}],
'Common prefix on primitive'
);
</script>
</body>
</html>

View file

@ -0,0 +1,9 @@
<!doctype HTML>
<title>CSS Test</title>
<link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org" />
Passes if it shows a green 200x200 square.
<div style="will-change: transform; width: 300px; height: 0px">
<div style="width: 1px; height: 1px; backface-visibility: hidden;">
<div id=target style="width: 200px; height: 200px; position: relative; background: green; left: 10px;"></div>
</div>
</div>

View file

@ -0,0 +1,22 @@
<!doctype HTML>
<html class="reftest-wait">
<title>CSS Test: Test for re-paint after resizing an element underneath a backface-visibility hidden element</title>
<link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org" />
<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#propdef-backface-visibility">
<link rel="match" href="size-change-under-backface-visibility-hidden-ref.html">
<script src="/common/reftest-wait.js"></script>
Passes if it shows a green 200x200 square.
<div style="will-change: transform; width: 300px; height: 0px">
<div style="width: 1px; height: 1px; backface-visibility: hidden;">
<div id=target style="width: 200px; height: 0px; position: relative; background: green; left: 10px;"></div>
</div>
</div>
<script>
onload = function() {
requestAnimationFrame(() => requestAnimationFrame(() => {
target.style.height = '200px';
takeScreenshot();
}));
};
</script>
</html>

View file

@ -0,0 +1 @@
Access-Control-Allow-Origin: *

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>DataTransferItem Test: getAsString()</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<p><input type="text" value="dragcharacters" style="border:2px blue solid; width:200px; height: 100px;"/></p>
<p><input id="container" type="text" style="border:2px green solid; width:200px; height: 100px;"/></p>
<p>Select all characters in blue box and drag to green box then drop on the green box</p>
<script>
setup({explicit_done : true, explicit_timeout : true});
let container = document.getElementById("container");
on_event(container, "drop", evt => {
let item = evt.dataTransfer.items[0];
test(() => {
let file1 = item.getAsFile();
assert_equals(file1, null);
}, "Check if DataTransferItem.getAsFile return null if drag data item kind is not File");
let data;
item.getAsString(str => {
data = str;
});
setTimeout(() => {
test(() => {
assert_equals(data, "dragcharacters");
}, "Check if DataTransferItem.getAsString return the dragged string");
done();
}, 0);
});
</script>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div id="dummy"></div>
</body>
</html>

View file

@ -0,0 +1,58 @@
<!doctype html>
<meta charset=utf-8>
<title>Check import() works when active script is in another document</title>
<link rel="author" title="Jon Coppeard" href="mailto:jcoppeard@mozilla.com">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<iframe id="frame" src="resources/empty-iframe.html"></iframe>
<script>
function startTest() {
const otherWindow = document.getElementById("frame").contentWindow;
const otherDiv = otherWindow.document.getElementById("dummy");
function createTestPromise() {
return new Promise((resolve, reject) => {
otherWindow.continueTest = resolve;
otherWindow.errorTest = reject;
});
}
const evaluators = {
eval: otherWindow.eval,
setTimeout: otherWindow.setTimeout,
"the Function constructor"(x) {
otherWindow.Function(x)();
},
"reflected inline event handlers"(x) {
otherDiv.setAttribute("onclick", x);
otherDiv.onclick();
},
"inline event handlers triggered by JS"(x) {
otherDiv.setAttribute("onclick", x);
otherDiv.click(); // different from .**on**click()
}
};
for (const [label, evaluator] of Object.entries(evaluators)) {
promise_test(t => {
t.add_cleanup(() => {
otherDiv.removeAttribute("onclick");
delete otherWindow.evaluated_imports_a;
});
const promise = createTestPromise();
evaluator(`import('../imports-a.js?label=${label}').then(window.continueTest, window.errorTest);`);
return promise.then(module => {
assert_true(otherWindow.evaluated_imports_a, "The module must have been evaluated");
assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct");
});
}, label + " should successfully import");
};
}
</script>
<body onLoad="startTest()"></body>

View file

@ -3,3 +3,4 @@ suggested_reviewers:
- anssiko
- Honry
- robman
- astojilj

View file

@ -0,0 +1,141 @@
"use strict";
// Helper assertion functions to validate dictionary fields
// on dictionary objects returned from APIs
function assert_string(object) {
assert_equals(typeof object, "string",
`Expect ${object} to be string`);
}
function assert_string_field(object, field) {
const str = object[field];
assert_equals(typeof str, "string",
`Expect dictionary.${field} to be string`);
}
function assert_number_field(object, field) {
const num = object[field];
assert_equals(typeof num, "number",
`Expect dictionary.${field} to be number`);
}
function assert_boolean_field(object, field, value = "") {
const bool = object[field];
assert_equals(typeof bool, "boolean",
`Expect dictionary.${field} to be boolean`);
if (object[field] !== "") {
assert_equals(object[field], value,
`Expect default value of dictionary.${field} to be ${value}`);
}
}
function assert_array_field(object, field) {
assert_true(Array.isArray(object[field]),
`Expect dictionary.${field} to be array`);
}
function assert_enum_field(object, field, validValues) {
assert_string_field(object, field);
assert_true(validValues.includes(object[field]),
`Expect dictionary.${field} to have one of the valid enum values: ${validValues}`);
}
function assert_number_range_field(object, field, key) {
const num = object[field][key];
assert_equals(typeof num, "number",
`Expect dictionary.${field}.${key} to be number`);
}
function assert_boolean_range_field(object, field, key) {
const bool = object[field][key];
assert_equals(typeof bool, "boolean",
`Expect dictionary.${field}.${key} to be boolean`);
}
function assert_number_or_number_range_field(object, field) {
if (typeof object[field] !== "object") {
assert_number_field(object, field);
} else {
if (object[field]["max"] !== undefined)
assert_number_range_field(object, field, "max");
if (object[field]["min"] !== undefined)
assert_number_range_field(object, field, "min");
if (object[field]["max"] === undefined &&
object[field]["min"] === undefined)
assert_unreached();
}
}
function assert_constrain_string_field(object, field) {
// test DOMString type
if (typeof object[field] !== "object") {
assert_string_field(object, field);
// test ConstrainDOMStringParameters type
} else if (typeof object[field]["exact"] !== undefined || typeof object[field]["ideal"] !== undefined) {
if (object[field]["exact"] !== undefined) {
// test DOMString type key value of ConstrainDOMStringParameters dictionary
if (typeof object[field] !== "object") {
assert_string_field(object[field], "exact");
// test sequence<DOMString> type key value of ConstrainDOMStringParameters dictionary
} else {
assert_array_field(object[field], "exact");
for(const item of object[field]["exact"]) {
assert_string(item);
}
}
}
if (object[field]["ideal"] !== undefined) {
// test DOMString type key value of ConstrainDOMStringParameters dictionary
if (typeof object[field] !== "object") {
assert_string_field(object[field], "ideal");
// test sequence<DOMString> type key value of ConstrainDOMStringParameters dictionary
} else {
assert_array_field(object[field], "ideal");
for(const item of object[field]["ideal"]) {
assert_string(item);
}
}
}
// test sequence<DOMString> type
} else {
assert_array_field(object, field);
for(const item of object[field]) {
assert_string(item);
}
}
}
function assert_constrain_number_field(object, field) {
if (typeof object[field] !== "object") {
assert_number_field(object, field);
} else {
if (object[field]["max"] !== undefined)
assert_number_range_field(object, field, "max");
if (object[field]["min"] !== undefined)
assert_number_range_field(object, field, "min");
if (object[field]["exact"] !== undefined)
assert_number_range_field(object, field, "exact");
if (object[field]["ideal"] !== undefined)
assert_number_range_field(object, field, "ideal");
if (object[field]["max"] === undefined &&
object[field]["min"] === undefined &&
object[field]["exact"] === undefined &&
object[field]["ideal"] === undefined)
assert_unreached();
}
}
function assert_constrain_boolean_field(object, field) {
if (typeof object[field] !== "object") {
assert_boolean_field(object, field);
} else {
if (object[field]["exact"] !== undefined)
assert_boolean_range_field(object, field, "exact");
if (object[field]["ideal"] !== undefined)
assert_boolean_range_field(object, field, "ideal");
if (object[field]["exact"] === undefined &&
object[field]["ideal"] === undefined)
assert_unreached();
}
}

View file

@ -0,0 +1,277 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Media Capture Depth Dictionary Test</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://w3c.github.io/mediacapture-depth/#extensions">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="dictionary-helper.js"></script>
<meta name="flags" content="interact">
<h2>Preconditions</h2>
<ol>
<li>
Use a test device with depth camera(embedded or external).
</li>
<li>
When prompted, accept to share your depth/color(RGB) stream.
</li>
</ol>
<div id="log"></div>
<script>
let advanced_constraints_depth = [{
videoKind: "depth",
focalLengthX: 0.5,
focalLengthY: 0.5,
principalPointX: 0.1,
principalPointY: 0.1,
deprojectionDistortionCoefficients: true,
projectionDistortionCoefficients: true,
depthNear: 0.5,
depthFar: 1,
depthToVideoTransform: true
}];
let advanced_constraints_color = [{
videoKind: "color",
focalLengthX: 0.5,
focalLengthY: 0.5,
principalPointX: 0.1,
principalPointY: 0.1,
deprojectionDistortionCoefficients: true,
projectionDistortionCoefficients: true
}];
/*
partial dictionary MediaTrackCapabilities {
// Apply to both depth stream track and color stream track:
DOMString videoKind;
(double or DoubleRange) focalLengthX;
(double or DoubleRange) focalLengthY;
(double or DoubleRange) principalPointX;
(double or DoubleRange) principalPointY;
boolean deprojectionDistortionCoefficients;
boolean projectionDistortionCoefficients;
// Apply to depth stream track:
(double or DoubleRange) depthNear;
(double or DoubleRange) depthFar;
boolean depthToVideoTransform;
};
dictionary DoubleRange {
double max;
double min;
};
*/
function validateMediaTrackCapabilities(capabilities, type) {
assert_string_field(capabilities, 'videoKind');
assert_number_or_number_range_field(capabilities, 'focalLengthX');
assert_number_or_number_range_field(capabilities, 'focalLengthY');
assert_number_or_number_range_field(capabilities, 'principalPointX');
assert_number_or_number_range_field(capabilities, 'principalPointY');
assert_boolean_field(capabilities, 'deprojectionDistortionCoefficients');
assert_boolean_field(capabilities, 'projectionDistortionCoefficients');
if (type == "depth") {
assert_number_or_number_range_field(capabilities, 'depthNear');
assert_number_or_number_range_field(capabilities, 'depthFar');
assert_boolean_field(capabilities, 'depthToVideoTransform');
}
}
/*
partial dictionary MediaTrackConstraintSet {
// Apply to both depth stream track and color stream track:
ConstrainDOMString videoKind;
ConstrainDouble focalLengthX;
ConstrainDouble focalLengthY;
ConstrainDouble principalPointX;
ConstrainDouble principalPointY;
ConstrainBoolean deprojectionDistortionCoefficients;
ConstrainBoolean projectionDistortionCoefficients;
// Apply to depth stream track:
ConstrainDouble depthNear;
ConstrainDouble depthFar;
ConstrainBoolean depthToVideoTransform;
};
typedef (DOMString or sequence<DOMString> or ConstrainDOMStringParameters) ConstrainDOMString;
dictionary ConstrainDOMStringParameters {
(DOMString or sequence<DOMString>) exact;
(DOMString or sequence<DOMString>) ideal;
};
typedef (double or ConstrainDoubleRange) ConstrainDouble;
dictionary DoubleRange {
double max;
double min;
};
dictionary ConstrainDoubleRange : DoubleRange {
double exact;
double ideal;
};
typedef (boolean or ConstrainBooleanParameters) ConstrainBoolean;
dictionary ConstrainBooleanParameters {
boolean exact;
boolean ideal;
};
*/
function validateMediaTrackConstraintSet(constraints, type) {
assert_constrain_string_field(constraints, 'videoKind');
assert_constrain_number_field(constraints, 'focalLengthX');
assert_constrain_number_field(constraints, 'focalLengthY');
assert_constrain_number_field(constraints, 'principalPointX');
assert_constrain_number_field(constraints, 'principalPointY');
assert_constrain_boolean_field(constraints, 'deprojectionDistortionCoefficients');
assert_constrain_boolean_field(constraints, 'projectionDistortionCoefficients');
if (type == "depth") {
assert_constrain_number_field(constraints, 'depthNear');
assert_constrain_number_field(constraints, 'depthFar');
assert_constrain_boolean_field(constraints, 'depthToVideoTransform');
}
}
/*
partial dictionary MediaTrackSettings {
// Apply to both depth stream track and color stream track:
DOMString videoKind;
double focalLengthX;
double focalLengthY;
double principalPointX;
double principalPointY;
DistortionCoefficients deprojectionDistortionCoefficients;
DistortionCoefficients projectionDistortionCoefficients;
// Apply to depth stream track:
double depthNear;
double depthFar;
Transformation depthToVideoTransform;
};
dictionary DistortionCoefficients {
double k1;
double k2;
double p1;
double p2;
double k3;
};
dictionary Transformation {
Float32Array transformationMatrix;
DOMString videoDeviceId;
};
enum VideoKindEnum {
"color",
"depth"
};
*/
function validateDistortionCoefficients(coefficients) {
assert_number_field(coefficients, 'k1');
assert_number_field(coefficients, 'k2');
assert_number_field(coefficients, 'p1');
assert_number_field(coefficients, 'p2');
assert_number_field(coefficients, 'k3');
}
function validateTransformation(depthToVideoTransform) {
assert_array_field(depthToVideoTransform, 'transformationMatrix');
assert_string_field(depthToVideoTransform, 'videoDeviceId');
}
function validateMediaTrackSettings(settings, type) {
assert_string_field(settings, 'videoKind');
assert_enum_field(settings, 'videoKind', ['color', 'depth'])
assert_number_field(settings, 'focalLengthX');
assert_number_field(settings, 'focalLengthY');
assert_number_field(settings, 'principalPointX');
assert_number_field(settings, 'principalPointY');
if (settings.deprojectionDistortionCoefficients) {
validateDistortionCoefficients(settings.deprojectionDistortionCoefficients);
}
if (settings.projectionDistortionCoefficients) {
validateDistortionCoefficients(settings.projectionDistortionCoefficients);
}
if (type == "depth") {
assert_number_field(settings, 'depthNear');
assert_number_field(settings, 'depthFar');
if (settings.depthToVideoTransform) {
validateTransformation(settings.depthToVideoTransform);
}
}
}
/*
partial dictionary MediaTrackSupportedConstraints {
// Apply to both depth stream track and color stream track:
boolean videoKind = true;
boolean focalLengthX = false;
boolean focalLengthY = false;
boolean principalPointX = false;
boolean principalPointY = false;
boolean deprojectionDistortionCoefficients = false;
boolean projectionDistortionCoefficients = false;
// Apply to depth stream track:
boolean depthNear = false;
boolean depthFar = false;
boolean depthToVideoTransform = false;
};
*/
function validateMediaTrackSupportedConstraints(supports) {
assert_boolean_field(supports, 'videoKind', true);
assert_boolean_field(supports, 'focalLengthX', false);
assert_boolean_field(supports, 'focalLengthY', false);
assert_boolean_field(supports, 'principalPointX', false);
assert_boolean_field(supports, 'principalPointY', false);
assert_boolean_field(supports, 'deprojectionDistortionCoefficients', false);
assert_boolean_field(supports, 'projectionDistortionCoefficients', false);
assert_boolean_field(supports, 'depthNear', false);
assert_boolean_field(supports, 'depthFar', false);
assert_boolean_field(supports, 'depthToVideoTransform', false);
}
function runDictionaryTests(type, constraints) {
promise_test(t => {
return navigator.mediaDevices.getUserMedia({video: {advanced: constraints}})
.then(stream => {
let capabilities = stream.getTracks()[0].getCapabilities();
validateMediaTrackCapabilities(capabilities, type);
});
}, `MediaTrackCapabilities dictionary of ${type} include attributes are correct`);
promise_test(t => {
return navigator.mediaDevices.getUserMedia({video: {advanced: constraints}})
.then(stream => {
let constraints = stream.getTracks()[0].getConstraints()["advanced"][0];
validateMediaTrackConstraintSet(constraints);
});
}, `MediaTrackConstraintSet dictionary of ${type} include attributes are correct`);
promise_test(t => {
return navigator.mediaDevices.getUserMedia({video: {advanced: constraints}})
.then(stream => {
let settings = stream.getTracks()[0].getSettings();
validateMediaTrackSettings(settings, type);
});
}, `MediaTrackSettings dictionary of ${type} include attributes are correct`);
}
test(() => {
let supports = navigator.mediaDevices.getSupportedConstraints();
validateMediaTrackSupportedConstraints(supports);
}, "MediaTrackSupportedConstraints dictionary include attributes are correct");
runDictionaryTests("depth", advanced_constraints_depth);
runDictionaryTests("color", advanced_constraints_color);
</script>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
test(t => {
assert_equals(window.portalHost, null, "window.portalHost should be null");
});
</script>
</body>

View file

@ -72,6 +72,9 @@ promise_test(async () => {
await loadRandomResource();
await waitForEventToFire();
await clearAndAddAnotherEntryToBuffer();
// Since we have no strict guarantees when an entry will be added to the
// buffer, waiting till next task to try to avoid flakiness.
await waitForNextTask();
await testThatEntryWasAdded();
}, "Test that entry was added to the buffer after a buffer full event");
</script>

View file

@ -0,0 +1,25 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Make sure that resources fetched by cross origin CSS are not in the timeline.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<!-- The stylesheet is fetched from http://www1.webplatform.test:64941/resource-timing/resources/nested.css -->
<link rel=stylesheet id=cross_origin_style href="//{{domains[www1]}}:{{ports[http][1]}}{{location[path]}}/../resources/nested.css">
<script>
const t = async_test("Make sure that resources fetched by cross origin CSS are not in the timeline.");
window.addEventListener("load", function() {
// A timeout is needed as entries are not guaranteed to be in the timeline before onload triggers.
t.step_timeout(function() {
const url = (new URL(document.getElementById("cross_origin_style").href));
const prefix = url.protocol + "//" + url.host;
assert_equals(performance.getEntriesByName(prefix + "/resource-timing/resources/resource_timing_test0.css?id=n1").length, 0, "Import should not be in timeline");
assert_equals(performance.getEntriesByName(prefix + "/fonts/Ahem.ttf?id=n1").length, 0, "Font should not be in timeline");
assert_equals(performance.getEntriesByName(prefix + "/resource-timing/resources/blue.png?id=n1").length, 0, "Image should not be in timeline");
t.done();
},100);
});
</script>
<ol>Some content</ol>
</body>

View file

@ -49,45 +49,48 @@ function test_fail(msg, properties)
function test_resource_entries(entries, expected_entries)
{
// This is slightly convoluted so that we can sort the output.
var actual_entries = {};
var origin = window.location.protocol + "//" + window.location.host;
test(function() {
// This is slightly convoluted so that we can sort the output.
var actual_entries = {};
var origin = window.location.protocol + "//" + window.location.host;
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
var found = false;
for (var expected_entry in expected_entries) {
if (entry.name == origin + expected_entry) {
found = true;
if (expected_entry in actual_entries) {
test_fail(expected_entry + ' is not expected to have duplicate entries');
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
var found = false;
for (var expected_entry in expected_entries) {
if (entry.name == origin + expected_entry) {
found = true;
if (expected_entry in actual_entries) {
assert_unreached(expected_entry + ' is not expected to have duplicate entries');
}
actual_entries[expected_entry] = entry;
break;
}
actual_entries[expected_entry] = entry;
break;
}
if (!found) {
assert_unreached(entries[i].name + ' is not expected to be in the Resource Timing buffer');
}
}
if (!found) {
test_fail(entries[i].name + ' is not expected to be in the Resource Timing buffer');
}
}
sorted_urls = [];
for (var i in actual_entries) {
sorted_urls.push(i);
}
sorted_urls.sort();
for (var i in sorted_urls) {
var url = sorted_urls[i];
test_equals(actual_entries[url].initiatorType,
expected_entries[url],
origin + url + ' is expected to have initiatorType ' + expected_entries[url]);
}
for (var j in expected_entries) {
if (!(j in actual_entries)) {
test_fail(origin + j + ' is expected to be in the Resource Timing buffer');
sorted_urls = [];
for (var i in actual_entries) {
sorted_urls.push(i);
}
}
sorted_urls.sort();
for (var i in sorted_urls) {
var url = sorted_urls[i];
assert_equals(actual_entries[url].initiatorType,
expected_entries[url],
origin + url + ' is expected to have initiatorType ' + expected_entries[url]);
}
for (var j in expected_entries) {
if (!(j in actual_entries)) {
assert_unreached(origin + j + ' is expected to be in the Resource Timing buffer');
}
}
}, "Testing resource entries");
}
function performance_entrylist_checker(type)
{
var entryType = type;

View file

@ -34,8 +34,8 @@
let testFunction = function(session, testDeviceController) {
testSession = session;
return session.requestFrameOfReference('eye-level')
.then((frameOfRef) => new Promise((resolve) => {
return session.requestReferenceSpace({ type: 'stationary', subtype: 'eye-level' })
.then((referenceSpace) => new Promise((resolve) => {
function onFrame(time, xrFrame) {
assert_true(xrFrame instanceof XRFrame);
@ -43,7 +43,7 @@
assert_not_equals(xrFrame.views, null);
assert_equals(xrFrame.views.length, 2);
let viewerPose = xrFrame.getViewerPose(frameOfRef);
let viewerPose = xrFrame.getViewerPose(referenceSpace);
assert_not_equals(viewerPose, null);
for(let i = 0; i < identityMatrix.length; i++) {

View file

@ -23,15 +23,15 @@
const validViewMatrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 4, 3, 2, 1];
let testFunction = function(session, fakeDeviceController, t) {
return session.requestFrameOfReference("eye-level")
.then((frameOfRef) => new Promise((resolve, reject) => {
return session.requestReferenceSpace({ type: 'stationary', subtype: 'eye-level' })
.then((referenceSpace) => new Promise((resolve, reject) => {
let counter = 0;
function onFrame(time, vrFrame) {
session.requestAnimationFrame(onFrame);
if (counter == 0) {
t.step( () => {
// Expecting to not get a pose since none has been supplied
assert_equals(vrFrame.getViewerPose(frameOfRef), null);
assert_equals(vrFrame.getViewerPose(referenceSpace), null);
fakeDeviceController.setXRPresentationFrameData(
validPoseMatrix, [{
@ -45,11 +45,11 @@
}]);
// Check that pose does not update pose within the same frame.
assert_equals(vrFrame.getViewerPose(frameOfRef), null);
assert_equals(vrFrame.getViewerPose(referenceSpace), null);
});
} else {
t.step( () => {
let pose = vrFrame.getViewerPose(frameOfRef);
let pose = vrFrame.getViewerPose(referenceSpace);
assert_not_equals(pose, null);
let poseMatrix = pose.poseModelMatrix;

View file

@ -1,49 +0,0 @@
<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="resources/webxr_util.js"></script>
<canvas></canvas>
<script>
let immersiveTestName =
"Immersive XRSession requestFrameOfReference returns expected objects";
let nonImmersiveTestName =
"Non-immersive XRSession requestFrameOfReference returns expected objects";
let fakeDeviceInitParams = { supportsImmersive: true };
let immersiveSessionOptions = { immersive: true };
let nonImmersiveSessionOptions = { outputContext: getOutputContext() };
let testFunction = function(session, fakeDeviceController, t) {
return promise_rejects(t, new TypeError(), session.requestFrameOfReference("foo"))
.then(() => Promise.all([
session.requestFrameOfReference("head-model").then( (frameOfRef) => {
assert_true(frameOfRef instanceof XRCoordinateSystem,
"head-model frameOfRef is not correct type.");
assert_true(frameOfRef instanceof XRFrameOfReference,
"head-model frameOfRef is not correct type.");
}),
session.requestFrameOfReference("eye-level").then( (frameOfRef) => {
assert_true(frameOfRef instanceof XRCoordinateSystem,
"eye-level frameOfRef is not correct type.");
assert_true(frameOfRef instanceof XRFrameOfReference,
"eye-level frameOfRef is not correct type.");
}),
session.requestFrameOfReference("stage").then( (frameOfRef) => {
assert_true(frameOfRef instanceof XRCoordinateSystem,
"stage frameOfRef is not correct type.");
assert_true(frameOfRef instanceof XRFrameOfReference,
"stage frameOfRef is not correct type.");
})
]));
};
xr_session_promise_test(
immersiveTestName, testFunction, fakeDeviceInitParams, immersiveSessionOptions);
xr_session_promise_test(
nonImmersiveTestName, testFunction, fakeDeviceInitParams, nonImmersiveSessionOptions);
</script>
</body>

View file

@ -0,0 +1,75 @@
<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="resources/webxr_util.js"></script>
<canvas></canvas>
<script>
let immersiveTestName =
"Immersive XRSession requestReferenceSpace returns expected objects";
let nonImmersiveTestName =
"Non-immersive XRSession requestReferenceSpace returns expected objects";
let fakeDeviceInitParams = { supportsImmersive: true };
let immersiveSessionOptions = { immersive: true };
let nonImmersiveSessionOptions = { outputContext: getOutputContext() };
let testFunction = function(session, fakeDeviceController, t) {
return promise_rejects(t, new TypeError(), session.requestReferenceSpace({ type: "foo" }))
.then(() => promise_rejects(t, "NotSupportedError", session.requestReferenceSpace({ type: "stationary" })))
.then(() => promise_rejects(t, new TypeError(), session.requestReferenceSpace({ type: "stationary", subtype: "bar" })))
.then(() => Promise.all([
session.requestReferenceSpace({ type: "stationary", subtype: "position-disabled" }).then( (referenceSpace) => {
t.step(() => {
assert_true(referenceSpace instanceof XRSpace,
"position-disabled stationary reference space is not correct type.");
assert_true(referenceSpace instanceof XRReferenceSpace,
"position-disabled stationary reference space is not correct type.");
assert_true(referenceSpace instanceof XRStationaryReferenceSpace,
"position-disabled stationary reference space is not correct type.");
});
}),
session.requestReferenceSpace({ type: "stationary", subtype: "eye-level" }).then( (referenceSpace) => {
t.step(() => {
assert_true(referenceSpace instanceof XRSpace,
"eye-level stationary reference space is not correct type.");
assert_true(referenceSpace instanceof XRReferenceSpace,
"eye-level stationary reference space is not correct type.");
assert_true(referenceSpace instanceof XRStationaryReferenceSpace,
"eye-level stationary reference space is not correct type.");
});
}),
session.requestReferenceSpace({ type: "stationary", subtype: "floor-level" }).then( (referenceSpace) => {
t.step(() => {
assert_true(referenceSpace instanceof XRSpace,
"floor-level stationary reference space is not correct type.");
assert_true(referenceSpace instanceof XRReferenceSpace,
"floor-level stationary reference space is not correct type.");
assert_true(referenceSpace instanceof XRStationaryReferenceSpace,
"floor-level stationary reference space is not correct type.");
});
})
]))
.then(() => {
if (!session.immersive) {
// Bounded reference spaces are not allowed in inline sessions.
return promise_rejects(t, "NotSupportedError", session.requestReferenceSpace({ type: "bounded" }))
}
})
.then(() => {
if (!session.immersive) {
// Unbounded reference spaces are not allowed in inline sessions.
return promise_rejects(t, "NotSupportedError", session.requestReferenceSpace({ type: "unbounded" }))
}
})
};
xr_session_promise_test(
immersiveTestName, testFunction, fakeDeviceInitParams, immersiveSessionOptions);
xr_session_promise_test(
nonImmersiveTestName, testFunction, fakeDeviceInitParams, nonImmersiveSessionOptions);
</script>
</body>