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

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

View file

@ -0,0 +1,65 @@
<?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"/>
<html:link rel="help"
href="https://svgwg.org/svg2-draft/text.html#TextAnchoringProperties"/>
<html:link rel="match" href="text-text-anchor-002-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>
<g id="test-body-reference" style="font-size:16px;fill:red">
<g transform="translate(0,0)">
<circle cx="140" cy="100" r="2" style="fill:red"/>
<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)">
<circle cx="140" cy="200" r="2" style="fill:red"/>
<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)">
<circle cx="140" cy="300" r="2" style="fill:red"/>
<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>
<g id="test-body-content" style="font-size:16px;writing-mode:tb-rl">
<g transform="translate(0,0)">
<text x="140" y="100" style="text-anchor:start">Lorem ipsum dolor sit amet,</text>
</g>
<g transform="translate(80,0)">
<text x="140" y="200" style="text-anchor:middle">Lorem ipsum dolor sit amet,</text>
</g>
<g transform="translate(160,0)">
<text x="140" y="300" style="text-anchor:end">Lorem ipsum dolor sit amet,</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 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 — 003</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 style="text-anchor:end">
<tspan x="400" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
<g transform="translate(0,60)">
<text style="text-anchor:middle">
<tspan x="240" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
<g transform="translate(0,120)">
<text>
<tspan x="80" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1,66 @@
<?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 — 003</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-003-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="400" cy="114.8" r="2" style="fill:red"/>
<text style="text-anchor:end">
<tspan x="400" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
<g transform="translate(0,60)">
<circle cx="240" cy="114.8" r="2" style="fill:red"/>
<text style="text-anchor:middle">
<tspan x="240" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
<g transform="translate(0,120)">
<circle cx="80" cy="114.8" r="2" style="fill:red"/>
<text>
<tspan x="80" y="114.8">لكن لا بد أن أوضح لك أن كل هذه الأفكار</tspan>
</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px;direction:rtl">
<g transform="translate(0,0)">
<text x="400" y="114.8" style="text-anchor:start">لكن لا بد أن أوضح لك أن كل هذه الأفكار</text>
</g>
<g transform="translate(0,60)">
<text x="240" y="114.8" style="text-anchor:middle">لكن لا بد أن أوضح لك أن كل هذه الأفكار</text>
</g>
<g transform="translate(0,120)">
<text x="80" y="114.8" style="text-anchor:end">لكن لا بد أن أوضح لك أن كل هذه الأفكار</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -0,0 +1,36 @@
<?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 — 102</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: IPAMincho;
src: url("fonts/IPAMincho.woff") format("woff"),
local("IPAMincho");
}
text { font-family: IPAMincho, sans-serif }
</style>
<g id="test-body-reference" style="font-size:16px">
<g transform="translate(0,0)">
<text x="132 132 132 132 132 132 132" y="114 130 146 162 178 194 210 ">千利奴流乎和加</text>
</g>
<g transform="translate(80,0)">
<text x="140" y="144" style="writing-mode:tb-rl">千利奴流乎和加</text>
</g>
<g transform="translate(160,0)">
<text x="140" y="188" style="writing-mode:tb-rl">千利奴流乎和加</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,54 @@
<?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 — 102</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-102-ref.svg" />
</g>
<style id="test-font" type="text/css">
/* Standard Font (if needed). */
@font-face {
font-family: IPAMincho;
src: url("fonts/IPaMincho.woff") format("woff"),
local("IPAMincho");
}
text { font-family: IPAMincho, sans-serif }
</style>
<g id="test-body-reference" style="font-size:16px;fill:red">
<g transform="translate(0,0)">
<circle cx="140" cy="100" r="2" style="fill:red"/>
<text x="132 132 132 132 132 132 132" y="114 130 146 162 178 194 210 ">千利奴流乎和加</text>
</g>
<g transform="translate(80,0)">
<circle cx="140" cy="200" r="2" style="fill:red"/>
<text x="140" y="144" style="writing-mode:tb-rl">千利奴流乎和加</text>
</g>
<g transform="translate(160,0)">
<circle cx="140" cy="300" r="2" style="fill:red"/>
<text x="140" y="188" style="writing-mode:tb-rl">千利奴流乎和加</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px;writing-mode:tb-rl">
<g transform="translate(0,0)">
<text x="140" y="100" style="text-anchor:start">千利奴流乎和加</text>
</g>
<g transform="translate(80,0)">
<text x="140" y="200" style="text-anchor:middle">千利奴流乎和加</text>
</g>
<g transform="translate(160,0)">
<text x="140" y="300" style="text-anchor:end">千利奴流乎和加</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

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 — 201</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="200" y="114.8">Lorem ipsum dolor</text>
</g>
<g transform="translate(0,60)">
<text x="200" y="114.8" style="text-anchor:middle">sit amet, consectetur</text>
</g>
<g transform="translate(0,120)">
<text x="200" y="114.8" style="text-anchor:end">adipisicing elit,</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,56 @@
<?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 — 201</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-201-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="200" cy="114.8" r="2" style="fill:red"/>
<text x="200" y="114.8">Lorem ipsum dolor</text>
</g>
<g transform="translate(0,60)">
<circle cx="200" cy="114.8" r="2" style="fill:red"/>
<text x="200" y="114.8" style="text-anchor:middle">sit amet, consectetur</text>
</g>
<g transform="translate(0,120)">
<circle cx="200" cy="114.8" r="2" style="fill:red"/>
<text x="200" y="114.8" style="text-anchor:end">adipisicing elit,</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px">
<text>
<tspan x="200" y="114.8" style="text-anchor:start">Lorem ipsum dolor</tspan>
<tspan x="200" y="174.8" style="text-anchor:middle">sit amet, consectetur</tspan>
<tspan x="200" y="234.8" style="text-anchor:end">adipisicing elit,</tspan>
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

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 — 202</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;writing-mode:tb-rl">
<g transform="translate(0,0)">
<text x="140" y="200">Lorem ipsum dolor</text>
</g>
<g transform="translate(80,0)">
<text x="140" y="200" style="text-anchor:middle">sit amet, consectetur</text>
</g>
<g transform="translate(160,0)">
<text x="140" y="200" style="text-anchor:end">adipisicing elit,</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,56 @@
<?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 — 202</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-202-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;writing-mode:tb-rl;fill:red">
<g transform="translate(0,0)">
<circle cx="140" cy="200" r="2" style="fill:red"/>
<text x="140" y="200">Lorem ipsum dolor</text>
</g>
<g transform="translate(80,0)">
<circle cx="140" cy="200" r="2" style="fill:red"/>
<text x="140" y="200" style="text-anchor:middle">sit amet, consectetur</text>
</g>
<g transform="translate(160,0)">
<circle cx="140" cy="200" r="2" style="fill:red"/>
<text x="140" y="200" style="text-anchor:end">adipisicing elit,</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px;writing-mode:tb-rl">
<text>
<tspan x="140" y="200" style="text-anchor:start">Lorem ipsum dolor</tspan>
<tspan x="220" y="200" style="text-anchor:middle">sit amet, consectetur</tspan>
<tspan x="300" y="200" style="text-anchor:end">adipisicing elit,</tspan>
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 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 — 203</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 style="text-anchor:end">
<tspan x="200" y="114.8">لكن لا بد أن</tspan>
</text>
</g>
<g transform="translate(0,60)">
<text style="text-anchor:middle">
<tspan x="200" y="114.8" style="text-anchor:middle">أوضح لك أن</tspan>
</text>
</g>
<g transform="translate(0,120)">
<text>
<tspan x="200" y="114.8" style="text-anchor:start">كل هذه الأفكار</tspan>
</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,62 @@
<?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 — 203</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-003-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="200" cy="114.8" r="2" style="fill:red"/>
<text style="text-anchor:end">
<tspan x="200" y="114.8">لكن لا بد أن</tspan>
</text>
</g>
<g transform="translate(0,60)">
<circle cx="200" cy="114.8" r="2" style="fill:red"/>
<text style="text-anchor:middle">
<tspan x="200" y="114.8" style="text-anchor:middle">أوضح لك أن</tspan>
</text>
</g>
<g transform="translate(0,120)">
<circle cx="200" cy="114.8" r="2" style="fill:red"/>
<text>
<tspan x="200" y="114.8" style="text-anchor:start">كل هذه الأفكار</tspan>
</text>
</g>
</g>
<g id="test-body-content" style="font-size:16px;direction:rtl">
<text>
<tspan x="200" y="114.8" style="text-anchor:start">لكن لا بد أن</tspan>
<tspan x="200" y="174.8" style="text-anchor:middle">أوضح لك أن</tspan>
<tspan x="200" y="234.8" style="text-anchor:end">كل هذه الأفكار</tspan>
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -16,7 +16,7 @@ steps:
- template: install_safari.yml
- template: update_hosts.yml
- template: update_manifest.yml
- script: no_proxy='*' ./wpt run --yes --no-pause --no-fail-on-unexpected --no-restart-on-unexpected --affected ${{ parameters.affectedRange }} --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report.json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot.txt --channel preview safari
- script: no_proxy='*' ./wpt run --yes --no-pause --no-fail-on-unexpected --no-restart-on-unexpected --affected ${{ parameters.affectedRange }} --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report.json --channel preview safari
displayName: 'Run tests'
- task: PublishBuildArtifacts@1
displayName: 'Publish results'

View file

@ -39,18 +39,13 @@ class ManifestItem(object):
"""A unique identifier for the test"""
return (self.item_type, self.id)
def meta_key(self):
"""Extra metadata that doesn't form part of the test identity, but for
which changes mean regenerating the manifest (e.g. the test timeout)."""
return ()
def __eq__(self, other):
if not hasattr(other, "key"):
return False
return self.key() == other.key()
def __hash__(self):
return hash(self.key() + self.meta_key())
return hash(self.key())
def __repr__(self):
return "<%s.%s id=%s, path=%s>" % (self.__module__, self.__class__.__name__, self.id, self.path)
@ -137,12 +132,6 @@ class TestharnessTest(URLManifestItem):
# this branch should go when the manifest version is bumped
return self._source_file.script_metadata
def meta_key(self):
script_metadata = self.script_metadata
if script_metadata is not None:
script_metadata = tuple(tuple(x) for x in script_metadata)
return (self.timeout, self.testdriver, self.jsshell, script_metadata)
def to_json(self):
rv = super(TestharnessTest, self).to_json()
if self.timeout is not None:
@ -189,9 +178,6 @@ class RefTestBase(URLManifestItem):
for item in self._extras.get("fuzzy", [])}
return rv
def meta_key(self):
return (self.timeout, self.viewport_size, self.dpi)
def to_json(self):
rv = [self._url, self.references, {}]
extras = rv[-1]

