Commit cea56a70 authored by Luke Zielinski's avatar Luke Zielinski Committed by Commit Bot

Rolling new version of WPT javascript code.

This rolls up to sha 40ef02d00e6e4209a8c48d59f56952ad7654731c

Main changes are:
- set_storage_access testdriver API
- hide_test_state member in testharness

Change-Id: I98cc4e56379e7d299365dd90684350cf2236c99c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2320412
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Auto-Submit: Luke Z <lpz@chromium.org>
Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792247}
parent a9e30a32
......@@ -355,6 +355,32 @@
set_user_verified: function(authenticator_id, uv) {
return window.test_driver_internal.set_user_verified(authenticator_id, uv);
},
/**
* Sets the storage access rule for an origin when embedded
* in a third-party context.
*
* {@link https://privacycg.github.io/storage-access/#set-storage-access-command}
*
* @param {String} origin - A third-party origin to block or allow.
* May be "*" to indicate all origins.
* @param {String} embedding_origin - an embedding (first-party) origin
* on which {origin}'s access should
* be blocked or allowed.
* May be "*" to indicate all origins.
* @param {String} state - The storage access setting.
* Must be either "allowed" or "blocked".
*
* @returns {Promise} Fulfilled after the storage access rule has been
* set, or rejected if setting the rule fails.
*/
set_storage_access: function(origin, embedding_origin, state) {
if (state !== "allowed" && state !== "blocked") {
throw new Error("storage access status must be 'allowed' or 'blocked'");
}
const blocked = state === "blocked";
return window.test_driver_internal.set_storage_access(origin, embedding_origin, blocked);
},
};
window.test_driver_internal = {
......@@ -569,5 +595,13 @@
set_user_verified: function(authenticator_id, uv) {
return Promise.reject(new Error("unimplemented"));
},
/**
* Sets the storage access policy for a third-party origin when loaded
* in the current first party context
*/
set_storage_access: function(origin, embedding_origin, blocked) {
return Promise.reject(new Error("unimplemented"));
},
};
})();
......@@ -2609,6 +2609,7 @@ policies and contribution forms [3].
this.test_done_callbacks = [];
this.all_done_callbacks = [];
this.hide_test_state = false;
this.pending_remotes = [];
this.status = new TestsStatus();
......@@ -2656,6 +2657,8 @@ policies and contribution forms [3].
if (this.timeout_length) {
this.timeout_length *= this.timeout_multiplier;
}
} else if (p == "hide_test_state") {
this.hide_test_state = value;
}
}
}
......@@ -3162,7 +3165,7 @@ policies and contribution forms [3].
this.phase = this.HAVE_RESULTS;
}
var done_count = tests.tests.length - tests.num_pending;
if (this.output_node) {
if (this.output_node && !tests.hide_test_state) {
if (done_count < 100 ||
(done_count < 1000 && done_count % 100 === 0) ||
done_count % 1000 === 0) {
......
CONSOLE ERROR: line 3539: Uncaught Error: assert_equals: Normal script execution order comparison expected "Inline1;Sync1;EndOfBody;DOMContentLoaded;Async1;" but got "EndOfBody;Inline1;Sync1;DOMContentLoaded;Async1;"
CONSOLE ERROR: line 3542: Uncaught Error: assert_equals: Normal script execution order comparison expected "Inline1;Sync1;EndOfBody;DOMContentLoaded;Async1;" but got "EndOfBody;Inline1;Sync1;DOMContentLoaded;Async1;"
This is a testharness.js-based test.
FAIL Async Script Execution Order (wrt possibly deferred Synchronous Script) Uncaught Error: assert_equals: Normal script execution order comparison expected "Inline1;Sync1;EndOfBody;DOMContentLoaded;Async1;" but got "EndOfBody;Inline1;Sync1;DOMContentLoaded;Async1;"
Harness: the test ran to completion.
......
CONSOLE ERROR: line 3539: Uncaught Error: assert_equals: Normal defer script execution order comparison expected "Inline1;Sync1;Inline2;Sync2;EndOfBody;Defer1;Defer2;DOMContentLoaded;" but got "EndOfBody;Inline1;Sync1;Inline2;Sync2;Defer1;Defer2;DOMContentLoaded;"
CONSOLE ERROR: line 3542: Uncaught Error: assert_equals: Normal defer script execution order comparison expected "Inline1;Sync1;Inline2;Sync2;EndOfBody;Defer1;Defer2;DOMContentLoaded;" but got "EndOfBody;Inline1;Sync1;Inline2;Sync2;Defer1;Defer2;DOMContentLoaded;"
This is a testharness.js-based test.
FAIL Defer Script Execution Order Uncaught Error: assert_equals: Normal defer script execution order comparison expected "Inline1;Sync1;Inline2;Sync2;EndOfBody;Defer1;Defer2;DOMContentLoaded;" but got "EndOfBody;Inline1;Sync1;Inline2;Sync2;Defer1;Defer2;DOMContentLoaded;"
Harness: the test ran to completion.
......
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