mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
848a47b780
This introduces a new medule ContentTask, which includes a spawn method. This new method can be used to spawn a task in the content process of a browser. When called, a promise will be returned which resolves to the value returned by the task. This allows you to quickly write test code which can touch the content and return information without having to write custom framescripts all the time (The content code can be written inline as a simple generator definition). ContentTask is automatically included in the scope of mochitests. An example use follows: yield ContentTask.spawn(browser, {}, function* gen_replaceState() { content.window.history.replaceState({}, "", 'test-entry/'); return "Value that the promise will resolve with"; }); --HG-- extra : rebase_source : 9b6ae71407da582cdaa8087b5e367c72fa08a337
108 lines
3.5 KiB
Python
108 lines
3.5 KiB
Python
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
|
# vim: set filetype=python:
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
DIRS += [
|
|
'manifests',
|
|
'tests',
|
|
'ssltunnel',
|
|
'BrowserTestUtils',
|
|
]
|
|
|
|
if CONFIG['MOZ_BUILD_APP'] == 'mobile/android':
|
|
DIRS += ['roboextender']
|
|
|
|
XPI_NAME = 'mochijar'
|
|
|
|
JAR_MANIFESTS += ['jar.mn']
|
|
|
|
MOCHITEST_MANIFESTS += [
|
|
'dynamic/mochitest.ini',
|
|
'MochiKit/mochitest.ini',
|
|
'static/mochitest.ini',
|
|
'tests/MochiKit-1.4.2/MochiKit/mochitest.ini',
|
|
'tests/MochiKit-1.4.2/tests/mochitest.ini',
|
|
]
|
|
MOCHITEST_CHROME_MANIFESTS += ['chrome/chrome.ini']
|
|
|
|
TEST_HARNESS_FILES.testing.mochitest += [
|
|
'!automation.py',
|
|
'/build/automationutils.py',
|
|
'/build/mobile/remoteautomation.py',
|
|
'/build/pgo/server-locations.txt',
|
|
'/build/sanitizers/lsan_suppressions.txt',
|
|
'/netwerk/test/httpserver/httpd.js',
|
|
'/testing/mozbase/mozdevice/mozdevice/devicemanager.py',
|
|
'/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py',
|
|
'/testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py',
|
|
'/testing/mozbase/mozdevice/mozdevice/droid.py',
|
|
'/testing/mozbase/mozdevice/mozdevice/Zeroconf.py',
|
|
'/testing/mozbase/moznetwork/moznetwork/moznetwork.py',
|
|
'android.json',
|
|
'android23.json',
|
|
'androidx86.json',
|
|
'b2g_start_script.js',
|
|
'bisection.py',
|
|
'browser-harness.xul',
|
|
'browser-test-overlay.xul',
|
|
'browser-test.js',
|
|
'cc-analyzer.js',
|
|
'chrome-harness.js',
|
|
'chunkifyTests.js',
|
|
'gen_template.pl',
|
|
'gl.json',
|
|
'harness.xul',
|
|
'jetpack-addon-harness.js',
|
|
'jetpack-addon-overlay.xul',
|
|
'jetpack-package-harness.js',
|
|
'jetpack-package-overlay.xul',
|
|
'manifest.webapp',
|
|
'manifestLibrary.js',
|
|
'mochitest_options.py',
|
|
'nested_setup.js',
|
|
'pywebsocket_wrapper.py',
|
|
'redirect.html',
|
|
'runtests.py',
|
|
'runtestsb2g.py',
|
|
'runtestsremote.py',
|
|
'server.js',
|
|
]
|
|
|
|
if CONFIG['MOZ_BUILD_APP'] == 'mobile/android':
|
|
TEST_HARNESS_FILES.testing.mochitest += [
|
|
'/mobile/android/base/tests/robocop.ini',
|
|
'/mobile/android/base/tests/robocop_autophone.ini',
|
|
]
|
|
|
|
TEST_HARNESS_FILES.testing.mochitest.pywebsocket += [
|
|
'pywebsocket/standalone.py',
|
|
]
|
|
|
|
TEST_HARNESS_FILES.testing.mochitest.pywebsocket.mod_pywebsocket += [
|
|
'pywebsocket/mod_pywebsocket/__init__.py',
|
|
'pywebsocket/mod_pywebsocket/_stream_base.py',
|
|
'pywebsocket/mod_pywebsocket/_stream_hixie75.py',
|
|
'pywebsocket/mod_pywebsocket/_stream_hybi.py',
|
|
'pywebsocket/mod_pywebsocket/common.py',
|
|
'pywebsocket/mod_pywebsocket/dispatch.py',
|
|
'pywebsocket/mod_pywebsocket/extensions.py',
|
|
'pywebsocket/mod_pywebsocket/fast_masking.i',
|
|
'pywebsocket/mod_pywebsocket/headerparserhandler.py',
|
|
'pywebsocket/mod_pywebsocket/http_header_util.py',
|
|
'pywebsocket/mod_pywebsocket/memorizingfile.py',
|
|
'pywebsocket/mod_pywebsocket/msgutil.py',
|
|
'pywebsocket/mod_pywebsocket/mux.py',
|
|
'pywebsocket/mod_pywebsocket/stream.py',
|
|
'pywebsocket/mod_pywebsocket/util.py',
|
|
'pywebsocket/mod_pywebsocket/xhr_benchmark_handler.py',
|
|
]
|
|
|
|
TEST_HARNESS_FILES.testing.mochitest.pywebsocket.mod_pywebsocket.handshake += [
|
|
'pywebsocket/mod_pywebsocket/handshake/__init__.py',
|
|
'pywebsocket/mod_pywebsocket/handshake/_base.py',
|
|
'pywebsocket/mod_pywebsocket/handshake/hybi.py',
|
|
'pywebsocket/mod_pywebsocket/handshake/hybi00.py',
|
|
]
|