Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Test Reference</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<style>
div {
width: 400px;
height: 400px;
background: blue;
position: relative;
}
span {
background: green;
width: 200px;
height: 200px;
position: absolute;
bottom: 0;
left: 100px;
}
</style>
Should see a green square centered and at the bottom of the blue square.
<div><span></span></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Box Alignment: place-content shorthand with fallback</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-align/#propdef-place-content">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1430622">
<link rel="match" href="place-content-shorthand-007-ref.html">
<style>
div {
display: grid;
grid: 200px / 200px;
width: 400px;
height: 400px;
background: blue;
place-content: end space-evenly;
}
span {
background: green;
}
</style>
Should see a green square centered and at the bottom of the blue square.
<div><span></span></div>
5 changes: 5 additions & 0 deletions fetch/api/response/response-init-002.html
Original file line number Diff line number Diff line change
Expand Up @@ -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");

</script>
</body>
</html>
55 changes: 43 additions & 12 deletions service-workers/service-worker/about-blank-replacement.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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);
Expand All @@ -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.');

Expand Down Expand Up @@ -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().');

</script>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!doctype html>
<html>
<body>
<script>
function nestedLoaded() {
parent.postMessage({ type: 'NESTED_LOADED' }, '*');
}

// dynamically add an about:blank iframe
var f = document.createElement('iframe');
f.onload = nestedLoaded;
document.body.appendChild(f);

// Helper routine to make it slightly easier for our parent to find
// the nested frame.
function nested() {
return f.contentWindow;
}
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!doctype html>
<html>
<body>
<script>
function nestedLoaded() {
parent.postMessage({ type: 'NESTED_LOADED' }, '*');
}
</script>
<iframe id="nested" onload="nestedLoaded()"></iframe>
<script>
// Helper routine to make it slightly easier for our parent to find
// the nested frame.
function nested() {
return document.getElementById('nested').contentWindow;
}

// NOTE: Make sure not to touch the iframe directly here. We want to
// test the case where the initial about:blank document is not
// directly accessed before load.
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!doctype html>
<html>
<body>
<script>
function nestedLoaded() {
parent.postMessage({ type: 'NESTED_LOADED' }, '*');
}
</script>
<iframe id="nested" srcdoc="<div></div>" onload="nestedLoaded()"></iframe>
<script>
// Helper routine to make it slightly easier for our parent to find
// the nested frame.
function nested() {
return document.getElementById('nested').contentWindow;
}

// NOTE: Make sure not to touch the iframe directly here. We want to
// test the case where the initial about:blank document is not
// directly accessed before load.
</script>
</body>
</html>
10 changes: 10 additions & 0 deletions tools/ci/ci_taskcluster.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tools/wpt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 11 additions & 3 deletions tools/wpt/virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

logger = logging.getLogger(__name__)


class Virtualenv(object):
def __init__(self, path):
self.path = path
Expand All @@ -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):
Expand All @@ -38,15 +39,22 @@ 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:
self.create()
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))
2 changes: 1 addition & 1 deletion tools/wpt/wpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down