View file

@ -162,6 +162,21 @@ class TypeData(object):
self.tests_root = tests_root
self.json_data = data
def to_json(self):
data = {
from_os_path(path):
[t for t in sorted(test.to_json() for test in tests)]
for path, tests in iteritems(self.data)
}
if self.json_data is not None:
if not data:
# avoid copying if there's nothing here yet
return self.json_data
data.update(self.json_data)
return data
def paths(self):
"""Get a list of all paths containing items of this type,
without actually constructing all the items"""
@ -363,11 +378,7 @@ class Manifest(object):
def to_json(self):
out_items = {
test_type: {
from_os_path(path):
[t for t in sorted(test.to_json() for test in tests)]
for path, tests in iteritems(type_paths)
}
test_type: type_paths.to_json()
for test_type, type_paths in iteritems(self._data) if type_paths
}
rv = {"url_base": self.url_base,

View file

@ -843,6 +843,8 @@ class SourceFile(object):
self.rel_path
)]
assert len(rv[1]) == len(set(rv[1]))
self.items_cache = rv
return rv

View file

@ -1,6 +1,6 @@
import pytest
from ..item import URLManifestItem, TestharnessTest
from ..item import URLManifestItem
@pytest.mark.parametrize("path", [
@ -39,28 +39,3 @@ def test_url_not_https(path):
m = URLManifestItem("/foobar", "/" + path, "/", "/foo.bar/" + path)
assert m.https is False
def test_testharness_meta_key_includes_jsshell():
a = TestharnessTest("/foobar", "/foo", "/foo.bar", "/foo.bar/foo",
jsshell=False, script_metadata=[])
b = TestharnessTest("/foobar", "/foo", "/foo.bar", "/foo.bar/foo",
jsshell=True, script_metadata=[])
assert a.meta_key() != b.meta_key()
@pytest.mark.parametrize("script_metadata", [
None,
[],
[('script', '/resources/WebIDLParser.js'), ('script', '/resources/idlharness.js')],
[[u'script', u'/resources/WebIDLParser.js'], [u'script', u'/resources/idlharness.js']],
])
def test_testharness_hashable_script_metadata(script_metadata):
a = TestharnessTest("/",
"BackgroundSync/interfaces.https.any.js",
"/",
"/BackgroundSync/interfaces.https.any.js",
script_metadata=script_metadata)
assert hash(a) is not None

View file

@ -69,25 +69,23 @@ class Git(object):
manifest_path=manifest_path, rebuild=rebuild)
def _local_changes(self):
changes = {}
"""get a set of files which have changed between HEAD and working copy"""
changes = set()
cmd = ["status", "-z", "--ignore-submodules=all"]
data = self.git(*cmd)
if data == "":
return changes
rename_data = None
for entry in data.split("\0")[:-1]:
if rename_data is not None:
status, rel_path = entry.split(" ")
if status[0] == "R":
rename_data = (rel_path, status)
else:
changes[rel_path] = (status, None)
in_rename = False
for line in data.split(b"\0")[:-1]:
if in_rename:
changes.add(line)
in_rename = False
else:
rel_path = entry
changes[rel_path] = rename_data
rename_data = None
status = line[:2]
if b"R" in status or b"C" in status:
in_rename = True
changes.add(line[3:])
return changes
def _show_file(self, path):
@ -98,8 +96,8 @@ class Git(object):
cmd = ["ls-tree", "-r", "-z", "HEAD"]
local_changes = self._local_changes()
for result in self.git(*cmd).split("\0")[:-1]:
rel_path = result.split("\t")[-1]
hash = result.split()[2]
rel_path = result.rsplit("\t", 1)[-1]
hash = result.split(" ", 3)[2]
if rel_path in local_changes:
contents = self._show_file(rel_path)
else:

View file

@ -0,0 +1,16 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// https://w3c.github.io/wake-lock/
'use strict';
idl_test(
['wake-lock'],
['dom', 'html'],
idl_array => {
idl_array.add_objects({
WakeLock: ['new WakeLock("screen")']
});
}
);

View file

@ -1,31 +0,0 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// https://w3c.github.io/wake-lock/
'use strict';
promise_test(async () => {
const srcs = ['wake-lock', 'dom', 'html'];
const [wakelock, dom, html] = await Promise.all(
srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));
const idl_array = new IdlArray();
idl_array.add_idls(wakelock);
idl_array.add_dependency_idls(dom);
idl_array.add_dependency_idls(html);
try {
window.wakelock = await navigator.getWakeLock("screen");
window.request = window.wakelock.createRequest();
} catch (e) {
// Surfaced in idlharness.js's test_object below.
}
idl_array.add_objects({
Navigator: ['navigator'],
WakeLock: ['wakelock'],
WakeLockRequest: ['request']
});
idl_array.test();
}, 'Test IDL implementation of WakeLock API');

