Merge mozilla-central to autoland. a=merge CLOSED TREE

This commit is contained in:
Narcis Beleuzu 2018-08-10 19:06:15 +03:00
Родитель a6ac6f001a 088938b149
Коммит d9ee6ddde6
56 изменённых файлов: 1437 добавлений и 268 удалений

Просмотреть файл

@ -172,13 +172,8 @@ var AssociatedToNode = class {
return this.node.ownerGlobal;
}
/**
* nsIDOMWindowUtils for the window of this node.
*/
get _dwu() {
if (this.__dwu)
return this.__dwu;
return this.__dwu = this.window.windowUtils;
_getBoundsWithoutFlushing(element) {
return this.window.windowUtils.getBoundsWithoutFlushing(element);
}
/**
@ -423,8 +418,7 @@ var PanelMultiView = class extends AssociatedToNode {
this._panel.removeEventListener("popuphidden", this);
this.window.removeEventListener("keydown", this);
this.node = this._openPopupPromise = this._openPopupCancelCallback =
this._viewContainer = this._viewStack = this.__dwu =
this._transitionDetails = null;
this._viewContainer = this._viewStack = this._transitionDetails = null;
}
/**
@ -878,7 +872,7 @@ var PanelMultiView = class extends AssociatedToNode {
let header = viewNode.firstElementChild;
if (header && header.classList.contains("panel-header")) {
viewRect.height += await window.promiseDocumentFlushed(() => {
return this._dwu.getBoundsWithoutFlushing(header).height;
return this._getBoundsWithoutFlushing(header).height;
});
}
await nextPanelView.descriptionHeightWorkaround();
@ -892,7 +886,7 @@ var PanelMultiView = class extends AssociatedToNode {
await nextPanelView.descriptionHeightWorkaround();
viewRect = await window.promiseDocumentFlushed(() => {
return this._dwu.getBoundsWithoutFlushing(viewNode);
return this._getBoundsWithoutFlushing(viewNode);
});
// Bail out if the panel was closed in the meantime.
if (!nextPanelView.isOpenIn(this)) {
@ -1257,7 +1251,7 @@ var PanelView = class extends AssociatedToNode {
* navigation if the view is still open but is invisible.
*/
captureKnownSize() {
let rect = this._dwu.getBoundsWithoutFlushing(this.node);
let rect = this._getBoundsWithoutFlushing(this.node);
this.knownWidth = rect.width;
this.knownHeight = rect.height;
}
@ -1370,7 +1364,6 @@ var PanelView = class extends AssociatedToNode {
let navigableElements = Array.from(this.node.querySelectorAll(
":-moz-any(button,toolbarbutton,menulist,.text-link):not([disabled])"));
let dwu = this._dwu;
return this.__navigableElements = navigableElements.filter(element => {
// Set the "tabindex" attribute to make sure the element is focusable.
if (!element.hasAttribute("tabindex")) {
@ -1379,7 +1372,7 @@ var PanelView = class extends AssociatedToNode {
if (element.hasAttribute("disabled")) {
return false;
}
let bounds = dwu.getBoundsWithoutFlushing(element);
let bounds = this._getBoundsWithoutFlushing(element);
return bounds.width > 0 && bounds.height > 0;
});
}

Просмотреть файл

@ -361,6 +361,7 @@ this.commands = class extends ExtensionAPI {
onCommand: new EventManager({
context,
name: "commands.onCommand",
inputHandling: true,
register: fire => {
let listener = (eventName, commandName) => {
fire.async(commandName);

Просмотреть файл

@ -47,6 +47,7 @@ add_task(async function testSources() {
browser.pageAction.onClicked.addListener(() => request("bookmarks"));
browser.browserAction.onClicked.addListener(() => request("tabs"));
browser.commands.onCommand.addListener(() => request("downloads"));
browser.test.onMessage.addListener(msg => {
if (msg === "contextMenus.update") {
@ -123,9 +124,17 @@ add_task(async function testSources() {
browser_action: {default_title: "test"},
page_action: {default_title: "test"},
permissions: ["contextMenus"],
optional_permissions: ["bookmarks", "tabs", "webNavigation", "webRequest", "cookies"],
optional_permissions: ["bookmarks", "tabs", "webNavigation", "webRequest",
"cookies", "downloads"],
options_ui: {page: "options.html"},
content_security_policy: "script-src 'self' https://example.com; object-src 'none';",
commands: {
command: {
suggested_key: {
"default": "Alt+Shift+J",
},
},
},
},
useAddonManager: "temporary",
@ -178,6 +187,12 @@ add_task(async function testSources() {
EventUtils.synthesizeMouseAtCenter(items[0], {});
await check("context menu in onClicked");
EventUtils.synthesizeKey("j", {altKey: true, shiftKey: true});
promisePopupNotificationShown("addon-webext-permissions").then(panel => {
panel.button.click();
});
await check("commands shortcut");
promisePopupNotificationShown("addon-webext-permissions").then(panel => {
panel.button.click();
});

Просмотреть файл

@ -302,7 +302,13 @@ CustomElementRegistry::IsCustomElementEnabled(JSContext* aCx, JSObject* aObject)
return true;
}
return XRE_IsParentProcess() && nsContentUtils::AllowXULXBLForPrincipal(nsContentUtils::ObjectPrincipal(aObject));
if (!XRE_IsParentProcess()) {
return false;
}
nsIPrincipal* principal =
nsContentUtils::ObjectPrincipal(js::UncheckedUnwrap(aObject));
return nsContentUtils::AllowXULXBLForPrincipal(principal);
}
bool

Просмотреть файл

@ -3097,10 +3097,10 @@ nsContentUtils::ObjectPrincipal(JSObject* aObj)
JS::AssertObjectBelongsToCurrentThread(aObj);
#endif
// This is duplicated from nsScriptSecurityManager. We don't call through there
// because the API unnecessarily requires a JSContext for historical reasons.
JS::Compartment* compartment = js::GetObjectCompartment(aObj);
JSPrincipals* principals = JS_GetCompartmentPrincipals(compartment);
MOZ_DIAGNOSTIC_ASSERT(!js::IsCrossCompartmentWrapper(aObj));
JS::Realm* realm = js::GetNonCCWObjectRealm(aObj);
JSPrincipals* principals = JS::GetRealmPrincipals(realm);
return nsJSPrincipals::get(principals);
}

Просмотреть файл

@ -665,7 +665,9 @@ public:
static nsIPrincipal* SubjectPrincipal();
// Returns the prinipal of the given JS object. This may only be called on
// the main thread for objects from the main thread's JSRuntime.
// the main thread for objects from the main thread's JSRuntime. The object
// must not be a cross-compartment wrapper, because CCWs are not associated
// with a single realm.
static nsIPrincipal* ObjectPrincipal(JSObject* aObj);
static nsresult GenerateStateKey(nsIContent* aContent,

Просмотреть файл

@ -123,7 +123,7 @@ JSEventHandler::HandleEvent(Event* aEvent)
bool isChromeHandler =
isMainThread ?
nsContentUtils::ObjectPrincipal(
GetTypedEventHandler().Ptr()->CallbackPreserveColor()) ==
GetTypedEventHandler().Ptr()->CallbackGlobalOrNull()) ==
nsContentUtils::GetSystemPrincipal() :
mozilla::dom::IsCurrentThreadRunningChromeWorker();

Просмотреть файл

@ -9,6 +9,19 @@ function Baguette(calories) {
this.calories = calories;
}
// Ensure the baseline compiler sync's before the postbarrier.
(function() {
wasmEvalText(`(module
(global (mut anyref) (ref.null anyref))
(func (export "f")
get_global 0
ref.null anyref
set_global 0
set_global 0
)
)`).exports.f();
})();
let exportsPlain = wasmEvalText(`(module
(global i32 (i32.const 42))
(global $g (mut anyref) (ref.null anyref))

Просмотреть файл

@ -5668,6 +5668,10 @@ class BaseCompiler final : public BaseCompilerInterface
void emitPostBarrier(const Maybe<RegPtr>& object, RegPtr otherScratch, RegPtr valueAddr, RegPtr setValue) {
Label skipBarrier;
// One of the branches (in case we need the C++ call) will cause a sync,
// so ensure the stack is sync'd before, so that the join is sync'd too.
sync();
// If the pointer being stored is null, no barrier.
masm.branchTestPtr(Assembler::Zero, setValue, setValue, &skipBarrier);

Просмотреть файл

@ -833,8 +833,8 @@ public:
nsIPrincipal*
GetPrincipal() const {
JS::Compartment* c = js::GetObjectCompartment(mGlobalJSObject);
return nsJSPrincipals::get(JS_GetCompartmentPrincipals(c));
JS::Realm* r = js::GetNonCCWObjectRealm(mGlobalJSObject);
return nsJSPrincipals::get(JS::GetRealmPrincipals(r));
}
JSObject*
@ -3066,6 +3066,8 @@ bool IsOutObject(JSContext* cx, JSObject* obj);
nsresult HasInstance(JSContext* cx, JS::HandleObject objArg, const nsID* iid, bool* bp);
// Returns the principal associated with |obj|'s realm. The object must not be a
// cross-compartment wrapper.
nsIPrincipal* GetObjectPrincipal(JSObject* obj);
// Attempt to clean up the passed in value pointer. The pointer `value` must be

Просмотреть файл

@ -45,7 +45,7 @@ GetRealmPrincipal(JS::Realm* realm)
nsIPrincipal*
GetObjectPrincipal(JSObject* obj)
{
return GetCompartmentPrincipal(js::GetObjectCompartment(obj));
return GetRealmPrincipal(js::GetNonCCWObjectRealm(obj));
}
// Does the principal of compartment a subsume the principal of compartment b?
@ -106,12 +106,6 @@ AccessCheck::isChrome(JSObject* obj)
return isChrome(js::GetObjectCompartment(obj));
}
nsIPrincipal*
AccessCheck::getPrincipal(JS::Compartment* compartment)
{
return GetCompartmentPrincipal(compartment);
}
// Hardcoded policy for cross origin property access. See the HTML5 Spec.
static bool
IsPermitted(CrossOriginObjectType type, JSFlatString* prop, bool set)

Просмотреть файл

@ -25,7 +25,6 @@ class AccessCheck {
JS::Compartment* b);
static bool isChrome(JS::Compartment* compartment);
static bool isChrome(JSObject* obj);
static nsIPrincipal* getPrincipal(JS::Compartment* compartment);
static bool isCrossOriginAccessPermitted(JSContext* cx, JS::HandleObject obj,
JS::HandleId id, js::Wrapper::Action act);
static bool checkPassToPrivilegedCode(JSContext* cx, JS::HandleObject wrapper,

Просмотреть файл

@ -1033,9 +1033,6 @@ case "$target" in
# warning insists on complaining about the latter case, which
# is annoying, and rather noisy.
CXXFLAGS="$CXXFLAGS -Wno-used-but-marked-unused"
# Work around until bug 1472254 is fixed.
CFLAGS="$CFLAGS -Wno-pragma-pack"
CXXFLAGS="$CXXFLAGS -Wno-pragma-pack"
fi
# make 'foo == bar;' error out
CFLAGS="$CFLAGS -we4553"

Просмотреть файл

@ -1 +1 @@
e2a0d66b122f
01d970fe9048

Просмотреть файл

@ -10,4 +10,3 @@
*/
#error "Do not include this header file."

Просмотреть файл

@ -1604,8 +1604,8 @@ nssCKFWSession_InitPIN(
NSS_EXTERN CK_RV
nssCKFWSession_SetPIN(
NSSCKFWSession *fwSession,
NSSItem *newPin,
NSSItem *oldPin);
const NSSItem *oldPin,
NSSItem *newPin);
/*
* nssCKFWSession_GetOperationStateLen

Просмотреть файл

@ -871,7 +871,7 @@ nssCKFWSession_InitPIN(
NSS_IMPLEMENT CK_RV
nssCKFWSession_SetPIN(
NSSCKFWSession *fwSession,
NSSItem *oldPin,
const NSSItem *oldPin,
NSSItem *newPin)
{
CK_RV error = CKR_OK;
@ -907,7 +907,7 @@ nssCKFWSession_SetPIN(
error = fwSession->mdSession->SetPIN(fwSession->mdSession, fwSession,
fwSession->mdToken, fwSession->fwToken, fwSession->mdInstance,
fwSession->fwInstance, oldPin, newPin);
fwSession->fwInstance, (NSSItem *)oldPin, newPin);
return error;
}

Просмотреть файл

@ -29,17 +29,17 @@ s_mpv_mul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
"1:\n"
"mov r4, #0\n"
"ldr r6, [%0], #4\n"
"umlal r5, r4, r6, %2\n"
"str r5, [%3], #4\n"
"umlal r5, r4, r6, %3\n"
"str r5, [%2], #4\n"
"mov r5, r4\n"
"subs %1, #1\n"
"bne 1b\n"
"2:\n"
"str r5, [%3]\n"
:
: "r"(a), "l"(a_len), "r"(b), "r"(c)
"str r5, [%2]\n"
: "+r"(a), "+l"(a_len), "+r"(c)
: "r"(b)
: "memory", "cc", "%r4", "%r5", "%r6");
}
@ -57,22 +57,22 @@ s_mpv_mul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
"1:\n"
"mov r4, #0\n"
"ldr r6, [%3]\n"
"ldr r6, [%2]\n"
"adds r5, r6\n"
"adc r4, r4, #0\n"
"ldr r6, [%0], #4\n"
"umlal r5, r4, r6, %2\n"
"str r5, [%3], #4\n"
"umlal r5, r4, r6, %3\n"
"str r5, [%2], #4\n"
"mov r5, r4\n"
"subs %1, #1\n"
"bne 1b\n"
"2:\n"
"str r5, [%3]\n"
:
: "r"(a), "l"(a_len), "r"(b), "r"(c)
"str r5, [%2]\n"
: "+r"(a), "+l"(a_len), "+r"(c)
: "r"(b)
: "memory", "cc", "%r4", "%r5", "%r6");
}
@ -87,12 +87,12 @@ s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
"1:\n"
"mov r4, #0\n"
"ldr r6, [%3]\n"
"ldr r6, [%2]\n"
"adds r5, r6\n"
"adc r4, r4, #0\n"
"ldr r6, [%0], #4\n"
"umlal r5, r4, r6, %2\n"
"str r5, [%3], #4\n"
"umlal r5, r4, r6, %3\n"
"str r5, [%2], #4\n"
"mov r5, r4\n"
"subs %1, #1\n"
@ -107,16 +107,16 @@ s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
"2:\n"
"mov r4, #0\n"
"ldr r6, [%3]\n"
"ldr r6, [%2]\n"
"adds r5, r6\n"
"adc r4, r4, #0\n"
"str r5, [%3], #4\n"
"str r5, [%2], #4\n"
"movs r5, r4\n"
"bne 2b\n"
"3:\n"
:
: "r"(a), "r"(a_len), "r"(b), "r"(c)
: "+r"(a), "+l"(a_len), "+r"(c)
: "r"(b)
: "memory", "cc", "%r4", "%r5", "%r6");
}
#endif
@ -167,8 +167,8 @@ s_mpv_sqr_add_prop(const mp_digit *pa, mp_size a_len, mp_digit *ps)
"bne 2b\n"
"3:"
: "+r"(pa), "+r"(a_len), "+r"(ps)
:
: "r"(pa), "r"(a_len), "r"(ps)
: "memory", "cc", "%r3", "%r4", "%r5", "%r6");
}
#endif

Просмотреть файл

@ -13,7 +13,10 @@
* though it's still needed. put in a central file to help merging..
*/
#if defined(_WIN32)
#if defined(_WIN32) || defined(_WINDOWS)
#ifdef __clang__
#pragma clang diagnostic ignored "-Wpragma-pack"
#endif
#ifdef _MSC_VER
#pragma warning(disable : 4103)
#endif

Просмотреть файл

@ -11,7 +11,10 @@
* reset any packing set by pkcs11p.h
*/
#if defined(_WIN32)
#if defined(_WIN32) || defined(_WINDOWS)
#ifdef __clang__
#pragma clang diagnostic ignored "-Wpragma-pack"
#endif
#ifdef _MSC_VER
#pragma warning(disable : 4103)
#endif

Просмотреть файл

@ -190387,6 +190387,21 @@
{}
]
],
".well-known/origin-policy/policy-csp-1": [
[
{}
]
],
".well-known/origin-policy/policy-csp-2": [
[
{}
]
],
".well-known/origin-policy/policy-noimg": [
[
{}
]
],
"2dcontext/2x2.png": [
[
{}
@ -288757,6 +288772,11 @@
{}
]
],
"interfaces/README.md": [
[
{}
]
],
"interfaces/ResizeObserver.idl": [
[
{}
@ -289247,6 +289267,11 @@
{}
]
],
"interfaces/speech-api.idl": [
[
{}
]
],
"interfaces/storage.idl": [
[
{}
@ -291107,6 +291132,16 @@
{}
]
],
"origin-policy/origin-policy-single-report.https.tentative.html.headers": [
[
{}
]
],
"origin-policy/sec-origin-policy-header.html.py": [
[
{}
]
],
"page-visibility/META.yml": [
[
{}
@ -329030,6 +329065,12 @@
{}
]
],
"css/css-grid/alignment/grid-content-alignment-second-pass-001.html": [
[
"/css/css-grid/alignment/grid-content-alignment-second-pass-001.html",
{}
]
],
"css/css-grid/alignment/grid-fit-content-tracks-dont-stretch-001.html": [
[
"/css/css-grid/alignment/grid-fit-content-tracks-dont-stretch-001.html",
@ -376710,6 +376751,18 @@
{}
]
],
"origin-policy/origin-policy-single-report.https.tentative.html": [
[
"/origin-policy/origin-policy-single-report.https.tentative.html",
{}
]
],
"origin-policy/origin-policy.https.tentative.html": [
[
"/origin-policy/origin-policy.https.tentative.html",
{}
]
],
"page-visibility/idlharness.window.js": [
[
"/page-visibility/idlharness.window.html",
@ -389312,6 +389365,12 @@
{}
]
],
"speech-api/idlharness.window.js": [
[
"/speech-api/idlharness.window.html",
{}
]
],
"storage/estimate-indexeddb-worker.https.html": [
[
"/storage/estimate-indexeddb-worker.https.html",
@ -421229,6 +421288,18 @@
"242b4ef56f60a3472899939426246e764e842a65",
"support"
],
".well-known/origin-policy/policy-csp-1": [
"adbfc362580842fa933bb136a9c66c9a913e6eb1",
"support"
],
".well-known/origin-policy/policy-csp-2": [
"e896da36303c72f1afa5ba2fdd0361e650f3125e",
"support"
],
".well-known/origin-policy/policy-noimg": [
"fce2d40c6e054b88938606ba9a28da94d308149a",
"support"
],
"2dcontext/2x2.png": [
"9be31562b3fccadab6d36d9e892713fd4db8d476",
"support"
@ -532473,6 +532544,10 @@
"3630eee37558bfa33c84b9c5ec467224b747edef",
"testharness"
],
"css/css-grid/alignment/grid-content-alignment-second-pass-001.html": [
"5b4bbabbb160079796aa4eb6786ea15383f6dd75",
"testharness"
],
"css/css-grid/alignment/grid-content-distribution-001.html": [
"7b53a2897b83d20ff7cd12db85f576830953b56e",
"reftest"
@ -604238,7 +604313,7 @@
"support"
],
"interfaces/FileAPI.idl": [
"690d777338f09507f18ba231c816c6f93a1666eb",
"42e51d01a247dba706805f7bfb8357ff89d4b4fb",
"support"
],
"interfaces/IndexedDB.idl": [
@ -604253,6 +604328,10 @@
"6895a5fc5674a099909a481a46726c990804fc61",
"support"
],
"interfaces/README.md": [
"024cd0885a67fca28f0f1a3d5a5c2df3ca4bd42d",
"support"
],
"interfaces/ResizeObserver.idl": [
"a75a11c965ceae6506732f95b278edb398e4d8ef",
"support"
@ -604282,7 +604361,7 @@
"support"
],
"interfaces/animation-worklet.idl": [
"762c443246747a523fdf0e6602ad58c9dc89ad45",
"e0f5fc2ec200c5204a6992fbbe4f168fa4fa3f78",
"support"
],
"interfaces/appmanifest.idl": [
@ -604298,7 +604377,7 @@
"support"
],
"interfaces/battery-status.idl": [
"1491d6429c50eabb8a611d98385cd0c26555f266",
"fca24cdbaed19290504480a182b2068d0970debd",
"support"
],
"interfaces/beacon.idl": [
@ -604486,7 +604565,7 @@
"support"
],
"interfaces/keyboard-map.idl": [
"e2f2c32736d03bbc1461a5aad661eede4069d77a",
"3d472361023292da922d2951095ab576b1c2d67b",
"support"
],
"interfaces/longtasks.idl": [
@ -604502,7 +604581,7 @@
"support"
],
"interfaces/media-source.idl": [
"6476794ede0c14df99bfed54f975f23ba1df97b8",
"5e9663a4d32e228a5905b4abcde0de03efa847d7",
"support"
],
"interfaces/mediacapture-depth.idl": [
@ -604514,7 +604593,7 @@
"support"
],
"interfaces/mediacapture-streams.idl": [
"1d2dd31ffb00afa527095278e40849f3fabf52a8",
"1d943eace26680b54c3407b47e185b40c5d5455b",
"support"
],
"interfaces/mediasession.idl": [
@ -604530,7 +604609,7 @@
"support"
],
"interfaces/netinfo.idl": [
"3e6212c3712fcbf525d1c9bbcd15b732cc4b2762",
"8fd0bba0490243e987709719031a2a3c6847b736",
"support"
],
"interfaces/notifications.idl": [
@ -604566,7 +604645,7 @@
"support"
],
"interfaces/performance-timeline.idl": [
"0eda1be96035a0ca44ec249fa6a4360f6b7439fe",
"0ff9cdc03854f2496078c668c84e5ded72002bc9",
"support"
],
"interfaces/permissions.idl": [
@ -604645,6 +604724,10 @@
"8f8009889d073109d39c1b00910f486f6aa579ff",
"support"
],
"interfaces/speech-api.idl": [
"5ffa04fc9686b5051e654d85dd9b5871031a65d0",
"support"
],
"interfaces/storage.idl": [
"33ce213b954154da7e93858ca0652003fbac2214",
"support"
@ -604714,7 +604797,7 @@
"support"
],
"interfaces/webmidi.idl": [
"eb7ed6befcc4d172254fc38357cb9c002db589d3",
"bc5c3b7924b56527fce3b9286dabcd95629f9328",
"support"
],
"interfaces/webrtc-stats.idl": [
@ -604722,7 +604805,7 @@
"support"
],
"interfaces/webrtc.idl": [
"8d949cabbdd3435729249dd45675ed1782b50d8b",
"2849a7d2b272d411dc0eddb134739e4f00ce05cc",
"support"
],
"interfaces/webusb.idl": [
@ -614833,6 +614916,22 @@
"74e360a041a90b8f72db5a88da150cf0e5fe6986",
"support"
],
"origin-policy/origin-policy-single-report.https.tentative.html": [
"24ee89990548ade02ff38ab4c87d873162a88613",
"testharness"
],
"origin-policy/origin-policy-single-report.https.tentative.html.headers": [
"cb596cf27571a57bc4826eee377fb73115f08cb7",
"support"
],
"origin-policy/origin-policy.https.tentative.html": [
"34a71fe40a192418a3f9a5792d7ee5fdecf970dd",
"testharness"
],
"origin-policy/sec-origin-policy-header.html.py": [
"8e62b6c2a635217b6fa02e049a68991a548c74ff",
"support"
],
"page-visibility/META.yml": [
"509936c371b7de3e7e0e5f7e41d10cffba9f5d2a",
"support"
@ -616338,7 +616437,7 @@
"support"
],
"priority-hints/META.yml": [
"22a350d70de951ec27c4f4f46f871de4606fb678",
"487b4013a02209cf35be8c9d5099c4d7842ba915",
"support"
],
"priority-hints/fetch-api-request.tentative.any.js": [
@ -630657,6 +630756,10 @@
"2fb0ccd4b905b4503f0affa4c8c7be3141871fe3",
"testharness"
],
"speech-api/idlharness.window.js": [
"2f9702878a3037c6a6e4df3d6d329827740bf41e",
"testharness"
],
"speech-api/webspeech.js": [
"93830e648b2e16e325295ec8cd5cd2db7f00baf0",
"support"
@ -643322,7 +643425,7 @@
"support"
],
"wasm/resources/service-worker.js": [
"bb0ec21cc570bef2ecc880d8a03cf88395a56b76",
"684eaf64878c22afc9ac877b79db7d26f14a3670",
"support"
],
"wasm/wasm_local_iframe_test.html": [
@ -643342,7 +643445,7 @@
"support"
],
"wasm/wasm_service_worker_test.https.html": [
"e350ed95eaff91ed982b28dada7a774675368adb",
"cced4b8f6ecdaa03c6d80793c2f3650b217452a5",
"testharness"
],
"web-animations/META.yml": [
@ -646406,7 +646509,7 @@
"testharness"
],
"webrtc/RTCRtpParameters-transactionId.html": [
"ac6f6d19556b8252097cb061b0639ae5bf1fd263",
"472b0439b5cc77d553b48000f6a7de3dda90b7d4",
"testharness"
],
"webrtc/RTCRtpReceiver-getCapabilities.html": [

Просмотреть файл

@ -0,0 +1,19 @@
[grid-content-alignment-second-pass-001.html]
[.grid 3]
expected: FAIL
[.grid 5]
expected: FAIL
[.grid 4]
expected: FAIL
[.grid 7]
expected: FAIL
[.grid 6]
expected: FAIL
[.grid 8]
expected: FAIL

Просмотреть файл

@ -1,3 +1,5 @@
prefs: [dom.animations-api.getAnimations.enabled:true]
[idlharness.html]
[CSSPseudoElementList interface: existence and properties of interface object]
expected: FAIL

Просмотреть файл

@ -1,2 +1,2 @@
local: 767d1527dae2e181dd52d3073b8e6ab488d09f66
upstream: 41c5a5ec588f4e0e7b31ee9964831712848d8b44
local: d3e0beb88df24f7f1d676f17d3feab171d9cea32
upstream: 9d6cc1e097031d1a2eda42b61a94e660be3ed5b0

Просмотреть файл

@ -1,5 +0,0 @@
[nav2_test_document_open.html]
[Navigation Timing 2 WPT]
expected:
if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL

Просмотреть файл

@ -0,0 +1,5 @@
[origin-policy-single-report.https.tentative.html]
expected: TIMEOUT
[Origin-Policy-based CSP violation should trigger 1 violation event]
expected: TIMEOUT

Просмотреть файл

@ -0,0 +1,22 @@
[origin-policy.https.tentative.html]
[The basics: A policy should have an effect..]
expected: FAIL
[The basics: A policy should stick.]
expected: FAIL
[Policy set, update, and delete.]
expected: FAIL
[Policy set-update-delete cycle with checks.]
expected: FAIL
[Policy set-update-delete cycle.]
expected: FAIL
[Policy re-set and re-delete.]
expected: FAIL
[Double Trouble]
expected: FAIL

Просмотреть файл

@ -1,7 +0,0 @@
[claim-with-redirect.https.html]
expected:
if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
[Claim works after redirection to another origin]
expected:
if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT

Просмотреть файл

@ -0,0 +1,397 @@
[idlharness.window.html]
[SpeechRecognition interface: operation start()]
expected: FAIL
[SpeechRecognitionResultList interface: existence and properties of interface object]
expected: FAIL
[SpeechRecognitionError interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[SpeechRecognitionAlternative interface: attribute transcript]
expected: FAIL
[SpeechRecognitionAlternative interface: attribute confidence]
expected: FAIL
[SpeechGrammarList interface: operation addFromURI(DOMString, float)]
expected: FAIL
[SpeechRecognitionEvent interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[SpeechRecognitionEvent interface: attribute interpretation]
expected: FAIL
[SpeechRecognition interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[SpeechRecognition interface: attribute onsoundend]
expected: FAIL
[SpeechRecognitionAlternative interface: existence and properties of interface object]
expected: FAIL
[SpeechRecognition interface: attribute interimResults]
expected: FAIL
[SpeechGrammarList interface: calling item(unsigned long) on new SpeechGrammarList() with too few arguments must throw TypeError]
expected: FAIL
[SpeechGrammar interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[SpeechGrammarList interface: attribute length]
expected: FAIL
[SpeechGrammarList interface: operation addFromString(DOMString, float)]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "grammars" with the proper type]
expected: FAIL
[SpeechGrammar interface object name]
expected: FAIL
[SpeechRecognitionEvent interface: attribute results]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "onend" with the proper type]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "onaudioend" with the proper type]
expected: FAIL
[SpeechRecognition interface: attribute onaudiostart]
expected: FAIL
[SpeechRecognitionResult interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[SpeechRecognitionResult interface: existence and properties of interface prototype object]
expected: FAIL
[SpeechRecognitionEvent interface: attribute resultIndex]
expected: FAIL
[SpeechGrammarList interface: existence and properties of interface object]
expected: FAIL
[SpeechGrammarList interface: calling addFromString(DOMString, float) on new SpeechGrammarList() with too few arguments must throw TypeError]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "onsoundstart" with the proper type]
expected: FAIL
[SpeechRecognitionAlternative interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[SpeechRecognitionResultList interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[SpeechRecognition interface: attribute onresult]
expected: FAIL
[SpeechRecognitionResult interface: attribute isFinal]
expected: FAIL
[SpeechRecognition interface: attribute onend]
expected: FAIL
[SpeechGrammar interface: attribute weight]
expected: FAIL
[SpeechRecognitionEvent interface: attribute emma]
expected: FAIL
[SpeechRecognition interface: attribute onspeechend]
expected: FAIL
[SpeechRecognition interface: attribute onerror]
expected: FAIL
[SpeechGrammar interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[SpeechRecognitionResultList interface: existence and properties of interface prototype object]
expected: FAIL
[SpeechRecognitionResultList interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[SpeechSynthesisErrorEvent interface object length]
expected: FAIL
[SpeechRecognitionResult interface object name]
expected: FAIL
[SpeechGrammar interface: new SpeechGrammar() must inherit property "src" with the proper type]
expected: FAIL
[SpeechGrammarList interface: new SpeechGrammarList() must inherit property "item(unsigned long)" with the proper type]
expected: FAIL
[SpeechRecognition interface object length]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "abort()" with the proper type]
expected: FAIL
[SpeechRecognitionEvent interface: existence and properties of interface prototype object]
expected: FAIL
[SpeechRecognitionResult interface: existence and properties of interface object]
expected: FAIL
[SpeechRecognitionResultList interface object length]
expected: FAIL
[SpeechRecognitionAlternative interface: existence and properties of interface prototype object]
expected: FAIL
[SpeechGrammarList interface: existence and properties of interface prototype object]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "start()" with the proper type]
expected: FAIL
[SpeechSynthesisEvent interface object length]
expected: FAIL
[SpeechRecognitionEvent interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[SpeechGrammarList interface: new SpeechGrammarList() must inherit property "length" with the proper type]
expected: FAIL
[SpeechRecognitionError interface: attribute message]
expected: FAIL
[SpeechRecognition interface: attribute onspeechstart]
expected: FAIL
[SpeechRecognitionEvent interface: existence and properties of interface object]
expected: FAIL
[SpeechRecognition interface: operation abort()]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "onsoundend" with the proper type]
expected: FAIL
[Stringification of new SpeechRecognition()]
expected: FAIL
[SpeechGrammarList interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[SpeechRecognition interface: attribute serviceURI]
expected: FAIL
[SpeechGrammarList interface object length]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "serviceURI" with the proper type]
expected: FAIL
[SpeechGrammarList interface: new SpeechGrammarList() must inherit property "addFromURI(DOMString, float)" with the proper type]
expected: FAIL
[SpeechRecognition interface: attribute maxAlternatives]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "onaudiostart" with the proper type]
expected: FAIL
[SpeechRecognitionError interface: existence and properties of interface object]
expected: FAIL
[SpeechRecognition interface: attribute continuous]
expected: FAIL
[SpeechGrammar must be primary interface of new SpeechGrammar()]
expected: FAIL
[SpeechRecognitionResultList interface: attribute length]
expected: FAIL
[SpeechRecognitionError interface: attribute error]
expected: FAIL
[SpeechRecognitionError interface: existence and properties of interface prototype object]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "interimResults" with the proper type]
expected: FAIL
[SpeechRecognition interface: attribute onstart]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "onstart" with the proper type]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "onspeechend" with the proper type]
expected: FAIL
[SpeechGrammarList interface: new SpeechGrammarList() must inherit property "addFromString(DOMString, float)" with the proper type]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "stop()" with the proper type]
expected: FAIL
[SpeechRecognitionError interface object name]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "onerror" with the proper type]
expected: FAIL
[Stringification of new SpeechGrammar()]
expected: FAIL
[SpeechRecognitionEvent interface object length]
expected: FAIL
[SpeechGrammar interface: existence and properties of interface prototype object]
expected: FAIL
[Stringification of new SpeechGrammarList()]
expected: FAIL
[SpeechGrammarList must be primary interface of new SpeechGrammarList()]
expected: FAIL
[SpeechRecognitionResult interface object length]
expected: FAIL
[SpeechRecognitionError interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[SpeechRecognitionResultList interface object name]
expected: FAIL
[SpeechRecognition interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[SpeechRecognition interface: existence and properties of interface object]
expected: FAIL
[SpeechRecognition interface: attribute grammars]
expected: FAIL
[SpeechRecognitionResultList interface: operation item(unsigned long)]
expected: FAIL
[SpeechRecognitionEvent interface object name]
expected: FAIL
[SpeechGrammar interface: attribute src]
expected: FAIL
[SpeechRecognitionResult interface: attribute length]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "onnomatch" with the proper type]
expected: FAIL
[SpeechRecognition must be primary interface of new SpeechRecognition()]
expected: FAIL
[SpeechRecognition interface: attribute onsoundstart]
expected: FAIL
[SpeechRecognitionAlternative interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[SpeechGrammarList interface object name]
expected: FAIL
[SpeechGrammar interface: existence and properties of interface object]
expected: FAIL
[SpeechRecognition interface: attribute onnomatch]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "onspeechstart" with the proper type]
expected: FAIL
[SpeechGrammar interface object length]
expected: FAIL
[SpeechRecognition interface: attribute lang]
expected: FAIL
[SpeechGrammar interface: new SpeechGrammar() must inherit property "weight" with the proper type]
expected: FAIL
[SpeechRecognition interface object name]
expected: FAIL
[SpeechRecognition interface: operation stop()]
expected: FAIL
[SpeechGrammarList interface: calling addFromURI(DOMString, float) on new SpeechGrammarList() with too few arguments must throw TypeError]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "continuous" with the proper type]
expected: FAIL
[SpeechRecognitionResult interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[SpeechRecognitionResult interface: operation item(unsigned long)]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "onresult" with the proper type]
expected: FAIL
[SpeechRecognitionAlternative interface object name]
expected: FAIL
[SpeechRecognition interface: existence and properties of interface prototype object]
expected: FAIL
[SpeechGrammarList interface: operation item(unsigned long)]
expected: FAIL
[SpeechRecognitionAlternative interface object length]
expected: FAIL
[SpeechRecognitionError interface object length]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "maxAlternatives" with the proper type]
expected: FAIL
[SpeechGrammarList interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[SpeechRecognition interface: attribute onaudioend]
expected: FAIL
[SpeechRecognition interface: new SpeechRecognition() must inherit property "lang" with the proper type]
expected: FAIL
[SpeechRecognitionErrorEvent interface object length]
expected: FAIL
[SpeechRecognitionErrorEvent interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[SpeechRecognitionErrorEvent interface: attribute message]
expected: FAIL
[SpeechRecognitionErrorEvent interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[SpeechRecognitionErrorEvent interface: existence and properties of interface object]
expected: FAIL
[SpeechRecognitionErrorEvent interface object name]
expected: FAIL
[SpeechRecognitionErrorEvent interface: existence and properties of interface prototype object]
expected: FAIL
[SpeechRecognitionErrorEvent interface: attribute error]
expected: FAIL

Просмотреть файл

@ -17,3 +17,6 @@
[setParameters() twice with the same parameters should reject with InvalidStateError]
expected: FAIL
[sender.setParameters() with transaction ID unset should reject with TypeError]
expected: FAIL

Просмотреть файл

@ -0,0 +1,3 @@
{
"content-security-policy": [{ "policy": "script-src 'self' 'unsafe-inline'" }]
}

Просмотреть файл

@ -0,0 +1,5 @@
{
"content-security-policy": [{
"policy": "script-src 'self' 'nonce-test'"
}]
}

Просмотреть файл

@ -0,0 +1,3 @@
{
"content-security-policy": [{ "policy": "img-src 'none'" }]
}

Просмотреть файл

@ -0,0 +1,65 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Content alignment second pass</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-align">
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#algo-overview">
<meta name="flags" content="ahem dom">
<meta name="assert" content="This test checks that content alignment is properly applied when the size of the tracks changes in the second pass of the track sizing algorithm.">
<link rel="stylesheet" href="../../support/grid.css">
<link rel="stylesheet" href="../../support/alignment.css">
<style>
.grid {
position: relative;
width: 100px;
height: 50px;
font: 25px/1 Ahem;
margin: 10px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onLoad="checkLayout('.grid');">
<div id="log"></div>
<div class="grid">
<div class="firstRowFirstColumn verticalLR" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="50">XX X</div>
</div>
<div class="grid contentStretch">
<div class="firstRowFirstColumn verticalLR" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="50">XX X</div>
</div>
<div class="grid contentStart">
<div class="firstRowFirstColumn verticalLR" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50">XX X</div>
</div>
<div class="grid contentCenter">
<div class="firstRowFirstColumn verticalLR" data-offset-x="25" data-offset-y="0" data-expected-width="50" data-expected-height="50">XX X</div>
</div>
<div class="grid contentEnd">
<div class="firstRowFirstColumn verticalLR" data-offset-x="50" data-offset-y="0" data-expected-width="50" data-expected-height="50">XX X</div>
</div>
<div class="grid contentSpaceBetween">
<div class="firstRowFirstColumn verticalLR" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50">XX X</div>
<div class="firstRowSecondColumn" data-offset-x="75" data-offset-y="0" data-expected-width="25" data-expected-height="50">X</div>
</div>
<div class="grid contentSpaceEvenly" style="width: 105px;">
<div class="firstRowFirstColumn verticalLR" data-offset-x="10" data-offset-y="0" data-expected-width="50" data-expected-height="50">XX X</div>
<div class="firstRowSecondColumn" data-offset-x="70" data-offset-y="0" data-expected-width="25" data-expected-height="50">X</div>
</div>
<div class="grid contentSpaceAround" style="width: 115px;">
<div class="firstRowFirstColumn verticalLR" data-offset-x="10" data-offset-y="0" data-expected-width="50" data-expected-height="50">XX X</div>
<div class="firstRowSecondColumn" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="50">X</div>
</div>
</body>

Просмотреть файл

@ -51,7 +51,7 @@ interface FileReader: EventTarget {
// async read methods
void readAsArrayBuffer(Blob blob);
void readAsBinaryString(Blob blob);
void readAsText(Blob blob, optional DOMString label);
void readAsText(Blob blob, optional DOMString encoding);
void readAsDataURL(Blob blob);
void abort();
@ -84,7 +84,7 @@ interface FileReaderSync {
ArrayBuffer readAsArrayBuffer(Blob blob);
DOMString readAsBinaryString(Blob blob);
DOMString readAsText(Blob blob, optional DOMString label);
DOMString readAsText(Blob blob, optional DOMString encoding);
DOMString readAsDataURL(Blob blob);
};

Просмотреть файл

@ -0,0 +1,5 @@
This directory contains [Web IDL](https://heycam.github.io/webidl/) interface definitions for use in idlharness.js tests.
The `.idl` files are extracted from specs by [Reffy](https://github.com/tidoust/reffy) into [reffy-reports](https://github.com/tidoust/reffy-reports), and then copied into this directory.
Automatically importing changes from reffy-reports is tracked by the [Auto-import IDL files](https://github.com/web-platform-tests/wpt/projects/1) project. Currently, it is only semi-automated, and not guaranteed to happen at any particular cadence. If you need to update an IDL file, please copy the file from [whatwg/idl/](https://github.com/tidoust/reffy-reports/tree/master/whatwg/idl) in reffy-reports.

Просмотреть файл

@ -22,7 +22,6 @@ interface WorkletAnimation : Animation {
readonly attribute DOMString animatorName;
};
interface WorkletGroupEffectReadOnly : GroupEffectReadOnly {};
interface WorkletGroupEffect : WorkletGroupEffectReadOnly {};

Просмотреть файл

@ -6,6 +6,7 @@
partial interface Navigator {
Promise<BatteryManager> getBattery();
};
[Exposed=Window]
interface BatteryManager : EventTarget {
readonly attribute boolean charging;

Просмотреть файл

@ -1,3 +1,9 @@
// GENERATED CONTENT - DO NOT EDIT
// Content of this file was automatically extracted from the
// "Keyboard Map" spec.
// See: https://wicg.github.io/keyboard-map/
[Exposed=Window]
partial interface Navigator {
[SecureContext, SameObject] readonly attribute Keyboard keyboard;
};

Просмотреть файл

@ -8,10 +8,12 @@ enum ReadyState {
"open",
"ended"
};
enum EndOfStreamError {
"network",
"decode"
};
[Constructor]
interface MediaSource : EventTarget {
readonly attribute SourceBufferList sourceBuffers;
@ -28,10 +30,12 @@ interface MediaSource : EventTarget {
void clearLiveSeekableRange();
static boolean isTypeSupported(DOMString type);
};
enum AppendMode {
"segments",
"sequence"
};
interface SourceBuffer : EventTarget {
attribute AppendMode mode;
readonly attribute boolean updating;
@ -51,22 +55,27 @@ interface SourceBuffer : EventTarget {
void abort();
void remove(double start, unrestricted double end);
};
interface SourceBufferList : EventTarget {
readonly attribute unsigned long length;
attribute EventHandler onaddsourcebuffer;
attribute EventHandler onremovesourcebuffer;
getter SourceBuffer (unsigned long index);
};
[Exposed=Window]
partial interface URL {
static DOMString createObjectURL(MediaSource mediaSource);
};
partial interface AudioTrack {
readonly attribute SourceBuffer? sourceBuffer;
};
partial interface VideoTrack {
readonly attribute SourceBuffer? sourceBuffer;
};
partial interface TextTrack {
readonly attribute SourceBuffer? sourceBuffer;
};

Просмотреть файл

@ -8,231 +8,263 @@
Constructor(MediaStream stream),
Constructor(sequence<MediaStreamTrack> tracks)]
interface MediaStream : EventTarget {
readonly attribute DOMString id;
readonly attribute DOMString id;
sequence<MediaStreamTrack> getAudioTracks();
sequence<MediaStreamTrack> getVideoTracks();
sequence<MediaStreamTrack> getTracks();
MediaStreamTrack? getTrackById(DOMString trackId);
void addTrack(MediaStreamTrack track);
void removeTrack(MediaStreamTrack track);
MediaStream clone();
readonly attribute boolean active;
attribute EventHandler onaddtrack;
attribute EventHandler onremovetrack;
MediaStreamTrack? getTrackById(DOMString trackId);
void addTrack(MediaStreamTrack track);
void removeTrack(MediaStreamTrack track);
MediaStream clone();
readonly attribute boolean active;
attribute EventHandler onaddtrack;
attribute EventHandler onremovetrack;
};
[Exposed=Window]
interface MediaStreamTrack : EventTarget {
readonly attribute DOMString kind;
readonly attribute DOMString id;
readonly attribute DOMString label;
attribute boolean enabled;
readonly attribute boolean muted;
attribute EventHandler onmute;
attribute EventHandler onunmute;
readonly attribute MediaStreamTrackState readyState;
attribute EventHandler onended;
MediaStreamTrack clone();
void stop();
readonly attribute DOMString kind;
readonly attribute DOMString id;
readonly attribute DOMString label;
attribute boolean enabled;
readonly attribute boolean muted;
attribute EventHandler onmute;
attribute EventHandler onunmute;
readonly attribute MediaStreamTrackState readyState;
attribute EventHandler onended;
MediaStreamTrack clone();
void stop();
MediaTrackCapabilities getCapabilities();
MediaTrackConstraints getConstraints();
MediaTrackSettings getSettings();
Promise<void> applyConstraints(optional MediaTrackConstraints constraints);
attribute EventHandler onoverconstrained;
MediaTrackConstraints getConstraints();
MediaTrackSettings getSettings();
Promise<void> applyConstraints(optional MediaTrackConstraints constraints);
attribute EventHandler onoverconstrained;
};
enum MediaStreamTrackState {
"live",
"ended"
};
dictionary MediaTrackSupportedConstraints {
boolean width = true;
boolean height = true;
boolean aspectRatio = true;
boolean frameRate = true;
boolean facingMode = true;
boolean resizeMode = true;
boolean volume = true;
boolean sampleRate = true;
boolean sampleSize = true;
boolean echoCancellation = true;
boolean autoGainControl = true;
boolean noiseSuppression = true;
boolean latency = true;
boolean channelCount = true;
boolean deviceId = true;
boolean groupId = true;
boolean width = true;
boolean height = true;
boolean aspectRatio = true;
boolean frameRate = true;
boolean facingMode = true;
boolean resizeMode = true;
boolean volume = true;
boolean sampleRate = true;
boolean sampleSize = true;
boolean echoCancellation = true;
boolean autoGainControl = true;
boolean noiseSuppression = true;
boolean latency = true;
boolean channelCount = true;
boolean deviceId = true;
boolean groupId = true;
};
dictionary MediaTrackCapabilities {
ULongRange width;
ULongRange height;
DoubleRange aspectRatio;
DoubleRange frameRate;
sequence<DOMString> facingMode;
sequence<DOMString> resizeMode;
DoubleRange volume;
ULongRange sampleRate;
ULongRange sampleSize;
sequence<boolean> echoCancellation;
sequence<boolean> autoGainControl;
sequence<boolean> noiseSuppression;
DoubleRange latency;
ULongRange channelCount;
DOMString deviceId;
DOMString groupId;
ULongRange width;
ULongRange height;
DoubleRange aspectRatio;
DoubleRange frameRate;
sequence<DOMString> facingMode;
sequence<DOMString> resizeMode;
DoubleRange volume;
ULongRange sampleRate;
ULongRange sampleSize;
sequence<boolean> echoCancellation;
sequence<boolean> autoGainControl;
sequence<boolean> noiseSuppression;
DoubleRange latency;
ULongRange channelCount;
DOMString deviceId;
DOMString groupId;
};
dictionary MediaTrackConstraints : MediaTrackConstraintSet {
sequence<MediaTrackConstraintSet> advanced;
sequence<MediaTrackConstraintSet> advanced;
};
dictionary MediaTrackConstraintSet {
ConstrainULong width;
ConstrainULong height;
ConstrainDouble aspectRatio;
ConstrainDouble frameRate;
ConstrainDOMString facingMode;
ConstrainDOMString resizeMode;
ConstrainDouble volume;
ConstrainULong sampleRate;
ConstrainULong sampleSize;
ConstrainBoolean echoCancellation;
ConstrainBoolean autoGainControl;
ConstrainBoolean noiseSuppression;
ConstrainDouble latency;
ConstrainULong channelCount;
ConstrainDOMString deviceId;
ConstrainDOMString groupId;
ConstrainULong width;
ConstrainULong height;
ConstrainDouble aspectRatio;
ConstrainDouble frameRate;
ConstrainDOMString facingMode;
ConstrainDOMString resizeMode;
ConstrainDouble volume;
ConstrainULong sampleRate;
ConstrainULong sampleSize;
ConstrainBoolean echoCancellation;
ConstrainBoolean autoGainControl;
ConstrainBoolean noiseSuppression;
ConstrainDouble latency;
ConstrainULong channelCount;
ConstrainDOMString deviceId;
ConstrainDOMString groupId;
};
dictionary MediaTrackSettings {
long width;
long height;
double aspectRatio;
double frameRate;
DOMString facingMode;
DOMString resizeMode;
double volume;
long sampleRate;
long sampleSize;
boolean echoCancellation;
boolean autoGainControl;
boolean noiseSuppression;
double latency;
long channelCount;
DOMString deviceId;
DOMString groupId;
long width;
long height;
double aspectRatio;
double frameRate;
DOMString facingMode;
DOMString resizeMode;
double volume;
long sampleRate;
long sampleSize;
boolean echoCancellation;
boolean autoGainControl;
boolean noiseSuppression;
double latency;
long channelCount;
DOMString deviceId;
DOMString groupId;
};
enum VideoFacingModeEnum {
"user",
"environment",
"left",
"right"
};
enum VideoResizeModeEnum {
"none",
"crop-and-scale"
};
[Exposed=Window,
Constructor(DOMString type, MediaStreamTrackEventInit eventInitDict)]
interface MediaStreamTrackEvent : Event {
[SameObject]
readonly attribute MediaStreamTrack track;
readonly attribute MediaStreamTrack track;
};
dictionary MediaStreamTrackEventInit : EventInit {
required MediaStreamTrack track;
};
[Exposed=Window,
Constructor(DOMString type, OverconstrainedErrorEventInit eventInitDict)]
interface OverconstrainedErrorEvent : Event {
readonly attribute OverconstrainedError? error;
readonly attribute OverconstrainedError? error;
};
dictionary OverconstrainedErrorEventInit : EventInit {
OverconstrainedError? error = null;
OverconstrainedError? error = null;
};
partial interface Navigator {
[SameObject]
readonly attribute MediaDevices mediaDevices;
readonly attribute MediaDevices mediaDevices;
};
[Exposed=Window]
interface MediaDevices : EventTarget {
attribute EventHandler ondevicechange;
attribute EventHandler ondevicechange;
Promise<sequence<MediaDeviceInfo>> enumerateDevices();
};
[Exposed=Window]
interface MediaDeviceInfo {
readonly attribute DOMString deviceId;
readonly attribute MediaDeviceKind kind;
readonly attribute DOMString label;
readonly attribute DOMString groupId;
readonly attribute DOMString deviceId;
readonly attribute MediaDeviceKind kind;
readonly attribute DOMString label;
readonly attribute DOMString groupId;
[Default] object toJSON();
};
enum MediaDeviceKind {
"audioinput",
"audiooutput",
"videoinput"
};
[Exposed=Window]
interface InputDeviceInfo : MediaDeviceInfo {
[Exposed=Window] interface InputDeviceInfo : MediaDeviceInfo {
MediaTrackCapabilities getCapabilities();
};
partial interface Navigator {
void getUserMedia(MediaStreamConstraints constraints,
NavigatorUserMediaSuccessCallback successCallback,
NavigatorUserMediaErrorCallback errorCallback);
void getUserMedia(MediaStreamConstraints constraints, NavigatorUserMediaSuccessCallback successCallback, NavigatorUserMediaErrorCallback errorCallback);
};
partial interface MediaDevices {
MediaTrackSupportedConstraints getSupportedConstraints();
Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints);
Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints);
};
dictionary MediaStreamConstraints {
(boolean or MediaTrackConstraints) video = false;
(boolean or MediaTrackConstraints) audio = false;
(boolean or MediaTrackConstraints) video = false;
(boolean or MediaTrackConstraints) audio = false;
};
callback NavigatorUserMediaSuccessCallback = void (MediaStream stream);
callback NavigatorUserMediaErrorCallback = void (MediaStreamError error);
typedef object MediaStreamError;
[NoInterfaceObject]
interface ConstrainablePattern {
Capabilities getCapabilities();
Constraints getConstraints();
Settings getSettings();
Capabilities getCapabilities();
Constraints getConstraints();
Settings getSettings();
Promise<void> applyConstraints(optional Constraints constraints);
attribute EventHandler onoverconstrained;
attribute EventHandler onoverconstrained;
};
dictionary DoubleRange {
double max;
double min;
double max;
double min;
};
dictionary ConstrainDoubleRange : DoubleRange {
double exact;
double ideal;
double exact;
double ideal;
};
dictionary ULongRange {
[Clamp]
unsigned long max;
[Clamp]
unsigned long min;
[Clamp] unsigned long max;
[Clamp] unsigned long min;
};
dictionary ConstrainULongRange : ULongRange {
[Clamp]
unsigned long exact;
[Clamp]
unsigned long ideal;
[Clamp] unsigned long exact;
[Clamp] unsigned long ideal;
};
dictionary ConstrainBooleanParameters {
boolean exact;
boolean ideal;
boolean exact;
boolean ideal;
};
dictionary ConstrainDOMStringParameters {
(DOMString or sequence<DOMString>) exact;
(DOMString or sequence<DOMString>) ideal;
(DOMString or sequence<DOMString>) exact;
(DOMString or sequence<DOMString>) ideal;
};
typedef ([Clamp] unsigned long or ConstrainULongRange) ConstrainULong;
typedef (double or ConstrainDoubleRange) ConstrainDouble;
typedef (boolean or ConstrainBooleanParameters) ConstrainBoolean;
typedef (DOMString or sequence<DOMString> or ConstrainDOMStringParameters) ConstrainDOMString;
dictionary Capabilities {
};
dictionary Settings {
};
dictionary ConstraintSet {
};
dictionary Constraints : ConstraintSet {
sequence<ConstraintSet> advanced;
sequence<ConstraintSet> advanced;
};

Просмотреть файл

@ -39,4 +39,7 @@ interface NetworkInformation : EventTarget {
readonly attribute Millisecond rtt;
readonly attribute boolean saveData;
attribute EventHandler onchange;
};typedef unrestricted double Megabit;typedef unsigned long long Millisecond;
};
typedef unrestricted double Megabit;
typedef unsigned long long Millisecond;

Просмотреть файл

@ -7,7 +7,8 @@ partial interface Performance {
PerformanceEntryList getEntries();
PerformanceEntryList getEntriesByType(DOMString type);
PerformanceEntryList getEntriesByName(DOMString name, optional DOMString type);
};typedef sequence<PerformanceEntry> PerformanceEntryList;
};
typedef sequence<PerformanceEntry> PerformanceEntryList;
[Exposed=(Window,Worker)]
interface PerformanceEntry {

Просмотреть файл

@ -0,0 +1,174 @@
// 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/
[Exposed=Window, Constructor]
interface SpeechRecognition : EventTarget {
// recognition parameters
attribute SpeechGrammarList grammars;
attribute DOMString lang;
attribute boolean continuous;
attribute boolean interimResults;
attribute unsigned long maxAlternatives;
attribute DOMString serviceURI;
// methods to drive the speech interaction
void start();
void stop();
void abort();
// event methods
attribute EventHandler onaudiostart;
attribute EventHandler onsoundstart;
attribute EventHandler onspeechstart;
attribute EventHandler onspeechend;
attribute EventHandler onsoundend;
attribute EventHandler onaudioend;
attribute EventHandler onresult;
attribute EventHandler onnomatch;
attribute EventHandler onerror;
attribute EventHandler onstart;
attribute EventHandler onend;
};
enum SpeechRecognitionErrorCode {
"no-speech",
"aborted",
"audio-capture",
"network",
"not-allowed",
"service-not-allowed",
"bad-grammar",
"language-not-supported"
};
[Exposed=Window]
interface SpeechRecognitionErrorEvent : Event {
readonly attribute SpeechRecognitionErrorCode error;
readonly attribute DOMString message;
};
// Item in N-best list
[Exposed=Window]
interface SpeechRecognitionAlternative {
readonly attribute DOMString transcript;
readonly attribute float confidence;
};
// A complete one-shot simple response
[Exposed=Window]
interface SpeechRecognitionResult {
readonly attribute unsigned long length;
getter SpeechRecognitionAlternative item(unsigned long index);
readonly attribute boolean isFinal;
};
// A collection of responses (used in continuous mode)
[Exposed=Window]
interface SpeechRecognitionResultList {
readonly attribute unsigned long length;
getter SpeechRecognitionResult item(unsigned long index);
};
// A full response, which could be interim or final, part of a continuous response or not
[Exposed=Window]
interface SpeechRecognitionEvent : Event {
readonly attribute unsigned long resultIndex;
readonly attribute SpeechRecognitionResultList results;
readonly attribute any interpretation;
readonly attribute Document? emma;
};
// The object representing a speech grammar
[Exposed=Window, Constructor]
interface SpeechGrammar {
attribute DOMString src;
attribute float weight;
};
// The object representing a speech grammar collection
[Exposed=Window, Constructor]
interface SpeechGrammarList {
readonly attribute unsigned long length;
getter SpeechGrammar item(unsigned long index);
void addFromURI(DOMString src,
optional float weight);
void addFromString(DOMString string,
optional float weight);
};
[Exposed=Window]
interface SpeechSynthesis : EventTarget {
readonly attribute boolean pending;
readonly attribute boolean speaking;
readonly attribute boolean paused;
attribute EventHandler onvoiceschanged;
void speak(SpeechSynthesisUtterance utterance);
void cancel();
void pause();
void resume();
sequence<SpeechSynthesisVoice> getVoices();
};
partial interface Window {
[SameObject] readonly attribute SpeechSynthesis speechSynthesis;
};
[Exposed=Window,
Constructor,
Constructor(DOMString text)]
interface SpeechSynthesisUtterance : EventTarget {
attribute DOMString text;
attribute DOMString lang;
attribute SpeechSynthesisVoice? voice;
attribute float volume;
attribute float rate;
attribute float pitch;
attribute EventHandler onstart;
attribute EventHandler onend;
attribute EventHandler onerror;
attribute EventHandler onpause;
attribute EventHandler onresume;
attribute EventHandler onmark;
attribute EventHandler onboundary;
};
[Exposed=Window]
interface SpeechSynthesisEvent : Event {
readonly attribute SpeechSynthesisUtterance utterance;
readonly attribute unsigned long charIndex;
readonly attribute float elapsedTime;
readonly attribute DOMString name;
};
enum SpeechSynthesisErrorCode {
"canceled",
"interrupted",
"audio-busy",
"audio-hardware",
"network",
"synthesis-unavailable",
"synthesis-failed",
"language-unavailable",
"voice-unavailable",
"text-too-long",
"invalid-argument",
};
[Exposed=Window]
interface SpeechSynthesisErrorEvent : SpeechSynthesisEvent {
readonly attribute SpeechSynthesisErrorCode error;
};
[Exposed=Window]
interface SpeechSynthesisVoice {
readonly attribute DOMString voiceURI;
readonly attribute DOMString name;
readonly attribute DOMString lang;
readonly attribute boolean localService;
readonly attribute boolean default;
};

Просмотреть файл

@ -4,67 +4,81 @@
// See: http://webaudio.github.io/web-midi-api/
partial interface Navigator {
Promise<MIDIAccess> requestMIDIAccess(optional MIDIOptions options);
Promise<MIDIAccess> requestMIDIAccess(optional MIDIOptions options);
};
dictionary MIDIOptions {
boolean sysex;
boolean software;
boolean sysex;
boolean software;
};
interface MIDIInputMap {
readonly maplike<DOMString, MIDIInput>;
readonly maplike<DOMString, MIDIInput>;
};
interface MIDIOutputMap {
readonly maplike<DOMString, MIDIOutput>;
readonly maplike<DOMString, MIDIOutput>;
};
interface MIDIAccess : EventTarget {
readonly attribute MIDIInputMap inputs;
readonly attribute MIDIOutputMap outputs;
attribute EventHandler onstatechange;
readonly attribute boolean sysexEnabled;
readonly attribute MIDIInputMap inputs;
readonly attribute MIDIOutputMap outputs;
attribute EventHandler onstatechange;
readonly attribute boolean sysexEnabled;
};
interface MIDIPort : EventTarget {
readonly attribute DOMString id;
readonly attribute DOMString? manufacturer;
readonly attribute DOMString? name;
readonly attribute MIDIPortType type;
readonly attribute DOMString? version;
readonly attribute MIDIPortDeviceState state;
readonly attribute MIDIPortConnectionState connection;
attribute EventHandler onstatechange;
Promise<MIDIPort> open();
Promise<MIDIPort> close();
readonly attribute DOMString id;
readonly attribute DOMString? manufacturer;
readonly attribute DOMString? name;
readonly attribute MIDIPortType type;
readonly attribute DOMString? version;
readonly attribute MIDIPortDeviceState state;
readonly attribute MIDIPortConnectionState connection;
attribute EventHandler onstatechange;
Promise<MIDIPort> open();
Promise<MIDIPort> close();
};
interface MIDIInput : MIDIPort {
attribute EventHandler onmidimessage;
attribute EventHandler onmidimessage;
};
interface MIDIOutput : MIDIPort {
void send(sequence<octet> data, optional DOMHighResTimeStamp timestamp = 0);
void clear();
void send(sequence<octet> data, optional DOMHighResTimeStamp timestamp = 0);
void clear();
};
enum MIDIPortType {
"input",
"output",
"input",
"output",
};
enum MIDIPortDeviceState {
"disconnected",
"connected",
"disconnected",
"connected",
};
enum MIDIPortConnectionState {
"open",
"closed",
"pending",
"open",
"closed",
"pending",
};
[Constructor(DOMString type, optional MIDIMessageEventInit eventInitDict)]
interface MIDIMessageEvent : Event {
readonly attribute Uint8Array data;
readonly attribute Uint8Array data;
};
dictionary MIDIMessageEventInit : EventInit {
Uint8Array data;
Uint8Array data;
};
[Constructor(DOMString type, optional MIDIConnectionEventInit eventInitDict)]
interface MIDIConnectionEvent : Event {
readonly attribute MIDIPort port;
readonly attribute MIDIPort port;
};
dictionary MIDIConnectionEventInit : EventInit {
MIDIPort port;
MIDIPort port;
};

Просмотреть файл

@ -587,7 +587,6 @@ partial interface RTCPeerConnection {
};
[Exposed=Window] interface RTCStatsReport {
readonly maplike<DOMString, object>;
};

Просмотреть файл

@ -0,0 +1,30 @@
<!DOCTYPE HTML>
<html>
<head>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
</head>
<body>
<iframe id=frame></iframe>
<script>
async_test(t => {
let violations = [];
window.addEventListener("message", (e) => {
violations.push(e);
t.step_timeout(() => {
assert_equals(violations.length, 1);
t.done();
});
});
let forbidden_image = "<img src=https://127.0.0.1:1234/bla.jpg>";
let event_bouncer = "<script>document.addEventListener(" +
"'securitypolicyviolation'," +
"(e) => window.parent.postMessage(e.blockedURI, '*'));</sc" +
"ript>";
document.getElementById("frame").src =
"data:text/html;charset=utf-8," + event_bouncer + forbidden_image;
}, "Origin-Policy-based CSP violation should trigger 1 violation event");
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1 @@
Sec-Origin-Policy: policy-noimg

Просмотреть файл

@ -0,0 +1,143 @@
<!DOCTYPE HTML>
<html>
<head>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
</head>
<body>
<div id=log></div>
<iframe id=frame></iframe>
<script>
// Navigate the frame to a test page with the given policy and wait for
// postMessage to arrive. Resolve the result promise with the message.
function navigate(policy) {
return new Promise(resolve => {
window.addEventListener("message", event => { resolve(event.data); },
{ once: true });
document.getElementById("frame").src =
"/origin-policy/sec-origin-policy-header.html.py?policy=" + policy;
});
}
// Check whether the message returned from the frame meets our expectations.
function expect(expect_script, expect_eval, message) {
assert_own_property(message, "inline_allowed");
assert_own_property(message, "eval_allowed");
assert_equals(message.inline_allowed, expect_script);
assert_equals(message.eval_allowed, expect_eval);
}
// Generate a more descriptive error message. Re-throw the error.
function descriptive_message(policy, expect_inline, expect_eval,
index, error) {
error.message = `Error occured on entry #${index + 1} ["${policy
}", ${expect_inline}, ${expect_eval}]: "${error}".`;
throw(error);
}
// Run the navigation + expectation checking for one test case line.
function test_case_entry([policy, expect_inline, expect_eval], index) {
return navigate(policy)
.then(message => expect(expect_inline, expect_eval, message))
// This catch handler merely logs a more friendly message,
// pointing you to the exact line of the failing test.
.catch(error => descriptive_message(policy, expect_inline,
expect_eval, index, error));
}
function origin_policy_csp_test_case(test_case_list) {
return t => {
// Setup the promise chain for the test.
let chain = Promise.resolve();
for ([index, val] of test_case_list.entries())
chain = chain.then(test_case_entry.bind(this, val, index));
// Delete the policy as the last element of the chain, on both
// resolve + reject paths, so that a left-over policy won't break
// subsequent tests.
return chain.then(() => navigate("0"),
(error) => { navigate("0"); throw error; });
}
}
// Sanity check: A request with no policy.
promise_test(origin_policy_csp_test_case([
["", true, true], // No policy.
]), "sanity check");
// Basic functionality. A policy should have an effect.
promise_test(origin_policy_csp_test_case([
["", true, true], // No policy.
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
["0", true, true], // Delete the policy again.
]), "The basics: A policy should have an effect..");
// Basic functionality. Set a policy. Make sure it "sticks".
promise_test(origin_policy_csp_test_case([
["", true, true], // No policy.
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
["", true, false], // No policy. Should remember p...-csp-1.
["0", true, true], // Delete the policy again.
]), "The basics: A policy should stick.");
// Set, update, and delete a policy.
promise_test(origin_policy_csp_test_case([
["", true, true],
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
["policy-csp-2", false, false], // policy-csp-2, forbids script + eval.
["0", true, true], // Delete the policy.
]), "Policy set, update, and delete.");
// Set, update, and delete a policy. Check on each step whether it 'sticks'.
promise_test(origin_policy_csp_test_case([
["", true, true],
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
["", true, false],
["policy-csp-2", false, false], // Forbid script + eval.
["", false, false],
["0", true, true], // Delete the policy.
["", true, true],
]), "Policy set-update-delete cycle with checks.");
// Set a policy, update, then revert to the old one.
promise_test(origin_policy_csp_test_case([
["", true, true],
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
["policy-csp-2", false, false], // Forbid script + eval.
["policy-csp-1", true, false], // policy-csp-1 again.
["0", true, true],
]), "Policy set-update-delete cycle.");
// Set, delete, re-set, and re-delete a policy.
promise_test(origin_policy_csp_test_case([
["", true, true], // No policy.
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
["", true, false],
["0", true, true], // Delete the policy.
["", true, true],
["policy-csp-1", true, false], // Set policy after policy was deleted.
["", true, false],
["0", true, true], // Delete the policy again.
["", true, true],
]), "Policy re-set and re-delete.");
// We've had some bugs with repeated policies being set, so lets just
// run through a set-update-delete cycle but with every request being
// made twice.
promise_test(origin_policy_csp_test_case([
["", true, true],
["", true, true],
["policy-csp-1", true, false],
["policy-csp-1", true, false],
["policy-csp-2", false, false],
["policy-csp-2", false, false],
["0", true, true],
["0", true, true],
["", true, true],
["", true, true],
]), "Double Trouble");
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,64 @@
def main(request, response):
"""Send a response with the origin policy indicated by the ?policy= argument.
Won't send a policy when the browser doesn't indicate support.
The response tests whether inline script and eval are allowed, and will
send a corresponding message to the parent frame.
For easier debugging, we'll also show the results in-page.
"""
origin_policy_header = "Sec-Origin-Policy"
request_policy = request.headers.get(origin_policy_header)
response_policy = request.GET.first("policy", default="")
if request_policy and response_policy:
response.headers.set(origin_policy_header, response_policy)
response.headers.set("Vary", "sec-origin-policy")
response.headers.set("Content-Type", "text/html");
return """
<html>
<head>
<title>Page with an Origin Policy</title>
</head>
<body>
<script nonce=test>
let inlineAllowed = false;
let evalAllowed = false;
try { eval('evalAllowed = true;'); } catch (e) {};
</script>
<script>
inlineAllowed = true;
</script>
<p>Reveal whether CSP with "unsafe-inline" or "unsafe-eval" is present:</p>
<ul>
<li>inline script allowed: <span id=inline_allowed></span></li>
<li>eval allowed: <span id=eval_allowed></span></li>
</ul>
<script nonce=test>
const result = {
"inline_allowed": inlineAllowed,
"eval_allowed": evalAllowed,
};
// Mirror content into the page for easy debugging:
const styles = {
true: "font-weight: bold; color: green;",
false: "font-weight: bold; color: red",
}
for (const [key, value] of Object.entries(result)) {
let element = document.getElementById(key);
element.textContent = value.toString();
element.style = styles[value];
}
// Send result to parent frame for evaluation.
if (window.parent) {
window.parent.postMessage(result, "*");
}
</script>
</body>
</html>
"""

Просмотреть файл

@ -1,3 +1,5 @@
spec: https://wicg.github.io/priority-hints/
suggested_reviewers:
- addyosmani
- domfarolino
- yoavweiss

Просмотреть файл

@ -0,0 +1,34 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
'use strict';
idl_test(
['speech-api'],
['dom', 'html'],
idl_array => {
idl_array.add_objects({
SpeechGrammar: ['new SpeechGrammar()'],
SpeechGrammarList: ['new SpeechGrammarList()'],
SpeechRecognition: ['new SpeechRecognition()'],
// TODO: SpeechRecognitionAlternative
// TODO: SpeechRecognitionErrorEvent
// TODO: SpeechRecognitionEvent
// TODO: SpeechRecognitionResult
// TODO: SpeechRecognitionResultList
SpeechSynthesis: ['speechSynthesis'],
// TODO: SpeechSynthesisErrorEvent
// TODO: SpeechSynthesisEvent
SpeechSynthesisUtterance: ['new SpeechSynthesisUtterance()'],
Window: ['self'],
});
// https://w3c.github.io/speech-api/#dom-speechsynthesis-getvoices can
// return an empty list, so add SpeechSynthesisVoice conditionally.
const voices = speechSynthesis.getVoices();
if (voices.length) {
self.voice = voices[0];
idl_array.add_objects({ SpeechSynthesisVoice: ['voice'] });
}
}
);

Просмотреть файл

@ -24,3 +24,7 @@ self.addEventListener('message', function(e) {
.catch(e => port.postMessage({type:"OTHER ERROR"}));
}
});
self.addEventListener('messageerror', function(e) {
port.postMessage({type:"RECEIVE ERROR"});
});

Просмотреть файл

@ -8,14 +8,16 @@
promise_test(async test => {
var registration = await service_worker_unregister_and_register(
test, 'resources/service-worker.js', 'resources/blank.html');
add_completion_callback(() => registration.unregister());
var worker = registration.installing;
var data = await new Promise((resolve, reject) => {
var messageChannel = new MessageChannel();
worker.postMessage({port: messageChannel.port2}, [messageChannel.port2]);
worker.postMessage({compile: true});
messageChannel.port1.onmessage = event => resolve(event.data);
});
assert_equals(data, null);
add_completion_callback(() => registration.unregister());
var worker = registration.installing;
var event = await new Promise((resolve, reject) => {
var messageChannel = new MessageChannel();
worker.postMessage({port: messageChannel.port2}, [messageChannel.port2]);
worker.postMessage({compile: true});
messageChannel.port1.onmessage = event => reject(event);
messageChannel.port1.onmessageerror = event => resolve(event);
});
assert_equals(event.type, "messageerror");
assert_equals(event.data, null);
}, 'postMessaging wasm from a service worker should fail');
</script>

Просмотреть файл

@ -112,9 +112,9 @@
param.transactionId = undefined;
return promise_rejects(t, 'InvalidModificationError',
return promise_rejects(t, new TypeError(),
sender.setParameters(param));
}, `sender.setParameters() with transaction ID unset should reject with InvalidModificationError`);
}, `sender.setParameters() with transaction ID unset should reject with TypeError`);
promise_test(async t => {
const pc = new RTCPeerConnection();

Просмотреть файл

@ -5,12 +5,12 @@
/* exported getCookieStoreIdForTab, getCookieStoreIdForContainer,
getContainerForCookieStoreId,
isValidCookieStoreId, isContainerCookieStoreId,
EventManager, InputEventManager, URL */
EventManager, URL */
/* global getCookieStoreIdForTab:false, getCookieStoreIdForContainer:false,
getContainerForCookieStoreId: false,
isValidCookieStoreId:false, isContainerCookieStoreId:false,
isDefaultCookieStoreId: false, isPrivateCookieStoreId:false,
EventManager: false, InputEventManager: false */
EventManager: false */
ChromeUtils.defineModuleGetter(this, "ContextualIdentityService",
"resource://gre/modules/ContextualIdentityService.jsm");