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>
15 changes: 15 additions & 0 deletions custom-elements/Document-createElement.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@

}, 'document.createElement must create an instance of custom elements');

test(function () {
class AutonomousCustomElement extends HTMLElement {};
class IsCustomElement extends HTMLElement {};

customElements.define('autonomous-custom-element', AutonomousCustomElement);
customElements.define('is-custom-element', IsCustomElement);

var instance = document.createElement('autonomous-custom-element', { is: "is-custom-element"});

assert_true(instance instanceof AutonomousCustomElement);
assert_equals(instance.localName, 'autonomous-custom-element');
assert_equals(instance.namespaceURI, 'http://www.w3.org/1999/xhtml', 'A custom element HTML must use HTML namespace');

}, 'document.createElement must create an instance of autonomous custom elements when it has is attribute');

function assert_reports(expected, testFunction, message) {
var uncaughtError = null;
window.onerror = function (message, url, lineNumber, columnNumber, error) { uncaughtError = error; return true; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<title>Custom Elements: Changes to the HTML parser</title>
<meta name="author" title="John Dai" href="mailto:jdai@mozilla.com">
<meta name="assert" content="HTML parser creates a custom element which contains is attribute">
<link rel="help" href="https://html.spec.whatwg.org/#create-an-element-for-the-token">
<link rel="help" href="https://dom.spec.whatwg.org/#concept-create-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<autonomous-custom-element id="instance1" is="is-custom-element"></autonomous-custom-element>
<script>

class AutonomousCustomElement extends HTMLElement { };
class IsCustomElement extends HTMLElement { };

customElements.define('autonomous-custom-element', AutonomousCustomElement);
customElements.define('is-custom-element', IsCustomElement);

test(function () {
var customElement = document.getElementById('instance1');

assert_true(customElement instanceof HTMLElement, 'A resolved custom element must be an instance of HTMLElement');
assert_false(customElement instanceof HTMLUnknownElement, 'A resolved custom element must NOT be an instance of HTMLUnknownElement');
assert_true(customElement instanceof AutonomousCustomElement, 'A resolved custom element must be an instance of that custom element');
assert_equals(customElement.localName, 'autonomous-custom-element');
assert_equals(customElement.namespaceURI, 'http://www.w3.org/1999/xhtml', 'A custom element HTML must use HTML namespace');

}, 'HTML parser must create a defined autonomous custom element when customElements.define comes after HTML parser creation');

</script>
<autonomous-custom-element id="instance2" is="is-custom-element"></autonomous-custom-element>
<script>

test(function () {
var customElement = document.getElementById('instance2');

assert_true(customElement instanceof HTMLElement, 'A resolved custom element must be an instance of HTMLElement');
assert_false(customElement instanceof HTMLUnknownElement, 'A resolved custom element must NOT be an instance of HTMLUnknownElement');
assert_true(customElement instanceof AutonomousCustomElement, 'A resolved custom element must be an instance of that custom element');
assert_equals(customElement.localName, 'autonomous-custom-element');
assert_equals(customElement.namespaceURI, 'http://www.w3.org/1999/xhtml', 'A custom element HTML must use HTML namespace');

}, 'HTML parser must create a defined autonomous custom element when customElements.define comes before HTML parser creation');

</script>
</body>
</html>
19 changes: 19 additions & 0 deletions custom-elements/upgrading/Node-cloneNode.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,25 @@
'A cloned custom element must be an instance of the custom element');
}, 'Node.prototype.cloneNode(false) must be able to clone a custom element');

test(function () {
class AutonomousCustomElement extends HTMLElement {};
class IsCustomElement extends HTMLElement {};

customElements.define('autonomous-custom-element', AutonomousCustomElement);
customElements.define('is-custom-element', IsCustomElement);

var instance = document.createElement('autonomous-custom-element', { is: "is-custom-element"});
assert_true(instance instanceof HTMLElement);
assert_true(instance instanceof AutonomousCustomElement);

var clone = instance.cloneNode(false);
assert_not_equals(instance, clone);
assert_true(clone instanceof HTMLElement,
'A cloned custom element must be an instance of HTMLElement');
assert_true(clone instanceof AutonomousCustomElement,
'A cloned custom element must be an instance of the custom element');
}, 'Node.prototype.cloneNode(false) must be able to clone as a autonomous custom element when it contains is attribute');

test_with_window(function (contentWindow) {
var contentDocument = contentWindow.document;
class MyCustomElement extends contentWindow.HTMLElement {}
Expand Down
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>
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