View file

@ -1,20 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Wake Lock API Test</title>
<link rel="help" href="https://w3c.github.io/wake-lock/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
assert_true("getWakeLock" in navigator, "Wake Lock API is present");
const wakeLock = await navigator.getWakeLock("screen");
const request = wakeLock.createRequest();
assert_true(wakeLock instanceof WakeLock, "wakeLock is a WakeLock");
assert_equals(typeof wakeLock.type, "string", "the type of wakeLock.type is string");
assert_equals(typeof wakeLock.active, "boolean", "the type of wakeLock.active is boolean");
assert_true(request instanceof WakeLockRequest, "request is a WakeLockRequest");
}, "Test that the Wake Lock API is correct");
</script>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>wake lock applicability test</title>
<link rel="help" href="https://w3c.github.io/wake-lock/#dfn-the-wake-lock-is-applicable">
<link rel="help" href="https://w3c.github.io/wake-lock/#dfn-applicable-wake-lock">
<meta name="flags" content="interact">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
@ -16,10 +16,14 @@
setup({ explicit_timeout: true });
promise_test(async t => {
const wakeLock = await navigator.getWakeLock("screen");
const request = wakeLock.createRequest();
const wakeLock = new WakeLock("screen");
const controller = new AbortController();
const signal = controller.signal;
await wakeLock.request({ signal });
assert_true(wakeLock.active, "the active is true when wake lock is acquired");
const eventWatcher = new EventWatcher(t, document, "visibilitychange")
const eventWatcher = new EventWatcher(t, document, "visibilitychange");
//lock screen to fire 'visibilitychange'
await eventWatcher.wait_for("visibilitychange");
@ -30,22 +34,26 @@ promise_test(async t => {
await eventWatcher.wait_for("visibilitychange");
assert_false(document.hidden, "document is visiable when screen is unlocked");
assert_true(wakeLock.active, "the screen wake lock is active when screen is switched on again");
request.cancel();
controller.abort();
}, "The screen wake lock isn't applicable after the screen is manually swiched off"
+ " by the user until it is switched on again.");
promise_test(async t => {
const wakeLock = await navigator.getWakeLock("system");
const request = wakeLock.createRequest();
const wakeLock = new WakeLock("system");
const controller = new AbortController();
const signal = controller.signal;
await wakeLock.request({ signal });
assert_true(wakeLock.active, "the active is true when wake lock is acquired");
const eventWatcher = new EventWatcher(t, document, "visibilitychange")
const eventWatcher = new EventWatcher(t, document, "visibilitychange");
//lock screen to fire 'visibilitychange'
await eventWatcher.wait_for("visibilitychange");
assert_true(document.hidden, "document is hidden when screen is locked");
assert_true(wakeLock.active, "the system wake lock is still active when screen is switched off");
request.cancel();
controller.abort();
}, "Manually switching off the screen will not affect the applicability of the system wake lock.");
</script>

View file

@ -1,20 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>no exception is thrown when invoking cancel() twice</title>
<link rel="help" href="https://w3c.github.io/wake-lock/#dom-wakelockrequest-cancel">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
const wakeLock = await navigator.getWakeLock("screen");
const request = wakeLock.createRequest();
assert_true(wakeLock.active, "the activate is true when wake lock is acquired");
request.cancel();
assert_false(wakeLock.active, "the activate is false when wake lock is released");
//If the cancel() method has already been invoked on this object,
//abort these steps, no error fired
request.cancel();
}, "no exception is thrown when invoking cancel() twice");
</script>

