mirror of
https://github.com/servo/servo.git
synced 2025-09-04 20:18:21 +01:00
Update web-platform-tests to revision de9a09ab7f605aed6a4b53ed96427412bab76463
This commit is contained in:
parent
f3f9303fc9
commit
73a776843f
225 changed files with 5750 additions and 2858 deletions
|
@ -10,6 +10,7 @@ RUN apt-get -qqy update \
|
|||
bzip2 \
|
||||
ca-certificates \
|
||||
dbus-x11 \
|
||||
earlyoom \
|
||||
gdebi \
|
||||
git \
|
||||
locales \
|
||||
|
|
|
@ -17,6 +17,10 @@ REVISION=${3:-FETCH_HEAD}
|
|||
BROWSER=${4:-all}
|
||||
CHANNEL=${5:-nightly}
|
||||
|
||||
# Start userspace OOM killer: https://github.com/rfjakob/earlyoom
|
||||
# It will report memory usage every minute and prefer to kill browsers.
|
||||
sudo earlyoom -p -r 60 --prefer '(chrome|firefox)' --avoid 'python' &
|
||||
|
||||
cd ~
|
||||
|
||||
mkdir web-platform-tests
|
||||
|
|
|
@ -36,7 +36,6 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
|
|||
executor_kwargs["close_after_done"] = True
|
||||
|
||||
capabilities = {
|
||||
"browserName": "chrome",
|
||||
"goog:chromeOptions": {
|
||||
"prefs": {
|
||||
"profile": {
|
||||
|
|
|
@ -31,61 +31,11 @@ __wptrunner__ = {"product": "fennec",
|
|||
"run_info_extras": "run_info_extras",
|
||||
"update_properties": "update_properties"}
|
||||
|
||||
class FennecProfile(FirefoxProfile):
|
||||
# WPT-specific prefs are set in FennecBrowser.start()
|
||||
FirefoxProfile.preferences.update({
|
||||
# Make sure Shield doesn't hit the network.
|
||||
"app.normandy.api_url": "",
|
||||
# Increase the APZ content response timeout in tests to 1 minute.
|
||||
"apz.content_response_timeout": 60000,
|
||||
# Enable output for dump() and chrome console API
|
||||
"browser.dom.window.dump.enabled": True,
|
||||
"devtools.console.stdout.chrome": True,
|
||||
# Disable safebrowsing components
|
||||
"browser.safebrowsing.blockedURIs.enabled": False,
|
||||
"browser.safebrowsing.downloads.enabled": False,
|
||||
"browser.safebrowsing.passwords.enabled": False,
|
||||
"browser.safebrowsing.malware.enabled": False,
|
||||
"browser.safebrowsing.phishing.enabled": False,
|
||||
# Do not restore the last open set of tabs if the browser has crashed
|
||||
"browser.sessionstore.resume_from_crash": False,
|
||||
# Disable Android snippets
|
||||
"browser.snippets.enabled": False,
|
||||
"browser.snippets.syncPromo.enabled": False,
|
||||
"browser.snippets.firstrunHomepage.enabled": False,
|
||||
# Do not allow background tabs to be zombified, otherwise for tests that
|
||||
# open additional tabs, the test harness tab itself might get unloaded
|
||||
"browser.tabs.disableBackgroundZombification": True,
|
||||
# Disable e10s by default
|
||||
"browser.tabs.remote.autostart": False,
|
||||
# Don't warn when exiting the browser
|
||||
"browser.warnOnQuit": False,
|
||||
# Don't send Firefox health reports to the production server
|
||||
"datareporting.healthreport.about.reportUrl": "http://%(server)s/dummy/abouthealthreport/",
|
||||
# Automatically unload beforeunload alerts
|
||||
"dom.disable_beforeunload": True,
|
||||
# Disable the ProcessHangMonitor
|
||||
"dom.ipc.reportProcessHangs": False,
|
||||
# No slow script dialogs
|
||||
"dom.max_chrome_script_run_time": 0,
|
||||
"dom.max_script_run_time": 0,
|
||||
# Make sure opening about:addons won"t hit the network
|
||||
"extensions.webservice.discoverURL": "http://%(server)s/dummy/discoveryURL",
|
||||
# No hang monitor
|
||||
"hangmonitor.timeout": 0,
|
||||
|
||||
"javascript.options.showInConsole": True,
|
||||
# Ensure blocklist updates don't hit the network
|
||||
"services.settings.server": "http://%(server)s/dummy/blocklist/",
|
||||
# Disable password capture, so that tests that include forms aren"t
|
||||
# influenced by the presence of the persistent doorhanger notification
|
||||
"signon.rememberSignons": False,
|
||||
})
|
||||
|
||||
|
||||
def check_args(**kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def browser_kwargs(test_type, run_info_data, config, **kwargs):
|
||||
return {"package_name": kwargs["package_name"],
|
||||
"device_serial": kwargs["device_serial"],
|
||||
|
@ -183,12 +133,23 @@ class FennecBrowser(FirefoxBrowser):
|
|||
|
||||
preferences = self.load_prefs()
|
||||
|
||||
self.profile = FennecProfile(preferences=preferences)
|
||||
self.profile = FirefoxProfile(preferences=preferences)
|
||||
self.profile.set_preferences({"marionette.port": self.marionette_port,
|
||||
"dom.disable_open_during_load": False,
|
||||
"places.history.enabled": False,
|
||||
"dom.send_after_paint_to_content": True,
|
||||
"network.preload": True})
|
||||
if self.test_type == "reftest":
|
||||
self.logger.info("Setting android reftest preferences")
|
||||
self.profile.set_preferences({"browser.viewport.desktopWidth": 600,
|
||||
# Disable high DPI
|
||||
"layout.css.devPixelsPerPx": "1.0",
|
||||
# Ensure that the full browser element
|
||||
# appears in the screenshot
|
||||
"apz.allow_zooming": False,
|
||||
"android.widget_paints_background": False,
|
||||
# Ensure that scrollbars are always painted
|
||||
"ui.scrollbarFadeBeginDelay": 100000})
|
||||
|
||||
if self.install_fonts:
|
||||
self.logger.debug("Copying Ahem font to profile")
|
||||
|
|
|
@ -292,7 +292,7 @@ class MarionetteStorageProtocolPart(StorageProtocolPart):
|
|||
let principal = ssm.createCodebasePrincipal(uri, {});
|
||||
let qms = Components.classes["@mozilla.org/dom/quota-manager-service;1"]
|
||||
.getService(Components.interfaces.nsIQuotaManagerService);
|
||||
qms.clearStoragesForPrincipal(principal, "default", true);
|
||||
qms.clearStoragesForPrincipal(principal, "default", null, true);
|
||||
""" % url
|
||||
with self.marionette.using_context(self.marionette.CONTEXT_CHROME):
|
||||
self.marionette.execute_script(script)
|
||||
|
@ -490,7 +490,7 @@ class MarionetteProtocol(Protocol):
|
|||
self.logger.debug("Marionette session started")
|
||||
|
||||
def after_connect(self):
|
||||
self.testharness.load_runner(self.executor.last_environment["protocol"])
|
||||
pass
|
||||
|
||||
def teardown(self):
|
||||
try:
|
||||
|
@ -634,6 +634,10 @@ class MarionetteTestharnessExecutor(TestharnessExecutor):
|
|||
if marionette is None:
|
||||
do_delayed_imports()
|
||||
|
||||
def setup(self, runner):
|
||||
super(MarionetteTestharnessExecutor, self).setup(runner)
|
||||
self.protocol.testharness.load_runner(self.last_environment["protocol"])
|
||||
|
||||
def is_alive(self):
|
||||
return self.protocol.is_alive
|
||||
|
||||
|
@ -751,12 +755,14 @@ class MarionetteRefTestExecutor(RefTestExecutor):
|
|||
def teardown(self):
|
||||
try:
|
||||
self.implementation.teardown()
|
||||
handle = self.protocol.marionette.window_handles[0]
|
||||
self.protocol.marionette.switch_to_window(handle)
|
||||
handles = self.protocol.marionette.window_handles
|
||||
if handles:
|
||||
self.protocol.marionette.switch_to_window(handles[0])
|
||||
super(self.__class__, self).teardown()
|
||||
except Exception as e:
|
||||
# Ignore errors during teardown
|
||||
self.logger.warning(traceback.format_exc(e))
|
||||
self.logger.warning("Exception during reftest teardown:\n%s" %
|
||||
traceback.format_exc(e))
|
||||
|
||||
def is_alive(self):
|
||||
return self.protocol.is_alive
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue