Update web-platform-tests to revision c2e5b9fbaa17424f05ca2bb04609790a3b61d5c2

This commit is contained in:
WPT Sync Bot 2019-03-17 21:51:47 -04:00 committed by Josh Matthews
parent db7bb2a510
commit f2c1b70e4a
138 changed files with 2799 additions and 851 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,3 +0,0 @@
[c5510-padn-000.xht]
type: reftest
expected: FAIL

View file

@ -1,2 +0,0 @@
[white-space-003.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[white-space-pre-element-001.xht]
expected: FAIL

View file

@ -1,4 +1,3 @@
[white-space-processing-040.xht]
expected:
if os == "linux": FAIL
if not debug and (os == "mac") and (version == "OS X 10.11.6") and (processor == "x86_64") and (bits == 64): FAIL

View file

@ -44,15 +44,9 @@
[Matching font-weight: '501' should prefer '503 520' over '500']
expected: FAIL
[Matching font-weight: '501' should prefer '500' over '450 460']
expected: FAIL
[Matching font-weight: '501' should prefer '450 460' over '390 410']
expected: FAIL
[Matching font-weight: '399' should prefer '340 360' over '200 300']
expected: FAIL
[Matching font-weight: '399' should prefer '200 300' over '400']
expected: FAIL
@ -305,9 +299,6 @@
[Matching font-style: 'oblique 21deg' should prefer 'oblique 40deg 50deg' over 'oblique 20deg']
expected: FAIL
[Matching font-style: 'oblique 0deg' should prefer 'oblique 5deg' over 'oblique 15deg 20deg']
expected: FAIL
[Matching font-style: 'oblique 0deg' should prefer 'oblique 40deg 50deg' over 'italic']
expected: FAIL

View file

@ -1,7 +1,4 @@
[font-weight-matching.html]
[Test @font-face matching for weight 400]
expected: FAIL
[Test @font-face matching for weight 470]
expected: FAIL

View file

@ -74,3 +74,18 @@
[opacity end]
expected: FAIL
[height end]
expected: FAIL
[border-top-width end]
expected: FAIL
[border-left-width end]
expected: FAIL
[border-bottom-width end]
expected: FAIL
[border-right-width end]
expected: FAIL

View file

@ -6,6 +6,3 @@
[Instant scrolling while doing history navigation.]
expected: FAIL
[Smooth scrolling while doing history navigation.]
expected: FAIL

View file

@ -3,6 +3,3 @@
[Navigating from the initial about:blank must not replace window.customElements]
expected: FAIL
[document.open() must replace window.customElements]
expected: FAIL

View file

@ -6,9 +6,3 @@
[HTML parser must use the registry of window.document in a document created by document.implementation.createHTMLDocument()]
expected: FAIL
[document.write() must not instantiate a custom element without a defined insertion point]
expected: FAIL
[document.writeln() must not instantiate a custom element without a defined insertion point]
expected: FAIL

View file

@ -38,6 +38,9 @@
[XMLSerializer interface: new XMLSerializer() must inherit property "serializeToString(Node)" with the proper type]
expected: FAIL
[ShadowRoot interface: attribute innerHTML]
expected: FAIL
[interfaces.any.worker.html]
[interfaces]

View file

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

View file

@ -0,0 +1,4 @@
[navigation-unload-same-origin-fragment.html]
[Tests that a fragment navigation in the unload handler will not block the initial navigation]
expected: FAIL

View file

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

View file

@ -1,6 +0,0 @@
[traverse_the_history_write_after_load_1.html]
type: testharness
expected: TIMEOUT
[Traverse the history after document.write after the load event]
expected: TIMEOUT

View file

@ -3,6 +3,3 @@
[Navigating from the initial about:blank must not replace window.location]
expected: FAIL
[document.open() must replace window.location]
expected: FAIL

View file

@ -1,5 +0,0 @@
[reload_document_open_write.html]
type: testharness
[Reload document with document.open and document.written content]
expected: FAIL

View file

@ -0,0 +1,7 @@
[BarProp.window.html]
[BarProp objects of an auxiliary Window]
expected: FAIL
[BarBrop objects of a nested Window]
expected: FAIL

View file

@ -0,0 +1,2 @@
[table-border-3q.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[table-border-3s.html]
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,7 @@
[toggleEvent.html]
[Calling open twice on 'details' fires only one toggle event]
expected: FAIL
[Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
expected: FAIL

View file

@ -1,4 +0,0 @@
[DOMContentLoaded-defer.html]
[The end: DOMContentLoaded and defer scripts]
expected: FAIL

View file

@ -0,0 +1,4 @@
[load-event-after-location-set-during-write.window.html]
[Setting location from document.write() call should not trigger load event until that load completes]
expected: FAIL

View file

@ -0,0 +1,5 @@
[child-document-raf-order.html]
expected: TIMEOUT
[Ordering of steps in "Update the Rendering" - child document requestAnimationFrame order]
expected: TIMEOUT

View file

@ -0,0 +1,5 @@
[TAO-case-insensitive-null-opaque-origin.sub.html]
expected: TIMEOUT
[Test case-insensitive null TAO value with opaque origins]
expected: NOTRUN

View file

@ -0,0 +1,5 @@
[TAO-null-opaque-origin.sub.html]
expected: TIMEOUT
[Test null TAO value with opaque origins]
expected: NOTRUN

View file

@ -23,6 +23,9 @@
[No imports]
expected: FAIL
[Synchronous options handling]
expected: FAIL
[instantiateStreaming.any.serviceworker.html]
[instantiateStreaming]
@ -59,3 +62,6 @@
[No imports]
expected: FAIL
[Synchronous options handling]
expected: FAIL

View file

@ -1,4 +1,5 @@
[realtimeanalyser-fft-scaling.html]
expected: TIMEOUT
[X 2048-point FFT peak position is not equal to 64. Got 0.]
expected: FAIL

View file

@ -1,5 +1,4 @@
[005.html]
expected: ERROR
[dedicated worker in shared worker in dedicated worker]
expected: FAIL

View file

@ -183,7 +183,7 @@ jobs:
- template: tools/ci/azure/install_certs.yml
- template: tools/ci/azure/update_hosts.yml
- template: tools/ci/azure/update_manifest.yml
- script: python ./wpt run --no-manifest-update --no-fail-on-unexpected --install-fonts --test-types reftest testharness --this-chunk $(System.JobPositionInPhase) --total-chunks $(System.TotalJobsInPhase) --chunk-type hash --log-tbpl - --log-tbpl-level info --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt edge_webdriver
- script: python ./wpt run --no-manifest-update --no-fail-on-unexpected --install-fonts --test-types reftest testharness --this-chunk $(System.JobPositionInPhase) --total-chunks $(System.TotalJobsInPhase) --chunk-type hash --log-tbpl - --log-tbpl-level info --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json edge_webdriver
displayName: 'Run tests'
- task: PublishBuildArtifacts@1
displayName: 'Publish results'
@ -217,7 +217,7 @@ jobs:
- template: tools/ci/azure/install_safari.yml
- template: tools/ci/azure/update_hosts.yml
- template: tools/ci/azure/update_manifest.yml
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --channel preview safari
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --channel preview safari
displayName: 'Run tests'
- task: PublishBuildArtifacts@1
displayName: 'Publish results'

View file

@ -9,7 +9,7 @@
<script>
const crossOriginImageUrl = "http://{{domains[www1]}}:{{ports[http][0]}}/images/red.png";
function assert_origin_unclean(bitmap) {
function assert_origin_unclean_getImageData(bitmap) {
const context = document.createElement("canvas").getContext("2d");
context.drawImage(bitmap, 0, 0);
assert_throws("SecurityError", () => {
@ -17,6 +17,20 @@ function assert_origin_unclean(bitmap) {
});
}
function assert_origin_unclean_drawImage(bitmap) {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
ctx.drawImage(bitmap, 0, 0);
assert_throws('SecurityError', () => canvas.toDataURL());
}
function assert_origin_unclean_transferFromImageBitmap(bitmap) {
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('bitmaprenderer');
ctx.transferFromImageBitmap(bitmap);
assert_throws('SecurityError', () => canvas.toDataURL());
}
function makeImage() {
return new Promise((resolve, reject) => {
const image = new Image();
@ -104,7 +118,13 @@ const arguments = [
for (let { name, factory } of arguments) {
promise_test(function() {
return factory().then(createImageBitmap).then(assert_origin_unclean);
}, name);
return factory().then(createImageBitmap).then(assert_origin_unclean_getImageData);
}, `${name}: origin unclear getImageData`);
promise_test(function() {
return factory().then(createImageBitmap).then(assert_origin_unclean_drawImage);
}, `${name}: origin unclear 2dContext.drawImage`);
promise_test(function() {
return factory().then(createImageBitmap).then(assert_origin_unclean_transferFromImageBitmap);
}, `${name}: origin unclear bitmaprenderer.transferFromImageBitmap`);
}
</script>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<title>Reference for WorkletAnimation name should accept non-ASCII characters</title>
<style>
.box {
width: 100px;
height: 100px;
background-color: green;
}
</style>
<div style="transform: translateX(50px);" class="box"></div>
<div style="transform: translateX(150px);" class="box"></div>

View file

@ -0,0 +1,59 @@
<html class="reftest-wait">
<title>WorkletAnimation name should accept non-ASCII characters</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
<meta name="assert" content="Worklet Animation name should accept non-ASCII characters">
<link rel="match" href="worklet-animation-with-non-ascii-name-ref.html">
<script src="/web-animations/testcommon.js"></script>
<script src="/common/reftest-wait.js"></script>
<script src="common.js"></script>
<style>
.box {
width: 100px;
height: 100px;
background-color: green;
}
</style>
<div id="t0" class="box"></div>
<div id="t1" class="box"></div>
<script id="visual_update" type="text/worklet">
registerAnimator('bob', class {
animate(currentTime, effect) {
effect.localTime = 250;
}
});
registerAnimator('東京', class {
animate(currentTime, effect) {
effect.localTime = 750;
}
});
</script>
<script>
runInAnimationWorklet(
document.getElementById('visual_update').textContent
).then(() => {
const keyframes = [
{transform: 'translateX(0)' },
{transform: 'translateX(200px)' }
];
const options = {
duration: 1000
};
const $t0 = document.getElementById('t0');
const $t0_effect = new KeyframeEffect($t0, keyframes, options);
const $t0_animation = new WorkletAnimation('bob', $t0_effect);
const $t1 = document.getElementById('t1');
const $t1_effect = new KeyframeEffect($t1, keyframes, options);
const $t1_animation = new WorkletAnimation('東京', $t1_effect);
$t0_animation.play();
$t1_animation.play();
waitForAsyncAnimationFrames(1).then(_ => {
takeScreenshot();
});
});
</script>

View file

@ -41,9 +41,7 @@ window.testIsPerWindow = propertyName => {
iframe.src = "/common/blank.html";
}, `Navigating from the initial about:blank must not replace window.${propertyName}`);
// Note: document.open()'s spec doesn't match most browsers; see https://github.com/whatwg/html/issues/1698.
// However, as explained in https://github.com/whatwg/html/issues/1698#issuecomment-298748641, even an updated spec
// will probably still reset Window-associated properties.
// Per spec, document.open() should not change any of the Window state.
async_test(t => {
const iframe = document.createElement("iframe");
@ -55,7 +53,7 @@ window.testIsPerWindow = propertyName => {
frame.document.open();
const after = frame[propertyName];
assert_not_equals(after, before);
assert_equals(after, before);
frame.document.close();
});

View file

@ -1625,7 +1625,7 @@
"html/elements/picture/object-srcset-novalid.html": "Attribute \u201csrcset\u201d not allowed on element \u201cobject\u201d at this point.",
"html/elements/picture/parent-dl-novalid.html": "Element \u201cpicture\u201d not allowed as child of element \u201cdl\u201d in this context. (Suppressing further errors from this subtree.)",
"html/elements/picture/parent-hgroup-novalid.html": "Element \u201cpicture\u201d not allowed as child of element \u201chgroup\u201d in this context. (Suppressing further errors from this subtree.)",
"html/elements/picture/parent-noscript-in-head-novalid.html": "Bad start tag in \u201cpicture\u201d in \u201chead\u201d.",
"html/elements/picture/parent-noscript-in-head-novalid.html": "Bad start tag in \u201cpicture\u201d in \u201cnoscript\u201d in \u201chead\u201d.",
"html/elements/picture/parent-ul-novalid.html": "Element \u201cpicture\u201d not allowed as child of element \u201cul\u201d in this context. (Suppressing further errors from this subtree.)",
"html/elements/picture/picture-align-novalid.html": "Attribute \u201calign\u201d not allowed on element \u201cpicture\u201d at this point.",
"html/elements/picture/picture-alt-novalid.html": "Attribute \u201calt\u201d not allowed on element \u201cpicture\u201d at this point.",

View file

@ -4,9 +4,11 @@
<title>CSS Reftest Reference</title>
<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
<style type="text/css">
body {
color: navy;
}
div {
width: 138px;
color: orange;
font-size: 10px;
line-height: 1;
}

View file

@ -43,7 +43,7 @@
</style>
</head>
<body>
<p>Test passes if there are two black squares on the page.</p>
<p>Test passes if there are 2 filled black squares.</p>
<div id="test">XX XX</div>
<div id="reference"><div id="div1"></div><div id="div2"></div><div id="div3"></div></div>
</body>

View file

@ -9,6 +9,7 @@
{
font-family: monospace;
font-size: 10pt;
margin: 0;
}
div
{

View file

@ -12,6 +12,7 @@
{
font-family: monospace;
font-size: 10pt;
margin: 0;
}
div
{

View file

@ -16,12 +16,12 @@
#div1
{
white-space: pre-wrap;
margin-left: -1em;
}
#div2
{
background: black;
height: 1em;
margin-left: 1em;
width: 1em;
}
</style>

View file

@ -125,29 +125,27 @@ promise_test(function () {
test_with_window(function (contentWindow, contentDocument) {
const element = define_custom_element_in_window(contentWindow, 'my-custom-element', []);
// document-open-steps spec doesn't match most browsers; see https://github.com/whatwg/html/issues/1698.
// However, as explained in https://github.com/whatwg/html/issues/1698#issuecomment-298748641
// the custom element registry will be replaced after document-open-steps.
// document-open-steps spec doesn't do anything with the custom element
// registry, so it should just stick around.
contentDocument.write('<my-custom-element></my-custom-element>');
var instance = contentDocument.querySelector('my-custom-element');
assert_true(instance instanceof contentWindow.HTMLElement);
assert_false(instance instanceof element.class);
assert_true(instance instanceof element.class);
}, 'document.write() must not instantiate a custom element without a defined insertion point');
test_with_window(function (contentWindow, contentDocument) {
const element = define_custom_element_in_window(contentWindow, 'my-custom-element', []);
// document-open-steps spec doesn't match most browsers; see https://github.com/whatwg/html/issues/1698.
// However, as explained in https://github.com/whatwg/html/issues/1698#issuecomment-298748641
// the custom element registry will be replaced after document-open-steps.
// document-open-steps spec doesn't do anything with the custom element
// registry, so it should just stick around.
contentDocument.writeln('<my-custom-element></my-custom-element>');
var instance = contentDocument.querySelector('my-custom-element');
assert_true(instance instanceof contentWindow.HTMLElement);
assert_false(instance instanceof element.class);
assert_true(instance instanceof element.class);
}, 'document.writeln() must not instantiate a custom element without a defined insertion point');

View file

@ -130,11 +130,6 @@ test_with_window(function (contentWindow, contentDocument) {
test_with_window(function (contentWindow, contentDocument) {
contentWindow.document.open();
// document.open()'s spec doesn't match most browsers; see https://github.com/whatwg/html/issues/1698.
// However, as explained in https://github.com/whatwg/html/issues/1698#issuecomment-298748641
// the custom element registry will be replaced after document.open() call,
// So call customElements.define() after that in order to register defintion
// to correct custom elements registry.
const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
contentWindow.document.write('<custom-element></custom-element>');
assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
@ -151,11 +146,6 @@ test_with_window(function (contentWindow, contentDocument) {
test_with_window(function (contentWindow) {
contentWindow.document.open();
// document.open()'s spec doesn't match most browsers; see https://github.com/whatwg/html/issues/1698.
// However, as explained in https://github.com/whatwg/html/issues/1698#issuecomment-298748641
// the custom element registry will be replaced after document.open() call,
// So call customElements.define() after that in order to register defintion
// to correct custom elements registry.
const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
contentWindow.document.writeln('<custom-element></custom-element>');
assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);

View file

@ -99,29 +99,99 @@ test(() => {
}, "Calling click() on disabled elements must not dispatch events.");
promise_test(async () => {
// Style sheet that controls transition.
const style = document.createElement("style");
style.innerText = `
${formElements.join(", ")} {
opacity: 0.1;
transition-property: opacity;
transition-duration: .1s;
}
.transition {
opacity: 1;
}
`;
document.head.appendChild(style);
// Triggers the transition in the element being tested.
const transitionTrigger = document.createElement("button");
transitionTrigger.innerText = "Trigger button";
document.body.appendChild(transitionTrigger);
// For each form element type, set up transition event handlers.
for (const localName of formElements) {
const elem = document.createElement(localName);
elem.disabled = true;
document.body.appendChild(elem);
const transitionPromises = [
"transitionrun",
"transitionstart",
"transitionend",
].map(eventType => {
return new Promise(r => {
const handlerName = `on${eventType}`;
elem[handlerName] = ev => {
elem[handlerName] = null;
r();
};
});
});
// Trigger transitions specifically on this element
// it requires a trusted event.
transitionTrigger.onclick = () => {
elem.classList.toggle("transition");
};
await test_driver.click(transitionTrigger);
// All the events fire...
await Promise.all(transitionPromises);
elem.classList.remove("transition");
// Let's now test the "transitioncancel" event.
elem.ontransitionstart = () => {
// Cancel the transition by hiding it.
elem.style.display = "none";
elem.classList.remove("transition");
};
// Trigger the transition again!
const promiseToCancel = new Promise(r => {
elem.ontransitioncancel = r;
});
await test_driver.click(transitionTrigger);
await promiseToCancel;
// And we are done with this element.
elem.remove();
}
// And we are done with the test... clean up.
transitionTrigger.remove();
style.remove();
}, "CSS Transitions events fire on disabled form elements");
promise_test(async () => {
for (const localName of formElements) {
const elem = document.createElement(localName);
elem.disabled = true;
document.body.appendChild(elem);
// Element is disabled, so clicking must not fire events
let pass = true;
elem.onclick = e => {
pass = false;
};
await test_driver.click(elem); // triggers "onclick"
// Disabled elements are not clickable.
await test_driver.click(elem);
assert_true(
pass,
`${elem.constructor.name} is disabled, so onclick must not fire.`
);
// Element is (re)enabled... so this click() will fire an event.
pass = false;
elem.disabled = false;
elem.onclick = () => {
pass = true;
};
await test_driver.click(elem); // triggers "onclick"
await test_driver.click(elem);
assert_true(
pass,
`${elem.constructor.name} is enabled, so onclick must fire.`

View file

@ -9,10 +9,16 @@ html, body {
width: 100%;
}
</style>
<iframe></iframe>
<body>
<script>
"use strict";
function newIframe() {
var i = document.createElement("iframe");
document.body.appendChild(i);
return i;
}
let iframeElement = document.querySelector("iframe");
let url = url_base + "document-write.html";
@ -42,6 +48,7 @@ html, body {
// is enabled, all dynamic markup insertion API work as intended.
test_cases.forEach((tc) => {
promise_test(async() => {
let iframeElement = newIframe();
await loadUrlInIframe(iframeElement, url);
await sendMessageAndGetResponse(iframeElement.contentWindow, tc).then((response) => {
assert_false(
@ -62,6 +69,7 @@ html, body {
// Disabling 'document-write' throws exception on the included API.
test_cases.forEach((tc) => {
promise_test(async() => {
let iframeElement = newIframe();
setFeatureState(iframeElement, "document-write", "'none'");
await loadUrlInIframe(iframeElement, url);
await sendMessageAndGetResponse(iframeElement.contentWindow, tc).then((response) => {
@ -80,3 +88,4 @@ html, body {
});
</script>
</body>

View file

@ -5,11 +5,8 @@
opener.pages.push(2);
onload = function() {
setTimeout(function() {
document.write("<!doctype html>3<script>opener.pages.push(3); if(!opener.started) {opener.started = true; history.go(-1);} opener.start_test_wait();<\/script>");
document.write("<!doctype html>3<script>opener.pages.push(3); if(!opener.started) {opener.started = true; history.go(-1);}<\/script>");
document.close();
if (opener.started) {
opener.start_test_wait();
}
}, 100);
}
</script>

View file

@ -11,12 +11,11 @@
function() {
check_result = t.step_func(
function() {
if (pages.length < 4) {
if (pages.length < 3) {
setTimeout(check_result, 500);
return
}
//The pass condition here is based on the idea that the spec is wrong and browsers are right
assert_array_equals(pages, [2, 3, 2, 3], "Pages opened during history navigation");
assert_array_equals(pages, [2, 3, 1], "Pages opened during history navigation");
t.done();
}
)

View file

@ -3,11 +3,16 @@
<script>
function f() {
opener.postMessage("original", "*");
if (opener.data.length >= 2) {
// If we proceed here, then our document.write will be racing with the
// setTimeout in our opener. Just stop.
return;
}
setTimeout(function () {
document.open();
document.write("<!doctype html>2<script>opener.postMessage('written', '*');<\/script>");
document.close();
}), 100;
});
}
window.onload = f

View file

@ -11,11 +11,11 @@ var data = [];
window.onmessage = t.step_func(function(e) {
data.push(e.data);
if (data.length < 3) {
if (data.length == 2) {
win.location.reload();
} else {
} else if (data.length >= 3) {
setTimeout(t.step_func(function() {
assert_array_equals(data, ["original", "written", "written"]);
assert_array_equals(data, ["original", "written", "original"]);
t.done();
}), 500);
}

View file

@ -0,0 +1,59 @@
function assert_barProps(barPropObjects, visible) {
let lastBarProp = undefined;
for (const currentBarProp of barPropObjects) {
assert_not_equals(currentBarProp, lastBarProp, "BarBrop objects of different properties are identical");
assert_equals(currentBarProp.visible, visible, "a BarProp's visible is wrong");
lastBarProp = currentBarProp;
}
}
function assert_identical_barProps(barProps, w, oldBarPropObjects, visible) {
barProps.map(val => w[val]).map((val, index) => {
assert_equals(val, oldBarPropObjects[index], "BarProp identity not preserved");
});
assert_barProps(oldBarPropObjects, visible);
}
async_test(t => {
const frame = document.body.appendChild(document.createElement("iframe")),
frameW = frame.contentWindow,
barProps = ["locationbar", "menubar", "personalbar", "scrollbars", "statusbar", "toolbar"],
barPropObjects = barProps.map(val => frameW[val]);
assert_barProps(barPropObjects, true);
frame.remove();
assert_identical_barProps(barProps, frameW, barPropObjects, false);
t.step_timeout(() => {
assert_identical_barProps(barProps, frameW, barPropObjects, false);
t.done();
}, 0);
}, "BarBrop objects of a nested Window");
async_test(t => {
const openee = window.open("/common/blank.html"),
barProps = ["locationbar", "menubar", "personalbar", "scrollbars", "statusbar", "toolbar"],
barPropObjects = barProps.map(val => openee[val]);
// This is used to demonstrate that the Document is replaced while the global object (not the
// global this object) stays the same
openee.tiedToGlobalObject = openee.document;
assert_barProps(barPropObjects, true);
openee.onload = t.step_func(() => {
assert_own_property(openee, "tiedToGlobalObject");
assert_not_equals(openee.tiedToGlobalObject, openee.document);
assert_identical_barProps(barProps, openee, barPropObjects, true);
openee.onunload = t.step_func(() => {
assert_identical_barProps(barProps, openee, barPropObjects, true);
t.step_timeout(() => {
assert_identical_barProps(barProps, openee, barPropObjects, false);
t.done();
}, 0);
});
openee.close();
assert_identical_barProps(barProps, openee, barPropObjects, true);
});
}, "BarProp objects of an auxiliary Window");

View file

@ -1,29 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Window Proxy locationbar visible flag Test</title>
<link rel="author" title='JuneyoungOh' href="juneyoung85@gmail.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>Description</h1>
<p>WindowProxy.locationbar Test</p>
<h1>Manual Test Steps:</h1>
<ol>
<li>Make the locationbar visible in the user agent before executing this test.</li>
<li>You may need to manually reload afterwards.</li>
</ol>
<div id="log"></div>
<script>
test(function() {
assert_not_equals(typeof window.locationbar, undefined, 'window.locationbar is undefined');
assert_true(window.locationbar.visible)
}, "window.locationbar.visible");
</script>
</body>
</html>

View file

@ -1,29 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Window Proxy menubar visible flag Test</title>
<link rel="author" title='JuneyoungOh' href="juneyoung85@gmail.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>Description</h1>
<p>WindowProxy.menubar Test</p>
<h1>Manual Test Steps:</h1>
<ol>
<li>Make the menubar visible in the user agent before executing this test.</li>
<li>You may need to manually reload afterwards.</li>
</ol>
<div id="log"></div>
<script>
test(function() {
assert_not_equals(typeof window.menubar, undefined, 'window.menubar is undefined');
assert_true(window.menubar.visible);
}, "window.menubar.visible");
</script>
</body>
</html>

View file

@ -1,29 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Window Proxy personalbar visible flag Test</title>
<link rel="author" title="vanessa" href="mailto:vanessaohsy@gmail.com">
<script type="text/javascript" src="/resources/testharness.js"></script>
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>Description</h1>
<p>WindowProxy.personalbar Test</p>
<h1>Manual Test Steps:</h1>
<ol>
<li>Make the personalbar visible in the user agent before executing this test.</li>
<li>You may need to manually reload afterwards.</li>
</ol>
<div id="log"></div>
<script type="text/javascript" >
test(function () {
assert_not_equals(window.personalbar, undefined, "window.personalbar is undefined");
assert_true(window.personalbar.visible, "window.personalbar.visible");
});
</script>
</body>
</html>

View file

@ -1,29 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Window Proxy scrollbars visible flag Test</title>
<link rel="author" title="vanessa" href="vanessaohsy@gmail.com">
<script type="text/javascript" src="/resources/testharness.js"></script>
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>Description</h1>
<p>WindowProxy.scrollbars Test</p>
<h1>Manual Test Steps:</h1>
<ol>
<li>Make the scrollbars visible in the user agent before executing this test.</li>
<li>You may need to manually reload afterwards.</li>
</ol>
<div id="log"></div>
<script type="text/javascript" >
test(function () {
assert_not_equals(window.scrollbars, undefined, "window.scrollbars is undefined");
assert_true(window.scrollbars.visible, "window.scrollbars.visible");
});
</script>
</body>
</html>

View file

@ -1,29 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>WindowProxy statusbar visible flag Test</title>
<link rel="author" title="dokenzy" href="dokenzy@gmail.com">
<script type="text/javascript" src="/resources/testharness.js"></script>
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>Description</h1>
<p>WindowProxy.statusbar Test</p>
<h1>Manual Test Steps:</h1>
<ol>
<li>Make the statusbar visible in the user agent before executing this test.</li>
<li>You may need to manually reload afterwards.</li>
</ol>
<div id="log"></div>
<script type="text/javascript" >
test(function () {
assert_not_equals(typeof window.statusbar.visible, undefined, 'window.statusbar.visible');
assert_true(window.statusbar.visible, 'window.statusbar.visible');
}, "BarProp attribute: window.statusbar.visible");
</script>
</body>
</html>

View file

@ -1,29 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>WindowProxy toolbar visible flag Test</title>
<link rel="author" title="dokenzy" href="dokenzy@gmail.com">
<script type="text/javascript" src="/resources/testharness.js"></script>
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>Description</h1>
<p>WindowProxy.toolbar Test</p>
<h1>Manual Test Steps:</h1>
<ol>
<li>Make the toolbar visible in the user agent before executing this test.</li>
<li>You may need to manually reload afterwards.</li>
</ol>
<div id="log"></div>
<script type="text/javascript" >
test(function () {
assert_not_equals(typeof window.toolbar.visible, undefined, 'window.toolbar.visible');
assert_true(window.toolbar.visible, 'window.toolbar.visible');
}, "BarProp attribute: window.toolbar.visible");
</script>
</body>
</html>

View file

@ -0,0 +1,91 @@
<!DOCTYPE html>
<head>
<title>Reference for default 'border-color' on table (with 'color' set)</title>
<meta charset="utf-8">
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
<style>
* {
border-color: teal;
/* This only affects the elements that we specify 'border-style' on: */
border-width: 6px;
}
table {
height: 30px;
width: 30px;
border-spacing: 0;
/* To test in "rows": */
float: left;
margin: 1px;
}
br {
clear: both;
}
.dotted {
border-style: dotted;
}
.dashed {
border-style: dashed;
}
.solid {
border-style: solid;
}
.double {
border-style: double;
}
.groove {
border-style: groove;
}
.ridge {
border-style: ridge;
}
.inset {
border-style: inset;
}
.outset {
border-style: outset;
}
</style>
</head>
<table class="dotted"><td></td></table>
<table><th class="dotted"></th></table>
<table><td class="dotted"></td></table>
<br>
<table class="dashed"><td></td></table>
<table><th class="dashed"></th></table>
<table><td class="dashed"></td></table>
<br>
<table class="solid"><td></td></table>
<table><th class="solid"></th></table>
<table><td class="solid"></td></table>
<br>
<table class="double"><td></td></table>
<table><th class="double"></th></table>
<table><td class="double"></td></table>
<br>
<table class="groove"><td></td></table>
<table><th class="groove"></th></table>
<table><td class="groove"></td></table>
<br>
<table class="ridge"><td></td></table>
<table><th class="ridge"></th></table>
<table><td class="ridge"></td></table>
<br>
<table class="inset"><td></td></table>
<table><th class="inset"></th></table>
<table><td class="inset"></td></table>
<br>
<table class="outset"><td></td></table>
<table><th class="outset"></th></table>
<table><td class="outset"></td></table>
<br>

View file

@ -0,0 +1,95 @@
<!-- Intentionally omitting doctype, to test quirks mode. -->
<head>
<title>Testing default 'border-color' on table (with 'color' set), in quirks mode</title>
<meta charset="utf-8">
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#tables-2">
<link rel="match" href="table-border-3-ref.html">
<style>
* {
/* This sets the used value of 'currentColor', which is what should be
used for all border-coloring in this test: */
color: teal;
/* This only affects the elements that we specify 'border-style' on: */
border-width: 6px;
}
table {
height: 30px;
width: 30px;
border-spacing: 0;
/* To test in "rows": */
float: left;
margin: 1px;
}
br {
clear: both;
}
.dotted {
border-style: dotted;
}
.dashed {
border-style: dashed;
}
.solid {
border-style: solid;
}
.double {
border-style: double;
}
.groove {
border-style: groove;
}
.ridge {
border-style: ridge;
}
.inset {
border-style: inset;
}
.outset {
border-style: outset;
}
</style>
</head>
<table class="dotted"><td></td></table>
<table><th class="dotted"></th></table>
<table><td class="dotted"></td></table>
<br>
<table class="dashed"><td></td></table>
<table><th class="dashed"></th></table>
<table><td class="dashed"></td></table>
<br>
<table class="solid"><td></td></table>
<table><th class="solid"></th></table>
<table><td class="solid"></td></table>
<br>
<table class="double"><td></td></table>
<table><th class="double"></th></table>
<table><td class="double"></td></table>
<br>
<table class="groove"><td></td></table>
<table><th class="groove"></th></table>
<table><td class="groove"></td></table>
<br>
<table class="ridge"><td></td></table>
<table><th class="ridge"></th></table>
<table><td class="ridge"></td></table>
<br>
<table class="inset"><td></td></table>
<table><th class="inset"></th></table>
<table><td class="inset"></td></table>
<br>
<table class="outset"><td></td></table>
<table><th class="outset"></th></table>
<table><td class="outset"></td></table>
<br>

View file

@ -0,0 +1,95 @@
<!DOCTYPE html>
<head>
<title>Testing default 'border-color' on table (with 'color' set), in standards mode</title>
<meta charset="utf-8">
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#tables-2">
<link rel="match" href="table-border-3-ref.html">
<style>
* {
/* This sets the used value of 'currentColor', which is what should be
used for all border-coloring in this test: */
color: teal;
/* This only affects the elements that we specify 'border-style' on: */
border-width: 6px;
}
table {
height: 30px;
width: 30px;
border-spacing: 0;
/* To test in "rows": */
float: left;
margin: 1px;
}
br {
clear: both;
}
.dotted {
border-style: dotted;
}
.dashed {
border-style: dashed;
}
.solid {
border-style: solid;
}
.double {
border-style: double;
}
.groove {
border-style: groove;
}
.ridge {
border-style: ridge;
}
.inset {
border-style: inset;
}
.outset {
border-style: outset;
}
</style>
</head>
<table class="dotted"><td></td></table>
<table><th class="dotted"></th></table>
<table><td class="dotted"></td></table>
<br>
<table class="dashed"><td></td></table>
<table><th class="dashed"></th></table>
<table><td class="dashed"></td></table>
<br>
<table class="solid"><td></td></table>
<table><th class="solid"></th></table>
<table><td class="solid"></td></table>
<br>
<table class="double"><td></td></table>
<table><th class="double"></th></table>
<table><td class="double"></td></table>
<br>
<table class="groove"><td></td></table>
<table><th class="groove"></th></table>
<table><td class="groove"></td></table>
<br>
<table class="ridge"><td></td></table>
<table><th class="ridge"></th></table>
<table><td class="ridge"></td></table>
<br>
<table class="inset"><td></td></table>
<table><th class="inset"></th></table>
<table><td class="inset"></td></table>
<br>
<table class="outset"><td></td></table>
<table><th class="outset"></th></table>
<table><td class="outset"></td></table>
<br>

View file

@ -12,7 +12,7 @@ async_test(function(t) {
track.mode = 'showing';
assert_equals(video.textTracks.length, 1);
video.textTracks.onchange = t.step_func_done(function() {
video.textTracks.onchange = t.step_func_done(function(event) {
assert_equals(event.target, video.textTracks);
assert_true(event instanceof Event, 'instanceof');
assert_false(event.hasOwnProperty('track'), 'unexpected property found: "track"');

View file

@ -0,0 +1,19 @@
// Make sure that the load event for an iframe doesn't fire at the
// point when a navigation triggered by document.write() starts in it,
// but rather when that navigation completes.
async_test(t => {
const frame = document.body.appendChild(document.createElement("iframe"));
const doc = frame.contentDocument;
const url = URL.createObjectURL(new Blob(["PASS"], { type: "text/html"}));
frame.onload = t.step_func_done(() => {
assert_equals(frame.contentDocument.body.textContent, "PASS",
"Why is our load event firing before the new document loaded?");
});
doc.open();
doc.write(`FAIL<script>location = "${url}"</` + "script>");
doc.close();
}, "Setting location from document.write() call should not trigger load event until that load completes");

View file

@ -1,3 +1,3 @@
def main(request, response):
time = request.url_parts.query if request.url_parts.query else '0'
return 200, [['Refresh', time]], ''
return 200, [('Refresh', time), ('Content-Type', "text/html")], ''

View file

@ -0,0 +1,118 @@
<!DOCTYPE HTML>
<meta charset=UTF-8>
<title>Ordering of steps in "Update the Rendering" - child document requestAnimationFrame order</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering">
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
<link rel="author" title="Mozilla" href="https://mozilla.org/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<!--
This test tests the interaction of just two substeps of the "Update the
rendering" steps in
https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering
These are:
1. Let docs be the list of Document objects associated with the event
loop in question, sorted arbitrarily except that the following
conditions must be met:
- Any Document B that is nested through a Document A must be listed
after A in the list.
- If there are two documents A and B whose browsing contexts are
both nested browsing contexts and their browsing context
containers are both elements in the same Document C, then the
order of A and B in the list must match the relative tree order of
their respective browsing context containers in C.
In the steps below that iterate over docs, each Document must be
processed in the order it is found in the list.
and later:
10. For each fully active Document in docs, run the animation frame
callbacks for that Document, passing in now as the timestamp.
It tests this by setting up a tree of three documents, two children and
one parent, and testing for the relative order of the animation frame
callbacks for each.
-->
<script>
async_test(function (t) {
step_timeout(setup, 0);
let first_frame, second_frame;
let notification_sequence = [];
function setup() {
// Start by creating two iframes. To test (a little bit) the rule
// about iteration being in document order, insert them in the reverse
// order of creation.
let body = document.body;
function make_iframe() {
let iframe = document.createElement("iframe");
iframe.setAttribute("srcdoc", "<body onload='parent.child_ready()'>");
iframe.setAttribute("width", "30");
iframe.setAttribute("height", "15");
return iframe;
}
second_frame = make_iframe();
body.prepend(second_frame);
first_frame = make_iframe();
body.prepend(first_frame);
let children_waiting = 2;
window.child_ready = function() {
if (--children_waiting == 0) {
// Call requestAnimationFrame in neither the order nor the reverse
// of the order in which we expect to be called (which is parent,
// first, second).
first_frame.contentWindow.requestAnimationFrame(first_child_raf);
second_frame.contentWindow.requestAnimationFrame(second_child_raf);
window.requestAnimationFrame(parent_raf);
}
};
}
let parent_raf = t.step_func(function() {
notification_sequence.push("parent_raf");
// Request another notification to help ensure we're getting expected behavior.
window.requestAnimationFrame(parent_raf);
});
let first_child_raf = t.step_func(function() {
notification_sequence.push("first_child_raf");
// Request another notification to help ensure we're getting expected behavior.
first_frame.contentWindow.requestAnimationFrame(first_child_raf);
});
let second_child_raf = t.step_func(function() {
notification_sequence.push("second_child_raf");
// Request another notification to help ensure we're getting expected behavior.
second_frame.contentWindow.requestAnimationFrame(second_child_raf);
step_timeout(finish, 0);
});
let finish = t.step_func(function() {
assert_array_equals(notification_sequence,
["parent_raf", "first_child_raf", "second_child_raf"],
"expected order of notifications");
t.done();
});
});
</script>

View file

@ -18,12 +18,18 @@ enum SupportedType {
[Constructor, Exposed=Window]
interface XMLSerializer {
interface XMLSerializer {
DOMString serializeToString(Node root);
};
partial interface Element {
interface mixin InnerHTML {
[CEReactions, TreatNullAs=EmptyString] attribute DOMString innerHTML;
};
Element includes InnerHTML;
ShadowRoot includes InnerHTML;
partial interface Element {
[CEReactions, TreatNullAs=EmptyString] attribute DOMString outerHTML;
[CEReactions] void insertAdjacentHTML(DOMString position, DOMString text);
};

View file

@ -12,8 +12,8 @@ interface Blob {
readonly attribute DOMString type;
// slice Blob into byte-ranged chunks
Blob slice([Clamp] optional long long start,
[Clamp] optional long long end,
Blob slice(optional [Clamp] long long start,
optional [Clamp] long long end,
optional DOMString contentType);
};
@ -75,7 +75,6 @@ interface FileReader: EventTarget {
attribute EventHandler onabort;
attribute EventHandler onerror;
attribute EventHandler onloadend;
};
[Constructor, Exposed=(DedicatedWorker,SharedWorker)]
@ -90,6 +89,6 @@ interface FileReaderSync {
[Exposed=(Window,DedicatedWorker,SharedWorker)]
partial interface URL {
static DOMString createObjectURL(Blob blob);
static DOMString createObjectURL((Blob or MediaSource) obj);
static void revokeObjectURL(DOMString url);
};

View file

@ -171,6 +171,7 @@ interface IDBCursor {
readonly attribute IDBCursorDirection direction;
readonly attribute any key;
readonly attribute any primaryKey;
readonly attribute IDBRequest request;
void advance([EnforceRange] unsigned long count);
void continue(optional any key);

View file

@ -16,13 +16,42 @@ partial interface Navigator {
[SecureContext, SameObject] readonly attribute Clipboard clipboard;
};
typedef sequence<ClipboardItem> ClipboardItems;
[SecureContext, Exposed=Window] interface Clipboard : EventTarget {
Promise<DataTransfer> read();
Promise<ClipboardItems> read();
Promise<DOMString> readText();
Promise<void> write(DataTransfer data);
Promise<void> write(ClipboardItems data);
Promise<void> writeText(DOMString data);
};
typedef (DOMString or Blob) ClipboardItemDataType;
typedef Promise<ClipboardItemDataType> ClipboardItemData;
callback ClipboardItemDelayedCallback = ClipboardItemData ();
[Constructor(record<DOMString, ClipboardItemData> items,
optional ClipboardItemOptions options),
Exposed=Window] interface ClipboardItem {
static ClipboardItem createDelayed(
record<DOMString, ClipboardItemDelayedCallback> items,
optional ClipboardItemOptions options);
readonly attribute PresentationStyle presentationStyle;
readonly attribute long long lastModified;
readonly attribute boolean delayed;
readonly attribute FrozenArray<DOMString> types;
Promise<Blob> getType(DOMString type);
};
enum PresentationStyle { "unspecified", "inline", "attachment" };
dictionary ClipboardItemOptions {
PresentationStyle presentationStyle = "unspecified";
};
dictionary ClipboardPermissionDescriptor : PermissionDescriptor {
boolean allowWithoutGesture = false;
};

View file

@ -134,7 +134,7 @@ dictionary FragmentResultOptions {
BreakTokenOptions breakToken = null;
};
[Constructor(FragmentResultOptions)]
[Constructor(optional FragmentResultOptions options)]
interface FragmentResult {
readonly attribute double inlineSize;
readonly attribute double blockSize;

View file

@ -4,24 +4,11 @@
// Source: CSS Pseudo-Elements Module Level 4 (https://drafts.csswg.org/css-pseudo-4/)
[Exposed=Window]
interface CSSPseudoElement {
interface CSSPseudoElement : EventTarget {
readonly attribute CSSOMString type;
readonly attribute Element element;
readonly attribute CSSStyleDeclaration style;
};
CSSPseudoElement implements EventTarget;
[Exposed=Window]
interface CSSPseudoElementList {
readonly attribute unsigned long length;
CSSPseudoElement item(unsigned long index);
CSSPseudoElement getByType(CSSOMString type);
// replies null if no pseudo-element exists for
// the requested type
};
partial interface Window {
CSSPseudoElementList getPseudoElements(Element elt,
CSSOMString type);
partial interface Element {
CSSPseudoElement? pseudo(CSSOMString type);
};

View file

@ -25,11 +25,9 @@ interface NamedFlow : EventTarget {
sequence<Region> getRegionsByContent(Node node);
};
[Exposed=Window,
NoInterfaceObject]
interface Region {
readonly attribute CSSOMString regionOverset;
sequence<Range>? getRegionFlowRanges();
};
Element implements Region;
Element includes Region;

View file

@ -1,7 +1,7 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports)
// Source: Feature Policy (https://wicg.github.io/feature-policy/)
// Source: Feature Policy (https://w3c.github.io/webappsec-feature-policy/)
[NoInterfaceObject]
interface FeaturePolicy {

View file

@ -3,7 +3,7 @@
// (https://github.com/tidoust/reffy-reports)
// Source: Generic Sensor API (https://w3c.github.io/sensors/)
[SecureContext, Exposed=Window]
[SecureContext, Exposed=(DedicatedWorker, Window)]
interface Sensor : EventTarget {
readonly attribute boolean activated;
readonly attribute boolean hasReading;
@ -20,7 +20,7 @@ dictionary SensorOptions {
};
[Constructor(DOMString type, SensorErrorEventInit errorEventInitDict),
SecureContext, Exposed=Window]
SecureContext, Exposed=(DedicatedWorker, Window)]
interface SensorErrorEvent : Event {
readonly attribute DOMException error;
};
@ -58,63 +58,3 @@ enum MockSensorType {
dictionary MockSensorReadingValues {
};
dictionary AmbientLightReadingValues {
required double? illuminance;
};
dictionary AccelerometerReadingValues {
required double? x;
required double? y;
required double? z;
};
dictionary LinearAccelerationReadingValues : AccelerometerReadingValues {
};
dictionary GravityReadingValues : AccelerometerReadingValues {
};
dictionary GyroscopeReadingValues {
required double? x;
required double? y;
required double? z;
};
dictionary MagnetometerReadingValues {
required double? x;
required double? y;
required double? z;
};
dictionary UncalibratedMagnetometerReadingValues {
required double? x;
required double? y;
required double? z;
required double? xBias;
required double? yBias;
required double? zBias;
};
dictionary AbsoluteOrientationReadingValues {
required FrozenArray<double>? quaternion;
};
dictionary RelativeOrientationReadingValues : AbsoluteOrientationReadingValues {
};
dictionary GeolocationReadingValues {
required double? latitude;
required double? longitude;
required double? altitude;
required double? accuracy;
required double? altitudeAccuracy;
required double? heading;
required double? speed;
};
dictionary ProximityReadingValues {
required double? distance;
required double? max;
required boolean? near;
};

View file

@ -3,7 +3,9 @@
// (https://github.com/tidoust/reffy-reports)
// Source: Geolocation Sensor (https://wicg.github.io/geolocation-sensor/)
[Constructor(optional GeolocationSensorOptions options), SecureContext, Exposed=Window]
[Constructor(optional GeolocationSensorOptions options),
SecureContext,
Exposed=(DedicatedWorker, Window)]
interface GeolocationSensor : Sensor {
static Promise<GeolocationSensorReading> read(optional ReadOptions readOptions);
readonly attribute unrestricted double? latitude;

View file

@ -1,7 +1,7 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports)
// Source: Keyboard Lock (https://w3c.github.io/keyboard-lock/)
// Source: Keyboard Lock (https://wicg.github.io/keyboard-lock/)
partial interface Navigator {
[SecureContext, SameObject] readonly attribute Keyboard keyboard;

View file

@ -4,76 +4,23 @@
// Source: Media Capture Depth Stream Extensions (https://w3c.github.io/mediacapture-depth/)
partial dictionary MediaTrackSupportedConstraints {
// Apply to both depth stream track and color stream track:
// Applies 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;
};
partial dictionary MediaTrackCapabilities {
// Apply to both depth stream track and color stream track:
// Applies 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;
};
partial dictionary MediaTrackConstraintSet {
// Apply to both depth stream track and color stream track:
// Applies 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;
};
partial dictionary MediaTrackSettings {
// Apply to both depth stream track and color stream track:
// Applies 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 {

View file

@ -164,14 +164,13 @@ partial interface Navigator {
readonly attribute MediaDevices mediaDevices;
};
[Exposed=Window,
SecureContext]
[Exposed=Window, SecureContext]
interface MediaDevices : EventTarget {
attribute EventHandler ondevicechange;
Promise<sequence<MediaDeviceInfo>> enumerateDevices();
};
[Exposed=Window]
[Exposed=Window, SecureContext]
interface MediaDeviceInfo {
readonly attribute DOMString deviceId;
readonly attribute MediaDeviceKind kind;
@ -211,15 +210,6 @@ callback NavigatorUserMediaErrorCallback = void (MediaStreamError error);
typedef object MediaStreamError;
[NoInterfaceObject]
interface ConstrainablePattern {
Capabilities getCapabilities();
Constraints getConstraints();
Settings getSettings();
Promise<void> applyConstraints(optional Constraints constraints);
attribute EventHandler onoverconstrained;
};
dictionary DoubleRange {
double max;
double min;

View file

@ -36,7 +36,7 @@ partial interface Element {
boolean hasPointerCapture(long pointerId);
};
partial interface GlobalEventHandlers {
partial interface mixin GlobalEventHandlers {
attribute EventHandler ongotpointercapture;
attribute EventHandler onlostpointercapture;
attribute EventHandler onpointerdown;

View file

@ -16,13 +16,6 @@ interface ScreenOrientation : EventTarget {
attribute EventHandler onchange;
};
enum OrientationType {
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
};
enum OrientationLockType {
"any",
"natural",
@ -33,3 +26,10 @@ enum OrientationLockType {
"landscape-primary",
"landscape-secondary"
};
enum OrientationType {
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
};

View file

@ -1,13 +1,14 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports)
// Source: Service Workers 1 (https://w3c.github.io/ServiceWorker/v1/)
// Source: Service Workers Nightly (https://w3c.github.io/ServiceWorker/)
[SecureContext, Exposed=(Window,Worker)]
interface ServiceWorker : EventTarget {
readonly attribute USVString scriptURL;
readonly attribute ServiceWorkerState state;
void postMessage(any message, optional sequence<object> transfer = []);
void postMessage(any message, sequence<object> transfer);
void postMessage(any message, optional PostMessageOptions options);
// event
attribute EventHandler onstatechange;
@ -27,6 +28,7 @@ interface ServiceWorkerRegistration : EventTarget {
readonly attribute ServiceWorker? installing;
readonly attribute ServiceWorker? waiting;
readonly attribute ServiceWorker? active;
[SameObject] readonly attribute NavigationPreloadManager navigationPreload;
readonly attribute USVString scope;
readonly attribute ServiceWorkerUpdateViaCache updateViaCache;
@ -76,6 +78,19 @@ dictionary RegistrationOptions {
ServiceWorkerUpdateViaCache updateViaCache = "imports";
};
[SecureContext, Exposed=(Window,Worker)]
interface NavigationPreloadManager {
Promise<void> enable();
Promise<void> disable();
Promise<void> setHeaderValue(ByteString value);
Promise<NavigationPreloadState> getState();
};
dictionary NavigationPreloadState {
boolean enabled = false;
ByteString headerValue;
};
[Global=(Worker,ServiceWorker), Exposed=ServiceWorker]
interface ServiceWorkerGlobalScope : WorkerGlobalScope {
[SameObject] readonly attribute Clients clients;
@ -98,7 +113,8 @@ interface Client {
readonly attribute FrameType frameType;
readonly attribute DOMString id;
readonly attribute ClientType type;
void postMessage(any message, optional sequence<object> transfer = []);
void postMessage(any message, sequence<object> transfer);
void postMessage(any message, optional PostMessageOptions options);
};
[Exposed=ServiceWorker]
@ -150,14 +166,20 @@ dictionary ExtendableEventInit : EventInit {
[Constructor(DOMString type, FetchEventInit eventInitDict), Exposed=ServiceWorker]
interface FetchEvent : ExtendableEvent {
[SameObject] readonly attribute Request request;
readonly attribute Promise<any> preloadResponse;
readonly attribute DOMString clientId;
readonly attribute DOMString resultingClientId;
readonly attribute DOMString replacesClientId;
void respondWith(Promise<Response> r);
};
dictionary FetchEventInit : ExtendableEventInit {
required Request request;
Promise<any> preloadResponse;
DOMString clientId = "";
DOMString resultingClientId = "";
DOMString replacesClientId = "";
};
[Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict), Exposed=ServiceWorker]
@ -177,7 +199,7 @@ dictionary ExtendableMessageEventInit : ExtendableEventInit {
sequence<MessagePort> ports = [];
};
partial interface WindowOrWorkerGlobalScope {
partial interface mixin WindowOrWorkerGlobalScope {
[SecureContext, SameObject] readonly attribute CacheStorage caches;
};

View file

@ -155,6 +155,7 @@ interface SpeechSynthesisUtterance : EventTarget {
interface SpeechSynthesisEvent : Event {
readonly attribute SpeechSynthesisUtterance utterance;
readonly attribute unsigned long charIndex;
readonly attribute unsigned long charLength;
readonly attribute float elapsedTime;
readonly attribute DOMString name;
};
@ -162,6 +163,7 @@ interface SpeechSynthesisEvent : Event {
dictionary SpeechSynthesisEventInit : EventInit {
required SpeechSynthesisUtterance utterance;
unsigned long charIndex = 0;
unsigned long charLength = 0;
float elapsedTime = 0;
DOMString name = "";
};

View file

@ -67,7 +67,7 @@ interface TouchEvent : UIEvent {
readonly attribute boolean shiftKey;
};
partial interface GlobalEventHandlers {
partial interface mixin GlobalEventHandlers {
attribute EventHandler ontouchstart;
attribute EventHandler ontouchend;
attribute EventHandler ontouchmove;

View file

@ -5,17 +5,14 @@
enum WakeLockType { "screen", "system" };
partial interface Navigator {
[SecureContext] Promise<WakeLock> getWakeLock(WakeLockType type);
};
[SecureContext, Exposed=Window] interface WakeLock : EventTarget {
[Constructor(WakeLockType type), SecureContext, Exposed=(DedicatedWorker,Window)]
interface WakeLock : EventTarget {
readonly attribute WakeLockType type;
readonly attribute boolean active;
attribute EventHandler onactivechange;
WakeLockRequest createRequest();
Promise<void> request(optional WakeLockRequestOptions options);
};
[SecureContext, Exposed=Window] interface WakeLockRequest {
void cancel();
dictionary WakeLockRequestOptions {
AbortSignal? signal;
};

View file

@ -105,7 +105,7 @@ interface RTCPeerConnection : EventTarget {
readonly attribute RTCSessionDescription? remoteDescription;
readonly attribute RTCSessionDescription? currentRemoteDescription;
readonly attribute RTCSessionDescription? pendingRemoteDescription;
Promise<void> addIceCandidate(RTCIceCandidateInit candidate);
Promise<void> addIceCandidate(optional RTCIceCandidateInit candidate);
readonly attribute RTCSignalingState signalingState;
readonly attribute RTCIceGatheringState iceGatheringState;
readonly attribute RTCIceConnectionState iceConnectionState;
@ -609,6 +609,26 @@ dictionary RTCStatsEventInit : EventInit {
required RTCStatsReport report;
};
[
Exposed=Window,
Constructor(RTCErrorInit init, optional DOMString message = "")] interface RTCError {
readonly attribute RTCErrorDetailType errorDetail;
readonly attribute long? sdpLineNumber;
readonly attribute long? httpRequestStatusCode;
readonly attribute long? sctpCauseCode;
readonly attribute unsigned long? receivedAlert;
readonly attribute unsigned long? sentAlert;
};
dictionary RTCErrorInit {
required RTCErrorDetailType errorDetail;
long sdpLineNumber;
long httpRequestStatusCode;
long sctpCauseCode;
unsigned long receivedAlert;
unsigned long sentAlert;
};
enum RTCErrorDetailType {
"data-channel-failure",
"dtls-failure",
@ -627,12 +647,12 @@ enum RTCErrorDetailType {
"hardware-encoder-error"
};
[Exposed=Window,
Constructor(DOMString type, optional RTCErrorEventInit eventInitDict)]
interface RTCErrorEvent : Event {
readonly attribute RTCError? error;
[
Exposed=Window,
Constructor(DOMString type, RTCErrorEventInit eventInitDict)] interface RTCErrorEvent : Event {
[SameObject] readonly attribute RTCError error;
};
dictionary RTCErrorEventInit : EventInit {
RTCError? error = null;
required RTCError error;
};

View file

@ -187,8 +187,9 @@ SET TIMEOUT: paint-timing/resources/subframe-painting.html
SET TIMEOUT: payment-request/allowpaymentrequest/setting-allowpaymentrequest-timing.https.sub.html
SET TIMEOUT: preload/single-download-preload.html
SET TIMEOUT: resize-observer/resources/iframe.html
SET TIMEOUT: resource-timing/resources/iframe-TAO*
SET TIMEOUT: resource-timing/resources/nested-contexts.js
SET TIMEOUT: resource-timing/TAO-null-opaque-origin.sub.html
SET TIMEOUT: resource-timing/TAO-case-insensitive-null-opaque-origin.sub.html
SET TIMEOUT: screen-orientation/onchange-event.html
SET TIMEOUT: secure-contexts/basic-popup-and-iframe-tests.https.js
SET TIMEOUT: service-workers/cache-storage/script-tests/cache-abort.js

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>fractions linethickness</title>
<style type="text/css">
@font-face {
font-family: TestFont;
src: url("/fonts/math/fraction-rulethickness10000.woff");
}
math {
/* FractionRuleThickness = 10000 * 1 / 1000 = 10px; */
font-family: "TestFont";
font-size: 1px;
}
</style>
</head>
<body>
<p>This test passes if you see no fraction bar.</p>
<math>
<mfrac linethickness="0px">
<mspace width="20px" height="10px" style="background: blue"></mspace>
<mspace width="20px" height="10px" style="background: cyan"></mspace>
</mfrac>
</math>
</body>
</html>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>fractions linethickness</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#mfrac">
<meta name="assert" content="Verifies that unitless value of zero causes no fraction bar to be painted">
<link rel="match" href="frac-linethickness-004-ref.html">
<style type="text/css">
@font-face {
font-family: TestFont;
src: url("/fonts/math/fraction-rulethickness10000.woff");
}
math {
/* FractionRuleThickness = 10000 * 1 / 1000 = 10px; */
font-family: "TestFont";
font-size: 1px;
}
</style>
</head>
<body>
<p>This test passes if you see no fraction bar.</p>
<math>
<mfrac linethickness="0">
<mspace width="20px" height="10px" style="background: blue"></mspace>
<mspace width="20px" height="10px" style="background: cyan"></mspace>
</mfrac>
</math>
</body>
</html>

View file

@ -141,7 +141,7 @@ recursiveData.foo = recursiveData;
Object.freeze(recursiveData);
const modifierWithRecursiveData = Object.freeze({
supportedMethods: validMethodBasicCard,
supportedMethods: "basic-card",
total: validTotal,
data: recursiveData,
});
@ -186,7 +186,7 @@ function testBadUpdate(button, badDetails, expectedError, errorCode) {
<ol>
<li>
<button onclick="
const rejectedPromise = Promise.reject(new SyntaxError('test')).catch(err => err);
const rejectedPromise = Promise.reject(new SyntaxError('test'));
testBadUpdate(this, rejectedPromise, 'AbortError');
">
Rejection of detailsPromise must abort the update with an "AbortError" DOMException.

View file

@ -0,0 +1,167 @@
<!DOCTYPE HTML>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<style>
body {
user-select: none;
}
#green:hover {
background-color: red;
}
#blue:hover {
background-color: red;
}
#green {
background-color: green;
}
#blue {
background-color: blue;
}
div.box {
margin: 5px;
padding: 20px;
width: 50px;
height: 50px;
}
</style>
<body onload="run()">
<div id="green" class="box"></div>
<div id="blue" class="box"></div>
</body>
<script>
var receivedEventList = [];
var setcapture = "";
let testEventList = ['pointerup', 'pointerdown', 'pointermove', 'gotpointercapture', 'lostpointercapture', "pointerover", "pointerout", "pointerleave", "pointerenter"];
testEventList.forEach(function(eventName) {
green.addEventListener(eventName, logEvent);
blue.addEventListener(eventName, logEvent);
});
function logEvent(event) {
receivedEventList.push(event.target.id + " received " + event.type)
}
function setCaptureGreen(event) {
green.setPointerCapture(event.pointerId);
}
function setCaptureBlue(event) {
blue.setPointerCapture(event.pointerId);
}
function releaseCapture(event) {
if (event.target.hasPointerCapture(event.pointerId)) {
event.target.releasePointerCapture(event.pointerId);
}
}
function run() {
promise_test (async() => {
// Move to (0, 0) to reset hovering.
await new test_driver.Actions().pointerMove(0, 0).send();
receivedEventList = [];
// pointerdown at green -> set capture to green -> green receive the following moves.
document.addEventListener("pointerdown", setCaptureGreen);
await new test_driver.Actions()
.pointerMove(25, 25, {origin: green})
.pointerDown()
.pointerMove(30, 30, {origin: green})
.pointerMove(25, 25, {origin: blue})
.send();
expectedEventList = ["green received pointerover",
"green received pointerenter",
"green received pointermove",
"green received pointerdown",
"green received gotpointercapture",
"green received pointermove",
"green received pointermove"];
assert_array_equals(receivedEventList, expectedEventList, "Received events: " + receivedEventList);
assert_equals(getComputedStyle(green).backgroundColor, "rgb(255, 0, 0)", "green should be red (hover).");
assert_equals(getComputedStyle(blue).backgroundColor, "rgb(0, 0, 255)", "blue should be blue.");
document.removeEventListener("pointerdown", setCaptureGreen);
// Release mouse button.
await new test_driver.Actions().pointerUp().send();
}, "Mouse down and capture to green.");
promise_test (async() => {
// Move to (0, 0) to reset hovering.
await new test_driver.Actions().pointerMove(0, 0).send();
receivedEventList = [];
// pointerdown at green -> set capture to blue -> blue receive the following moves.
document.addEventListener("pointerdown", setCaptureBlue);
await new test_driver.Actions()
.pointerMove(25, 25, {origin: green})
.pointerDown()
.pointerMove(30, 30, {origin: green})
.pointerMove(30, 30, {origin: green})
.send();
expectedEventList = ["green received pointerover",
"green received pointerenter",
"green received pointermove",
"green received pointerdown",
"green received pointerout",
"green received pointerleave",
"blue received pointerover",
"blue received pointerenter",
"blue received gotpointercapture",
"blue received pointermove",
"blue received pointermove"];
assert_array_equals(receivedEventList, expectedEventList, "Received events: " + receivedEventList);
assert_equals(getComputedStyle(green).backgroundColor, "rgb(0, 128, 0)", "green should be green.");
assert_equals(getComputedStyle(blue).backgroundColor, "rgb(255, 0, 0)", "blue should be red (hover).");
document.removeEventListener("pointerdown", setCaptureBlue);
// Release mouse button.
await new test_driver.Actions().pointerUp().send();
}, "Mouse down at green and capture to blue.");
promise_test (async() => {
// Move to (0, 0) to reset hovering.
await new test_driver.Actions().pointerMove(0, 0).send();
receivedEventList = [];
// pointerdown at green -> set capture to green -> green receive first move -> release capture -> blue receive the next move
green.addEventListener("pointerdown", setCaptureGreen);
green.addEventListener("pointermove", releaseCapture);
await new test_driver.Actions()
.pointerMove(25, 25, {origin: green})
.pointerDown()
.pointerMove(30, 30, {origin: blue})
.pointerMove(25, 25, {origin: blue})
.send();
expectedEventList = ["green received pointerover",
"green received pointerenter",
"green received pointermove",
"green received pointerdown",
"green received gotpointercapture",
"green received pointermove",
"green received lostpointercapture",
"green received pointerout",
"green received pointerleave",
"blue received pointerover",
"blue received pointerenter",
"blue received pointermove"]
assert_array_equals(receivedEventList, expectedEventList, "Received events: " + receivedEventList);
assert_equals(getComputedStyle(green).backgroundColor, "rgb(0, 128, 0)", "green should be green.");
assert_equals(getComputedStyle(blue).backgroundColor, "rgb(255, 0, 0)", "blue should be red (hover).");
green.removeEventListener("pointerdown", setCaptureBlue);
green.removeEventListener("pointermove", releaseCapture);
// Release mouse button.
await new test_driver.Actions().pointerUp().send();
}, "Mouse down and capture to green, move to blue and release capture");
}
</script>

View file

@ -0,0 +1,143 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<style>
iframe {
width: 300px;
height: 300px;
top: 100px;
left: 100px;
border: 0;
position: absolute;
background: green;
}
#outerFrame {
width: 500px;
height: 500px;
background: blue;
}
</style>
<body id="outerFrame body" onload="run()">
<div id='outerFrame'>
<iframe id='innerFrameElement' src="resources/pointerevent_mouse_pointercapture-iframe.html"></iframe>
</div>
</body>
<script>
var receivedEventList = [];
function handleEvent(event) {
receivedEventList.push(event.target.id + ' received ' + event.type);
if (event.type == 'pointerdown') {
if (document.setPointerCaptureOnPointerDown) {
event.target.setPointerCapture(event.pointerId);
}
}
if (event.type == "pointermove") {
if (document.releasePointerCaptureOnFirstMove && event.target.hasPointerCapture(event.pointerId))
event.target.releasePointerCapture(event.pointerId);
}
};
document.testEventList = ['pointerup', 'pointerdown', 'pointermove', 'gotpointercapture', 'lostpointercapture'];
document.testEventList.forEach(function(eventName) {
document.getElementById('outerFrame').addEventListener(eventName, handleEvent);
});
document.setPointerCaptureOnPointerDown = false;
document.releasePointerCaptureOnFirstMove = false;
function run() {
promise_test (async() => {
document.setPointerCaptureOnPointerDown = true;
receivedEventList = [];
expectedEventList = ["innerFrame received pointermove",
"innerFrame received pointerdown",
"innerFrame received gotpointercapture",
"innerFrame received pointermove",
"innerFrame received pointermove",
"innerFrame received pointerup",
"innerFrame received lostpointercapture"];
await new test_driver.Actions()
.pointerMove(200, 200)
.pointerDown()
.pointerMove(150, 150)
.pointerMove(50, 50)
.pointerUp()
.send();
assert_array_equals(receivedEventList, expectedEventList, "Received events: " + receivedEventList);
document.setPointerCaptureOnPointerDown = false;
}, "Test pointer capture event route across the same-origin frame: Mouse down at inner frame and set pointer capture.");
promise_test (async() => {
document.setPointerCaptureOnPointerDown = true;
receivedEventList = [];
expectedEventList = ["outerFrame received pointermove",
"outerFrame received pointerdown",
"outerFrame received gotpointercapture",
"outerFrame received pointermove",
"outerFrame received pointerup",
"outerFrame received lostpointercapture"];
await new test_driver.Actions()
.pointerMove(25, 25)
.pointerDown()
.pointerMove(200, 200)
.pointerUp()
.send();
assert_array_equals(receivedEventList, expectedEventList, "Received events: " + receivedEventList);
document.setPointerCaptureOnPointerDown = false;
}, "Test pointer capture event route across the same-origin frame: Mouse down at outer frame body and set pointer capture.");
promise_test (async() => {
document.setPointerCaptureOnPointerDown = true;
document.releasePointerCaptureOnFirstMove = true;
receivedEventList = [];
expectedEventList = ["innerFrame received pointermove",
"innerFrame received pointerdown",
"innerFrame received gotpointercapture",
"innerFrame received pointermove",
"innerFrame received lostpointercapture",
"innerFrameDocument received pointermove",
"innerFrameDocument received pointerup",];
await new test_driver.Actions()
.pointerMove(200, 200)
.pointerDown()
.pointerMove(150, 150)
.pointerMove(50, 50)
.pointerUp()
.send();
assert_array_equals(receivedEventList, expectedEventList, "Received events: " + receivedEventList);
document.releasePointerCaptureOnFirstMove = false;
document.setPointerCaptureOnPointerDown = false;
}, "Test pointer capture event route across the same-origin frame: Mouse down with set capture at inner frame, then release on next mouse move.");
promise_test (async() => {
document.setPointerCaptureOnPointerDown = true;
document.releasePointerCaptureOnFirstMove = true;
receivedEventList = [];
expectedEventList = ["outerFrame received pointermove",
"outerFrame received pointerdown",
"outerFrame received gotpointercapture",
"outerFrame received pointermove",
"outerFrame received lostpointercapture",
"innerFrame received pointermove",
"innerFrame received pointerup"];
await new test_driver.Actions()
.pointerMove(50, 50)
.pointerDown()
.pointerMove(200, 200)
.pointerMove(250, 250)
.pointerUp()
.send();
assert_array_equals(receivedEventList, expectedEventList, "Received events: " + receivedEventList);
document.releasePointerCaptureOnFirstMove = false;
document.setPointerCaptureOnPointerDown = false;
}, "Test pointercapture event route across the same-origin frame: Mouse down with set capture at outer frame, then release on next mouse move.");
}
</script>

View file

@ -0,0 +1,55 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<style>
iframe {
width: 300px;
height: 300px;
top: 100px;
left: 50px;
border: 0;
position: absolute;
background: green;
}
#outerFrame {
width: 500px;
height: 500px;
background: blue;
}
</style>
<body onload="run()">
<div id='outerFrame'>
<iframe id='innerFrameElement' src="resources/pointerevent_mouse_pointercapture_inactivate_pointer-iframe.html"></iframe>
</div>
</body>
<script type="text/javascript">
var test_pointerEvent = async_test("setPointerCapture: outer frame capture pointer active in inner frame");
document.addEventListener("gotpointercapture", function(){
test_pointerEvent.step(function() {
assert_unreached("It should not be possible to capture mouse pointer when it's activate in inner frame");
});
})
function captureMousePointer(event) {
outerFrame.setPointerCapture(event.pointerId);
}
function finishTest() {
test_pointerEvent.done();
}
function run() {
new test_driver.Actions()
.pointerMove(200, 200)
.pointerDown()
.pointerMove(250, 250)
.pointerUp()
.send();
}
</script>
</html>

View file

@ -0,0 +1,9 @@
<html id='innerFrameDocument'>
<body id='innerFrame' style='height:500px; width: 500px; padding: 0; margin: 0;'>
<script>
top.document.testEventList.forEach(function(eventName) {
document.addEventListener(eventName, top.handleEvent);
});
</script>
</body>
</html>

View file

@ -0,0 +1,10 @@
<body id='innerFrame' style='height:500px; width: 500px; padding: 0; margin: 0;'>
<script>
document.addEventListener('pointerdown', function(event) {
top.captureMousePointer(event);
});
document.addEventListener('pointerup', function(event) {
top.finishTest();
});
</script>
</body>

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO - "Null" and opaque origin</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
const t = async_test("Test case-insensitive null TAO value with opaque origins");
window.addEventListener("message", t.step_func_done(e=>{
assert_equals(e.data, "PASS");
}));
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will fail when the value of Timing-Allow-Origin is a case-insensitive match to null and the origin is an opaque origin.</p>
<div id="log"></div>
<iframe id="frameContext"></iframe>
<script>
let frame_content = "data:text/html;utf8,<body>" +
"<script>" +
"const url = '{{location[scheme]}}://{{host}}:{{ports[http][1]}}/resource-timing/resources/TAOResponse.py?tao=Null';" +
"const observe = (list, observer) => {" +
" const entry = list.getEntries()[0];" +
" const sum = entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart +" +
" entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart + entry.transferSize +" +
" entry.encodedBodySize + entry.decodedBodySize;" +
" const result = sum == 0 ? 'PASS' : 'FAIL';" +
" window.parent.postMessage(result, '*');" +
"};" +
"let observer = new PerformanceObserver(observe);" +
"observer.observe({ entryTypes: ['resource'] });" +
"fetch(url);" +
"</" + "script></body>";
document.getElementById("frameContext").src = frame_content;
</script>
</body>
</html>

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Resource Timing TAO - "null" and opaque origin</title>
<link rel="author" title="Google" href="http://www.google.com/" />
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#timing-allow-origin"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
const t = async_test("Test null TAO value with opaque origins");
window.addEventListener("message", t.step_func_done(e=>{
assert_equals(e.data, "PASS");
}));
</script>
</head>
<body>
<h1>Description</h1>
<p>This test validates that for a cross origin resource, the timing allow check algorithm will succeed when the value of Timing-Allow-Origin is null and the origin is an opaque origin.</p>
<div id="log"></div>
<iframe id="frameContext"></iframe>
<script>
let frame_content = "data:text/html;utf8,<body>" +
"<script>" +
"const url = '{{location[scheme]}}://{{host}}:{{ports[http][1]}}/resource-timing/resources/TAOResponse.py?tao=null';" +
"const observe = (list, observer) => {" +
" const entry = list.getEntries()[0];" +
" const sum = entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart +" +
" entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart + entry.transferSize +" +
" entry.encodedBodySize + entry.decodedBodySize;" +
" const result = sum != 0 ? 'PASS' : 'FAIL';" +
" window.parent.postMessage(result, '*');" +
"};" +
"let observer = new PerformanceObserver(observe);" +
"observer.observe({ entryTypes: ['resource'] });" +
"fetch(url);" +
"</" + "script></body>";
document.getElementById("frameContext").src = frame_content;
</script>
</body>
</html>

View file

@ -11,8 +11,11 @@ def main(request, response):
# wildcard, pass
response.headers.set('Timing-Allow-Origin', '*')
elif tao == 'null':
# null, fail
# null, fail unless it's an opaque origin
response.headers.set('Timing-Allow-Origin', 'null')
elif tao == 'Null':
# case-insentive null, fail
response.headers.set('Timing-Allow-Origin', 'Null')
elif tao == 'origin':
# case-sensitive match for origin, pass
response.headers.set('Timing-Allow-Origin', origin)

View file

@ -44,6 +44,7 @@ test(() => {
const event = new SpeechSynthesisEvent("type", {utterance: utterance});
assert_equals(event.utterance, utterance);
assert_equals(event.charIndex, 0);
assert_equals(event.charLength, 0);
assert_equals(event.elapsedTime, 0);
assert_equals(event.name, "");
}, "SpeechSynthesisEvent with eventInitDict having an utterance");
@ -53,6 +54,7 @@ test(() => {
const event = new SpeechSynthesisEvent("type", {
utterance: utterance,
charIndex: 5,
charLength: 3,
elapsedTime: 100,
name: "foo"
});
@ -61,6 +63,7 @@ test(() => {
assert_equals(event.type, "type");
assert_equals(event.utterance, utterance);
assert_equals(event.charIndex, 5);
assert_equals(event.charLength, 3);
assert_equals(event.elapsedTime, 100);
assert_equals(event.name, "foo");
}, "SpeechSynthesisEvent with custom eventInitDict");

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>Text: Text Anchor — 001</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: FreeSans;
src: url("fonts/FreeSans.woff") format("woff"),
local("FreeSans");
}
text { font-family: FreeSans, sans-serif }
</style>
<style id="test-style" type="text/css">
/* Style that is being tested (if needed). */
text { font-family: FreeSans, sans-serif }
</style>
<g id="test-body-reference" style="font-size:16px">
<g transform="translate(0,0)">
<text x="80" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,60)">
<text x="48" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,120)">
<text x="16" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>Text: Text Anchor — 001</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
<html:link rel="help"
href="https://svgwg.org/svg2-draft/text.html#TextAnchoringProperties"/>
<html:link rel="match" href="text-text-anchor-001-ref.svg" />
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: FreeSans;
src: url("fonts/FreeSans.woff") format("woff"),
local("FreeSans");
}
text { font-family: FreeSans, sans-serif }
</style>
<style id="test-style" type="text/css">
/* Style that is being tested (if needed). */
text { font-family: FreeSans, sans-serif }
</style>
<!-- TEMP -->
<g id="test-body-reference" style="font-size:16px;fill:red">
<g transform="translate(0,0)">
<circle cx="80" cy="114.8" r="2" style="fill:red"/>
<text x="80" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,60)">
<circle cx="240" cy="114.8" r="2" style="fill:red"/>
<text x="48" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,120)">
<circle cx="400" cy="114.8" r="2" style="fill:red"/>
<text x="17" y="114.8">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px">
<g transform="translate(0,0)">
<text x="80" y="114.8" style="text-anchor:start">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,60)">
<text x="240" y="114.8" style="text-anchor:middle">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
<g transform="translate(0,120)">
<text x="400" y="114.8" style="text-anchor:end">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<svg id="svg-root"
width="100%" height="100%" viewBox="0 0 480 360"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/1999/xhtml">
<g id="testmeta">
<title>Text: Text Anchor — 002</title>
<html:link rel="author"
title="Tavmjong Bah"
href="mailto:tavmjong@free.fr"/>
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: FreeSans;
src: url("fonts/FreeSans.woff") format("woff"),
local("FreeSans");
}
text { font-family: FreeSans, sans-serif }
</style>
<style id="test-style" type="text/css">
/* Style that is being tested (if needed). */
text { font-family: FreeSans, sans-serif }
</style>
<g id="test-body-reference" style="font-size:16px">
<g transform="translate(0,0)">
<text transform="translate(250,10) rotate(90)">
<tspan x="90" y="114.8">Lorem ipsum dolor sit amet,</tspan>
</text>
</g>
<g transform="translate(80,0)">
<text transform="translate(250,-40) rotate(90)" style="text-anchor:middle">
<tspan x="240" y="114.8">Lorem ipsum dolor sit amet,</tspan>
</text>
</g>
<g transform="translate(160,0)">
<text transform="translate(250,-90) rotate(90)" style="text-anchor:end">
<tspan x="390" y="114.8">Lorem ipsum dolor sit amet,</tspan>
</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

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