View file

@ -7,8 +7,12 @@
<script>
promise_test(async t => {
const wakeLock = await navigator.getWakeLock("screen");
const request = wakeLock.createRequest();
const wakeLock = new WakeLock("screen");
const controller = new AbortController();
const signal = controller.signal;
await wakeLock.request({ signal });
assert_true(wakeLock.active, "the active is true when wake lock is acquired");
const eventWatcher = new EventWatcher(t, document, "visibilitychange");
const win = window.open("about:blank", "_blank");
@ -21,7 +25,7 @@ promise_test(async t => {
await eventWatcher.wait_for("visibilitychange");
assert_false(document.hidden, "document is visiable when new window is closed");
assert_true(wakeLock.active, "the active is true when document regains visibility");
request.cancel();
controller.abort();
}, "Test that screen wake lock will not be actived in hidden document");
</script>

View file

@ -7,7 +7,7 @@
<script>
test(t => {
assert_false("getWakeLock" in navigator, "'getWakeLock' must not be exposed");
assert_false("WakeLock" in self, "'WakeLock' must not be exposed");
}, "Wake Lock API is not exposed in an insecure context");
</script>

View file

@ -8,18 +8,21 @@
<script>
promise_test(async t => {
const wakeLock = await navigator.getWakeLock("screen");
const wakeLock = new WakeLock("screen");
const eventWatcher = new EventWatcher(t, wakeLock, "activechange");
assert_false(wakeLock.active, "the active is false before wake lock is acquired");
let request = wakeLock.createRequest();
const controller = new AbortController();
const signal = controller.signal;
await wakeLock.request({ signal });
let evt1 = await eventWatcher.wait_for("activechange");
assert_true(evt1.isTrusted && !evt1.bubbles && !evt1.cancelable && evt1 instanceof Event, "a simple event is fired");
assert_equals(evt1.type, "activechange", "the event name is 'activechange'");
assert_equals(evt1.target, wakeLock, "event.target is WakeLock.");
assert_true(wakeLock.active, "the active is true when wake lock is acquired");
request.cancel();
controller.abort();
let evt2 = await eventWatcher.wait_for("activechange");
assert_true(evt2.isTrusted && !evt2.bubbles && !evt2.cancelable && evt2 instanceof Event, "a simple event is fired");
assert_false(wakeLock.active, "the active is false when wake lock is released");

View file

@ -1,13 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>navigator.getWakeLock() for the same Document always return same WakeLock promise</title>
<link rel="help" href="https://w3c.github.io/wake-lock/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
const wakeLock1 = await navigator.getWakeLock("screen");
const wakeLock2 = await navigator.getWakeLock("screen");
assert_equals(wakeLock1, wakeLock2);
}, "navigator.getWakeLock() for the same Document always return same WakeLock promise");
</script>

View file

@ -7,16 +7,18 @@
<body>
<script id="iframe" type="text/plain">
let iframeWakeLock, iframeRequest;
let iframeWakeLock;
const controller = new AbortController();
const signal = controller.signal;
window.onmessage = async message => {
switch(message.data) {
case "ACQUIRED":
iframeWakeLock = await navigator.getWakeLock("screen");
iframeRequest = iframeWakeLock.createRequest();
iframeWakeLock = new WakeLock("screen");
await iframeWakeLock.request({ signal });
parent.postMessage(iframeWakeLock.active, "*");
break;
case "RELEASED":
iframeRequest.cancel();
controller.abort();
parent.postMessage(iframeWakeLock.active, "*");
break;
default:
@ -49,7 +51,7 @@ function wait_for_message(iframe) {
}
promise_test(async t => {
const wakeLock = await navigator.getWakeLock("screen");
const wakeLock = await new WakeLock("screen");
const iframe = await load_iframe();
const eventWatcher = new EventWatcher(t, wakeLock, "activechange");

View file

@ -7,22 +7,32 @@
<script>
promise_test(async t => {
const wakeLock = await navigator.getWakeLock("screen");
test(() => {
const wakeLock = new WakeLock("screen");
assert_equals(wakeLock.type, "screen");
}, "Test that wakeLock.type is 'screen' when screen wake lock is invoked");
promise_test(async t => {
const wakeLock = await navigator.getWakeLock("system");
test(() => {
const wakeLock = new WakeLock("system");
assert_equals(wakeLock.type, "system");
}, "Test that wakeLock.type is 'system' when system wake lock is invoked");
promise_test(t => {
return promise_rejects(t, new TypeError(), navigator.getWakeLock());
test(() => {
assert_throws(new TypeError(), () => new WakeLock());
}, "'TypeError' is thrown when set an empty wake lock type");
promise_test(t => {
return promise_rejects(t, new TypeError(), navigator.getWakeLock("unsupported"));
}, "'TypeError' is thrown when set an unsupported wake lock type");
test(() => {
const invalidTypes = [
"invalid",
null,
123,
{},
"",
true
];
invalidTypes.map(invalidType => {
assert_throws(new TypeError(), () => new WakeLock(invalidType));
})
}, "'TypeError' is thrown when set an invalid wake lock type");
</script>

View file

@ -1,15 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>WakeLockRequest object is independent</title>
<link rel="help" href="https://w3c.github.io/wake-lock/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
const wakeLock1 = await navigator.getWakeLock("screen");
const wakeLock2 = await navigator.getWakeLock("screen");
const request1 = wakeLock1.createRequest();
const request2 = wakeLock2.createRequest();
assert_not_equals(request1, request2);
}, "Test that the WakeLockRequest object is independent.");
</script>

View file

@ -18,3 +18,33 @@ for (const [name, fn] of instanceTestFactory) {
verify(result.instance);
}, name);
}
promise_test(async () => {
const builder = new WasmModuleBuilder();
builder.addImportedGlobal("module", "global", kWasmI32);
const buffer = builder.toBuffer();
const response = new Response(buffer, { "headers": { "Content-Type": "application/wasm" } });
const order = [];
const imports = {
get module() {
order.push("module getter");
return {
get global() {
order.push("global getter");
return 0;
},
}
},
};
const expected = [
"module getter",
"global getter",
];
const p = WebAssembly.instantiateStreaming(response, imports);
assert_array_equals(order, []);
const result = await p;
assert_WebAssemblyInstantiatedSource(result, {});
assert_array_equals(order, expected);
}, "Synchronous options handling");

View file

@ -70,7 +70,7 @@ function assertWebNDEFMessagesEqual(a, b) {
function testNDEFMessage(pushedMessage, readOptions, desc) {
promise_test(async t => {
const writer = new NFCWriter();
const reader = new NFCReader();
const reader = new NFCReader(readOptions);
await writer.push(pushedMessage);
const readerWatcher = new EventWatcher(t, reader, ["reading", "error"]);
reader.start();

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