Update web-platform-tests to revision ac4274136e9a034628a3a469890c8e37babbc902

This commit is contained in:
WPT Sync Bot 2018-12-14 20:35:55 -05:00
parent c9229f3f99
commit b0862d9cc1
68 changed files with 2064 additions and 135 deletions

View file

@ -1,3 +1,3 @@
mozprocess == 0.26
selenium==3.141.0
requests==2.20.1
requests==2.21.0

View file

@ -146,15 +146,11 @@ class Browser(object):
with which it should be instantiated"""
return ExecutorBrowser, {}
def check_for_crashes(self):
"""Check for crashes that didn't cause the browser process to terminate"""
def check_crash(self, process, test):
"""Check if a crash occured and output any useful information to the
log. Returns a boolean indicating whether a crash occured."""
return False
def log_crash(self, process, test):
"""Return a list of dictionaries containing information about crashes that happend
in the browser, or an empty list if no crashes occurred"""
self.logger.crash(process, test)
class NullBrowser(Browser):
def __init__(self, logger, **kwargs):

View file

@ -397,23 +397,15 @@ class FirefoxBrowser(Browser):
assert self.marionette_port is not None
return ExecutorBrowser, {"marionette_port": self.marionette_port}
def check_for_crashes(self):
def check_crash(self, process, test):
dump_dir = os.path.join(self.profile.profile, "minidumps")
return bool(mozcrash.check_for_crashes(dump_dir,
symbols_path=self.symbols_path,
stackwalk_binary=self.stackwalk_binary,
quiet=True))
def log_crash(self, process, test):
dump_dir = os.path.join(self.profile.profile, "minidumps")
mozcrash.log_crashes(self.logger,
dump_dir,
symbols_path=self.symbols_path,
stackwalk_binary=self.stackwalk_binary,
process=process,
test=test)
return bool(mozcrash.log_crashes(self.logger,
dump_dir,
symbols_path=self.symbols_path,
stackwalk_binary=self.stackwalk_binary,
process=process,
test=test))
def setup_ssl(self):
"""Create a certificate database to use in the test profile. This is configured

View file

@ -13,7 +13,7 @@ var observer = new MutationObserver(test);
observer.observe(root, {attributes: true});
if (document.readyState != "complete") {
onload = test
addEventListener('load', test);
} else {
test();
}

View file

@ -38,7 +38,7 @@ var observer = new MutationObserver(root_wait);
observer.observe(root, {attributes: true});
if (document.readyState != "complete") {
onload = root_wait;
addEventListener('load', root_wait);
} else {
root_wait();
}

View file

@ -1,5 +1,20 @@
class MessageQueue {
constructor() {
this._queue = [];
}
push(item) {
this._queue.push(item);
__wptrunner_process_next_event();
}
shift() {
return this._queue.shift();
}
}
window.__wptrunner_testdriver_callback = null;
window.__wptrunner_message_queue = [];
window.__wptrunner_message_queue = new MessageQueue();
window.__wptrunner_url = null;
window.__wptrunner_process_next_event = function() {

View file

@ -404,7 +404,7 @@ class ManifestLoader(object):
download_from_github(manifest_path, tests_path)
return manifest.load_and_update(tests_path, manifest_path, url_base,
cache_root=cache_root, update=self.force_manifest_update,
meta_filters=self.meta_filters)
meta_filters=self.meta_filters, types=self.types)
def iterfilter(filters, iter):

View file

@ -233,11 +233,8 @@ class BrowserManager(object):
if self.init_timer is not None:
self.init_timer.cancel()
def check_for_crashes(self):
return self.browser.check_for_crashes()
def log_crash(self, test_id):
return self.browser.log_crash(process=self.browser_pid, test=test_id)
def check_crash(self, test_id):
return self.browser.check_crash(process=self.browser_pid, test=test_id)
def is_alive(self):
return self.browser.is_alive()
@ -504,8 +501,7 @@ class TestRunnerManager(threading.Thread):
def init_failed(self):
assert isinstance(self.state, RunnerManagerState.initializing)
if self.browser.check_for_crashes():
self.browser.log_crash(None)
self.browser.check_crash(None)
self.browser.after_init()
self.stop_runner(force=True)
return RunnerManagerState.initializing(self.state.test,
@ -580,7 +576,7 @@ class TestRunnerManager(threading.Thread):
expected = test.expected()
status = status_subns.get(file_result.status, file_result.status)
if self.browser.check_for_crashes():
if self.browser.check_crash(test.id):
status = "CRASH"
self.test_count += 1
@ -588,8 +584,6 @@ class TestRunnerManager(threading.Thread):
if is_unexpected:
self.unexpected_count += 1
self.logger.debug("Unexpected count in this thread %i" % self.unexpected_count)
if status == "CRASH":
self.browser.log_crash(test.id)
if "assertion_count" in file_result.extra:
assertion_count = file_result.extra.pop("assertion_count")