mirror of
https://github.com/servo/servo.git
synced 2025-08-24 06:45:33 +01:00
Update web-platform-tests to revision b'5656a2f4653b5894c500b724778009ca9a26e48c'
This commit is contained in:
parent
cc6026d81e
commit
41d386c907
861 changed files with 3963 additions and 1531 deletions
|
@ -1,5 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Sub Apps: Error cases for add()</title>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/subapps-helpers.js"></script>
|
||||
|
@ -52,11 +54,15 @@ promise_test(async t => {
|
|||
let install_options = {};
|
||||
install_options["install_url"] = wrong_origin_url;
|
||||
subapp[wrong_origin_url] = install_options;
|
||||
await promise_rejects_dom(t, 'URLMismatchError', navigator.subApps.add(subapp));
|
||||
|
||||
await test_driver.bless("installing a subapp", async function () {
|
||||
await promise_rejects_dom(t, 'URLMismatchError', navigator.subApps.add(subapp));
|
||||
});
|
||||
}, 'Wrong origin URL argument.');
|
||||
|
||||
promise_test(async t => {
|
||||
const same_origin_url = document.location.origin + '/sub-app';
|
||||
|
||||
let add_call_params = {};
|
||||
let install_options = {};
|
||||
install_options["install_url"] = same_origin_url;
|
||||
|
@ -68,9 +74,21 @@ promise_test(async t => {
|
|||
let expected_results = {};
|
||||
expected_results[same_origin_url] = "expected-app-id-check-failed";
|
||||
|
||||
await subapps_add_expect_reject_with_result(t, add_call_params, mocked_response, expected_results);
|
||||
await test_driver.bless("installing a subapp", async function () {
|
||||
await subapps_add_expect_reject_with_result(t, add_call_params, mocked_response, expected_results);
|
||||
});
|
||||
}, 'Service failed to add single sub-app.');
|
||||
|
||||
promise_test(async t => {
|
||||
const same_origin_url = document.location.origin + '/sub-app';
|
||||
|
||||
let subapp = {
|
||||
[same_origin_url]: { install_url: same_origin_url }
|
||||
};
|
||||
|
||||
await promise_rejects_dom(t, 'NotAllowedError', navigator.subApps.add(subapp));
|
||||
}, 'Missing user activation.');
|
||||
|
||||
promise_test(async t => {
|
||||
let add_call_params = {};
|
||||
|
||||
|
@ -92,7 +110,9 @@ promise_test(async t => {
|
|||
expected_results[url_1] = "expected-app-id-check-failed";
|
||||
expected_results[url_2] = "install-url-invalid";
|
||||
|
||||
await subapps_add_expect_reject_with_result(t, add_call_params, mocked_response, expected_results);
|
||||
await test_driver.bless("installing a subapp", async function () {
|
||||
await subapps_add_expect_reject_with_result(t, add_call_params, mocked_response, expected_results);
|
||||
});
|
||||
}, 'Service failed to add two sub-apps.');
|
||||
|
||||
promise_test(async t => {
|
||||
|
@ -116,6 +136,8 @@ promise_test(async t => {
|
|||
expected_results[url_1] = "success-new-install";
|
||||
expected_results[url_2] = "expected-app-id-check-failed";
|
||||
|
||||
await subapps_add_expect_reject_with_result(t, add_call_params, mocked_response, expected_results);
|
||||
await test_driver.bless("installing a subapp", async function () {
|
||||
await subapps_add_expect_reject_with_result(t, add_call_params, mocked_response, expected_results);
|
||||
});
|
||||
}, 'Service added one sub-app failed to add another sub-app.');
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue