diff --git a/.taskcluster.yml b/.taskcluster.yml new file mode 100644 index 00000000000000..96de583881584a --- /dev/null +++ b/.taskcluster.yml @@ -0,0 +1,27 @@ +version: 0 +tasks: + - provisionerId: '{{ taskcluster.docker.provisionerId }}' + workerType: '{{ taskcluster.docker.workerType }}' + extra: + github: + events: + - push + branches: + - master + payload: + maxRunTime: 3600 + image: taskcluster/ubuntu1604-test:0.1.3 + command: + - /bin/bash + - '--login' + - '-c' + - >- + git clone {{event.head.repo.url}} repo && cd repo && git config + advice.detachedHead false && git checkout {{event.head.sha}} && + ./tools/ci/ci_taskcluster.sh firefox testharness 1 12 + metadata: + name: 'firefox-nightly-testharness-1' + description: '' + owner: '{{ event.head.user.email }}' + source: '{{ event.head.repo.url }}' +allowPullRequests: collaborators diff --git a/css/css-align/content-distribution/place-content-shorthand-007-ref.html b/css/css-align/content-distribution/place-content-shorthand-007-ref.html new file mode 100644 index 00000000000000..67727f4fd26fb9 --- /dev/null +++ b/css/css-align/content-distribution/place-content-shorthand-007-ref.html @@ -0,0 +1,22 @@ + + +CSS Test Reference + + +Should see a green square centered and at the bottom of the blue square. +
diff --git a/css/css-align/content-distribution/place-content-shorthand-007.html b/css/css-align/content-distribution/place-content-shorthand-007.html new file mode 100644 index 00000000000000..be954c9712189d --- /dev/null +++ b/css/css-align/content-distribution/place-content-shorthand-007.html @@ -0,0 +1,22 @@ + + +CSS Box Alignment: place-content shorthand with fallback + + + + + +Should see a green square centered and at the bottom of the blue square. +
diff --git a/fetch/api/response/response-init-002.html b/fetch/api/response/response-init-002.html index 0bb2e8d0b3b28d..a48af833644efe 100644 --- a/fetch/api/response/response-init-002.html +++ b/fetch/api/response/response-init-002.html @@ -65,6 +65,11 @@ }); }, "Testing empty Response Content-Type header"); + test(function() { + var response = new Response(null, {status: 204}); + assert_equals(response.body, null); + }, "Testing null Response body"); + diff --git a/service-workers/service-worker/about-blank-replacement.https.html b/service-workers/service-worker/about-blank-replacement.https.html index 3acfe1b166a68c..e1fefaf290fe52 100644 --- a/service-workers/service-worker/about-blank-replacement.https.html +++ b/service-workers/service-worker/about-blank-replacement.https.html @@ -58,7 +58,7 @@ }); } -async function doAsyncTest(t, scope, extraSearchParams) { +async function doAsyncTest(t, scope) { let reg = await service_worker_unregister_and_register(t, worker, scope); await wait_for_state(t, reg.installing, 'activated'); @@ -70,20 +70,30 @@ let initialResult = frame.contentWindow.nested().document.body.textContent; assert_false(initialResult.startsWith('failure:'), `result: ${initialResult}`); + assert_equals(frame.contentWindow.navigator.serviceWorker.controller.scriptURL, + frame.contentWindow.nested().navigator.serviceWorker.controller.scriptURL, + 'nested about:blank should have same controlling service worker'); + // Next, ask the service worker to find the final client ID for the fully // loaded nested frame. - let nestedURL = new URL(scope, window.location); - nestedURL.searchParams.set('nested', true); - extraSearchParams = extraSearchParams || {}; - for (let p in extraSearchParams) { - nestedURL.searchParams.set(p, extraSearchParams[p]); - } + let nestedURL = new URL(frame.contentWindow.nested().location); let finalResult = await getClientIdByURL(reg.active, nestedURL); assert_false(finalResult.startsWith('failure:'), `result: ${finalResult}`); - // The initial about:blank client and the final loaded client should have - // the same ID value. - assert_equals(initialResult, finalResult, 'client ID values should match'); + // If the nested frame doesn't have a URL to load, then there is no fetch + // event and the body should be empty. We can't verify the final client ID + // against anything. + if (nestedURL.href === 'about:blank' || + nestedURL.href === 'about:srcdoc') { + assert_equals('', initialResult, 'about:blank text content should be blank'); + } + + // If the nested URL is not about:blank, though, then the fetch event handler + // should have populated the body with the client id of the initial about:blank. + // Verify the final client id matches. + else { + assert_equals(initialResult, finalResult, 'client ID values should match'); + } frame.remove(); await service_worker_unregister_and_done(t, scope); @@ -101,8 +111,7 @@ // worker can ping the client to verify its existence. This ping-pong // check is performed during the initial load and when verifying the // final loaded client. - await doAsyncTest(t, 'resources/about-blank-replacement-ping-frame.py', - { 'ping': true }); + await doAsyncTest(t, 'resources/about-blank-replacement-ping-frame.py'); }, 'Initial about:blank modified by parent is controlled, exposed to ' + 'clients.matchAll(), and matches final Client.'); @@ -142,5 +151,27 @@ }, 'Initial about:blank is controlled, exposed to clients.matchAll(), and ' + 'final Client is not controlled by a service worker.'); +promise_test(async function(t) { + // Execute a test where the nested frame is an iframe without a src + // attribute. This simple nested about:blank should still inherit the + // controller and be visible to clients.matchAll(). + await doAsyncTest(t, 'resources/about-blank-replacement-blank-nested-frame.html'); +}, 'Simple about:blank is controlled and is exposed to clients.matchAll().'); + +promise_test(async function(t) { + // Execute a test where the nested frame is an iframe using a non-empty + // srcdoc containing only a tag pair so its textContent is still empty. + // This nested iframe should still inherit the controller and be visible + // to clients.matchAll(). + await doAsyncTest(t, 'resources/about-blank-replacement-srcdoc-nested-frame.html'); +}, 'Nested about:srcdoc is controlled and is exposed to clients.matchAll().'); + +promise_test(async function(t) { + // Execute a test where the nested frame is dynamically added without a src + // attribute. This simple nested about:blank should still inherit the + // controller and be visible to clients.matchAll(). + await doAsyncTest(t, 'resources/about-blank-replacement-blank-dynamic-nested-frame.html'); +}, 'Dynamic about:blank is controlled and is exposed to clients.matchAll().'); + diff --git a/service-workers/service-worker/resources/about-blank-replacement-blank-dynamic-nested-frame.html b/service-workers/service-worker/resources/about-blank-replacement-blank-dynamic-nested-frame.html new file mode 100644 index 00000000000000..1e0c6209bfc0bd --- /dev/null +++ b/service-workers/service-worker/resources/about-blank-replacement-blank-dynamic-nested-frame.html @@ -0,0 +1,21 @@ + + + + + + diff --git a/service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html b/service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html new file mode 100644 index 00000000000000..99d07a48cda5ea --- /dev/null +++ b/service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/service-workers/service-worker/resources/about-blank-replacement-srcdoc-nested-frame.html b/service-workers/service-worker/resources/about-blank-replacement-srcdoc-nested-frame.html new file mode 100644 index 00000000000000..0122a00aa432f9 --- /dev/null +++ b/service-workers/service-worker/resources/about-blank-replacement-srcdoc-nested-frame.html @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/tools/ci/ci_taskcluster.sh b/tools/ci/ci_taskcluster.sh new file mode 100755 index 00000000000000..b78e5a782ae82b --- /dev/null +++ b/tools/ci/ci_taskcluster.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -xe + +# To make sure we have all the deps installed +#apt-get --yes update +#apt-get --yes upgrade + +pip -q install virtualenv +python2 wpt run $1 --log-tbpl=- --log-tbpl-level=debug --log-wptreport=wpt_report.json --this-chunk=$3 --total-chunks=$4 --test-type=$2 -y --install-browser diff --git a/tools/wpt/utils.py b/tools/wpt/utils.py index e1f4cd4bb5c75d..40e1a45d28d0e5 100644 --- a/tools/wpt/utils.py +++ b/tools/wpt/utils.py @@ -39,7 +39,7 @@ def call(*args): Returns a bytestring of the subprocess output if no error. """ - logger.debug("%s" % " ".join(args)) + logger.info("%s" % " ".join(args)) try: return subprocess.check_output(args) except subprocess.CalledProcessError as e: diff --git a/tools/wpt/virtualenv.py b/tools/wpt/virtualenv.py index 8f36aa93585ffd..6abaec5f875811 100644 --- a/tools/wpt/virtualenv.py +++ b/tools/wpt/virtualenv.py @@ -7,6 +7,7 @@ logger = logging.getLogger(__name__) + class Virtualenv(object): def __init__(self, path): self.path = path @@ -21,7 +22,7 @@ def exists(self): def create(self): if os.path.exists(self.path): shutil.rmtree(self.path) - call(self.virtualenv, self.path) + call(self.virtualenv, self.path, "-p", sys.executable) @property def bin_path(self): @@ -38,7 +39,14 @@ def pip_path(self): def activate(self): path = os.path.join(self.bin_path, "activate_this.py") + logger.info("Activating virtualenv %s" % path) + old_sys_path = sys.path[:] + logger.info(sys.path) execfile(path, {"__file__": path}) + logger.info(sys.path) + for item in sys.path: + if item not in old_sys_path: + logger.info(item) def start(self): if not self.exists: @@ -46,7 +54,7 @@ def start(self): self.activate() def install(self, *requirements): - call(self.pip_path, "install", *requirements) + logger.info(call(self.pip_path, "install", *requirements)) def install_requirements(self, requirements_path): - call(self.pip_path, "install", "-r", requirements_path) + logger.info(call(self.pip_path, "install", "-r", requirements_path)) diff --git a/tools/wpt/wpt.py b/tools/wpt/wpt.py index 49f463d2a9ed1e..e183bef230da97 100644 --- a/tools/wpt/wpt.py +++ b/tools/wpt/wpt.py @@ -90,7 +90,7 @@ def setup_virtualenv(path, props): def main(prog=None, argv=None): - logging.basicConfig(level=logging.INFO) + logging.basicConfig(level=logging.DEBUG) if prog is None: prog = sys.argv[0]