Update web-platform-tests to revision 04cd5eb8e5c47e4fe341f2fb541d39fa2346f464

This commit is contained in:
WPT Sync Bot 2018-11-16 21:03:13 -05:00
parent 0ab2c3f8a3
commit 1d0624b343
226 changed files with 4495 additions and 903 deletions

View file

@ -1904,7 +1904,9 @@ policies and contribution forms [3].
*/
function RemoteContext(remote, message_target, message_filter) {
this.running = true;
this.started = false;
this.tests = new Array();
this.early_exception = null;
var this_obj = this;
// If remote context is cross origin assigning to onerror is not
@ -1943,6 +1945,21 @@ policies and contribution forms [3].
}
RemoteContext.prototype.remote_error = function(error) {
if (error.preventDefault) {
error.preventDefault();
}
// Defer interpretation of errors until the testing protocol has
// started and the remote test's `allow_uncaught_exception` property
// is available.
if (!this.started) {
this.early_exception = error;
} else if (!this.allow_uncaught_exception) {
this.report_uncaught(error);
}
};
RemoteContext.prototype.report_uncaught = function(error) {
var message = error.message || String(error);
var filename = (error.filename ? " " + error.filename: "");
// FIXME: Display remote error states separately from main document
@ -1950,9 +1967,14 @@ policies and contribution forms [3].
tests.set_status(tests.status.ERROR,
"Error in remote" + filename + ": " + message,
error.stack);
};
if (error.preventDefault) {
error.preventDefault();
RemoteContext.prototype.start = function(data) {
this.started = true;
this.allow_uncaught_exception = data.properties.allow_uncaught_exception;
if (this.early_exception && !this.allow_uncaught_exception) {
this.report_uncaught(this.early_exception);
}
};
@ -2002,6 +2024,7 @@ policies and contribution forms [3].
};
RemoteContext.prototype.message_handlers = {
start: RemoteContext.prototype.start,
test_state: RemoteContext.prototype.test_state,
result: RemoteContext.prototype.test_done,
complete: RemoteContext.prototype.remote_done