Commit 974d948a authored by Chromium WPT Sync's avatar Chromium WPT Sync Committed by Commit Bot

Import wpt@ff1ca2cdc345804c8c9a3b707479b9bcca1bdf01

Using wpt-import in Chromium cc4cd897.
With Chromium commits locally applied on WPT:
7dad0f17 "Added new Sec-Metadata Web Platform Tests."
3364c233 "[css-properties-values-api] Reify values from attributeStyleMap.get."


Build: https://ci.chromium.org/buildbot/chromium.infra.cron/wpt-importer/22692

Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md

Directory owners for changes in this CL:
jsbell@chromium.org:
  external/wpt/resources
timvolodine@chromium.org:
  external/wpt/battery-status

NOAUTOREVERT=true
TBR=lukebjerring

No-Export: true
Change-Id: I1e2e1f2c301da8d05d4c5aad485ea3a6e7c44d18
Reviewed-on: https://chromium-review.googlesource.com/1172444
Commit-Queue: Blink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Reviewed-by: default avatarBlink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582610}
parent ef2dc543
This is a testharness.js-based test.
FAIL idl_test setup promise_test: Unhandled rejection with value: object "Got an error before parsing any named definition: Unrecognised tokens, line 1 (tokens: "{\"error\": {\"message\"")
[
{
"type": "{",
"value": "{",
"trivia": ""
},
{
"type": "string",
"value": "\"error\"",
"trivia": ""
},
{
"type": ":",
"value": ":",
"trivia": ""
},
{
"type": "{",
"value": "{",
"trivia": " "
},
{
"type": "string",
"value": "\"message\"",
"trivia": ""
}
]"
Harness: the test ran to completion.
......@@ -6,7 +6,7 @@
'use strict';
idl_test(
['battery'],
['battery-status'],
['dom', 'html'],
async idl_array => {
idl_array.add_objects({
......
This is a testharness.js-based test.
FAIL beforeunload event is emitted synchronously assert_equals: invoked synchronously exactly once expected 1 but got 0
Harness: the test ran to completion.
<!DOCTYPE html>
<meta charset="utf-8">
<title>beforeunload event is emitted synchronously</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#the-event-handler-processing-algorithm">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
'use strict';
// "navigate a browsing context" synchronously calls "prompt to unload", which
// synchronously calls "dispatch an event".
async_test(function(t) {
var iframe = document.createElement('iframe');
iframe.onload = t.step_func(function() {
var callCount = 0;
iframe.contentWindow.onbeforeunload = function() {
callCount += 1;
};
iframe.contentWindow.location.href = '/common/blank.html';
assert_equals(callCount, 1, 'invoked synchronously exactly once');
t.done();
});
document.body.appendChild(iframe);
});
</script>
</body>
<!doctype html>
<html>
<head>
<title>Auxiliary Browing Contexts: window.opener setter</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/PrefixedLocalStorage.js"></script>
</head>
<body>
<div id="log"></div>
<script>
var prefixedLocalStorage;
setup(() => prefixedLocalStorage = new PrefixedLocalStorageTest());
async_test(t => {
t.add_cleanup(() => prefixedLocalStorage.cleanup());
prefixedLocalStorage.onSet('openerIsNull', t.step_func_done(e => {
assert_equals(e.newValue, 'true');
}));
window.open(prefixedLocalStorage.url('resources/opener-setter.html'),
'iShouldSetOpenerToNull');
}, 'Auxiliary browsing context created via `window.open` and setting `window.opener` to `null` should report `window.opener` `null`');
async_test(t => {
t.add_cleanup(() => prefixedLocalStorage.cleanup());
prefixedLocalStorage.onSet('openerIsTest', t.step_func_done(e => {
assert_equals(e.newValue, 'true');
}));
window.open(prefixedLocalStorage.url('resources/opener-setter.html'),
'iShouldSetOpenerToTest');
}, 'Auxiliary browsing context created via `window.open` and setting `window.opener` to `test` should report `test`');
</script>
</body>
</html>
<!doctype html>
<meta charset="utf-8">
<html>
<p>This window should set the window.opener attribute</p>
<script src="/common/PrefixedLocalStorage.js"></script>
<script>
var prefixedLocalStorage = new PrefixedLocalStorageResource({
close_on_cleanup: true
});
function checkOpener () {
if (window.name == 'iShouldSetOpenerToNull') {
window.opener = null;
return prefixedLocalStorage.setItem('openerIsNull', window.opener === null);
}
if (window.name == 'iShouldSetOpenerToTest') {
window.opener = 'test';
return prefixedLocalStorage.setItem('openerIsTest', window.opener === "test");
}
}
</script>
<body onload="checkOpener()">
</body>
</html>
// GENERATED CONTENT - DO NOT EDIT
// Content of this file was automatically extracted from the
// "Payment Request API" spec.
// See: https://w3c.github.io/payment-request/
// Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports)
// Source: Payment Request API (https://w3c.github.io/payment-request/)
[Constructor(sequence<PaymentMethodData> methodData, PaymentDetailsInit details, optional PaymentOptions options),
SecureContext, Exposed=Window]
......@@ -167,6 +167,8 @@ interface PaymentResponse : EventTarget {
dictionary PaymentValidationErrors {
PayerErrorFields payer;
AddressErrors shippingAddress;
DOMString error;
object paymentMethod;
};
dictionary PayerErrorFields {
......
// GENERATED CONTENT - DO NOT EDIT
// Content of this file was automatically extracted from the
// "Web Speech API" spec.
// See: https://w3c.github.io/speech-api/
// Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports)
// Source: Web Speech API (https://w3c.github.io/speech-api/)
[Exposed=Window, Constructor]
interface SpeechRecognition : EventTarget {
......@@ -157,6 +157,7 @@ enum SpeechSynthesisErrorCode {
"voice-unavailable",
"text-too-long",
"invalid-argument",
"not-allowed",
};
[Exposed=Window]
......
......@@ -3221,7 +3221,7 @@ function idl_test(srcs, deps, idl_setup_func) {
}
})
.catch(function(e) { setup_error = e || 'IDL setup failed.'; })
.finally(function () {
.then(function () {
var error = setup_error;
try {
idl_array.test(); // Test what we can.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment