Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
e2ba081
Run one chunk of tests in firefox on push
jgraham Jan 16, 2018
74134e1
Fixup taskcluster
jgraham Jan 16, 2018
46cb5e8
Force python2
jgraham Jan 16, 2018
8e3d51b
fixup! Force python2
jgraham Jan 16, 2018
439e78b
Increase logging
jgraham Jan 17, 2018
a154d54
Increase logging
jgraham Jan 17, 2018
2a9df57
Don't allow fallback alignment in place-content shorthand.
emilio Jan 16, 2018
2041b3b
Accept null for body param in constructor of Response.
upsuper Jan 17, 2018
104e3e0
Don't prompt for install
jgraham Jan 17, 2018
3582712
Increase logging
jgraham Jan 17, 2018
11f40d3
More logging
jgraham Jan 17, 2018
3bd70ad
Use sys.executable for virtualenv
jgraham Jan 17, 2018
280b22b
Install browser in TC
jgraham Jan 17, 2018
853387e
Install dependencies
jgraham Jan 17, 2018
4953343
fixup! Install dependencies
jgraham Jan 17, 2018
5f036d1
apt udpate
jgraham Jan 17, 2018
dddaf14
Use apt-get with --yes
jgraham Jan 17, 2018
33dceb9
Ttry using a taskcluster/desktop-test image
jgraham Jan 17, 2018
e1209a0
Specify image version
jgraham Jan 17, 2018
0ca79a8
Use more modern image
jgraham Jan 17, 2018
08864cb
Don't update
jgraham Jan 17, 2018
51db1b7
USe custom dockerfile with taskcluster
jgraham Jan 22, 2018
468818b
Update start script
jgraham Jan 22, 2018
0a06906
Fix syntax error in start script, use a shallow clone by default
jgraham Jan 22, 2018
9f5761b
Bump image version
jgraham Jan 22, 2018
faeb7b7
Remove ENTRYPOINT
jgraham Jan 22, 2018
1d25f71
Update docker image
jgraham Jan 22, 2018
765ea66
Update path
jgraham Jan 22, 2018
484fe22
Ensure we have commits from the correct repo
jgraham Jan 22, 2018
7bc0a99
Fix slotted invalidation.
emilio Jan 22, 2018
d99985d
Fix attributeChangedCallback isn't fired with correct newValue when t…
EdgarChen Jan 22, 2018
53a1aed
Tests for calc() on font-size on various situations.
emilio Jan 22, 2018
16cab56
Add WPT test for the attributeChangedCallback which is triggered from…
EdgarChen Jan 16, 2018
27d2857
Introduce assert_time_equals_literal and use it.
Jan 23, 2018
04cfc8e
Double epsilon value for assert_times_equal.
Jan 23, 2018
18b20d1
Use assert_times_equal for comparing timing values.
Jan 23, 2018
ef92ae5
update docker image
jgraham Jan 24, 2018
6c3dcca
Remove attempt to upload artifacts
jgraham Jan 24, 2018
cd1ed8e
Upload artifacts and change wpt run exit code
jgraham Jan 24, 2018
01b2539
Add code for generating a complete static taskgraph for Chrome and Fo…
jgraham Jan 25, 2018
d2eb4e5
Fix reftest type name
jgraham Jan 25, 2018
a044544
Handle unexpected alerts when switching tests,
jgraham Jan 26, 2018
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
687 changes: 687 additions & 0 deletions .taskcluster.yml

Large diffs are not rendered by default.

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>
35 changes: 35 additions & 0 deletions css/css-scoping/slotted-invalidation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!doctype html>
<title>CSS Test: Style invalidation for ::slotted()</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#slotted-pseudo">
<div id="host">
<div>
<span></span>
<span></span>
</div>
<div id="slotted">
<span></span>
<span></span>
</div>
<div>
<span></span>
<span></span>
</div>
</div>
<script>
test(function() {
var root = host.attachShadow({"mode":"open"});
root.innerHTML = '<style>.outer ::slotted(#slotted) { background-color: red } .outer .inner::slotted(#slotted) { background-color: green }</style><div id="outer"><slot id="inner"></slot></div>';

assert_equals(window.getComputedStyle(slotted).backgroundColor, "rgba(0, 0, 0, 0)");

root.querySelector("#outer").className = "outer";
assert_equals(window.getComputedStyle(slotted).backgroundColor, "rgb(255, 0, 0)");

root.querySelector("#inner").className = "inner";
assert_equals(window.getComputedStyle(slotted).backgroundColor, "rgb(0, 128, 0)");
})
</script>
12 changes: 12 additions & 0 deletions css/css-values/calc-ch-ex-lang-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!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: calc(1ex + 1ch + 1em);
height: calc(1ex + 1ch + 1em);
background: green;
}
</style>
<div></div>
16 changes: 16 additions & 0 deletions css/css-values/calc-ch-ex-lang.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Test: Calc in font-size with ch / ex units across lang changes</title>
<link rel="help" href="https://drafts.csswg.org/css-values/#ch">
<link rel="help" href="https://drafts.csswg.org/css-values/#ex">
<link rel="help" href="https://drafts.csswg.org/css-values/#funcdef-calc">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1431031">
<link rel="match" href="calc-ch-ex-lang-ref.html">
<style>
div[lang] {
font-size: calc(1ex + 1ch + 1em);
}
</style>
<div lang="en">
<div style="width: 1em; height: 1em; background: green;"></div>
</div>
6 changes: 6 additions & 0 deletions css/css-values/calc-rem-lang-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Test Reference</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<p>You should see a green box twice-the-initial-font-size wide.</p>
<div style="width: 2em; height: 2em; background: green;"></div>
17 changes: 17 additions & 0 deletions css/css-values/calc-rem-lang.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html lang="en"><!-- The lang is important! -->
<meta charset="utf-8">
<title>CSS Test: Calc with rem and relative units on the root element</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-values/#rem">
<link rel="help" href="https://drafts.csswg.org/css-values/#funcdef-calc">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1431031">
<link rel="match" href="calc-rem-lang-ref.html">
<style>
html {
font-size: calc(1rem + 1em);
}
</style>
<p style="font-size: initial">You should see a green box twice-the-initial-font-size wide.</p>
<div style="width: 1em; height: 1em; background: green;"></div>
</html>
31 changes: 31 additions & 0 deletions custom-elements/attribute-changed-callback.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</head>
<body>
<div id="log"></div>
<parser-created-element title></parser-created-element>
<script>

var customElement = define_new_custom_element(['title', 'id', 'r']);
Expand Down Expand Up @@ -218,6 +219,36 @@
assert_attribute_log_entry(calls[0], {name: 'title', oldValue: null, newValue: 'hello', namespace: null});
}, 'attributedChangedCallback must not be enqueued when mutating inline style declaration if the style attribute is not observed');

test(function () {
var calls = [];
class CustomElement extends HTMLElement { }
CustomElement.prototype.attributeChangedCallback = function (...args) {
calls.push(create_attribute_changed_callback_log(this, ...args));
}
CustomElement.observedAttributes = ['title'];
customElements.define('parser-created-element', CustomElement);
assert_attribute_log_entry(calls[0], {name: 'title', oldValue: null, newValue: '', namespace: null});
}, 'Upgrading a parser created element must enqueue and invoke attributeChangedCallback for an HTML attribute');

test(function () {
var calls = [];
class CustomElement extends HTMLElement { }
CustomElement.prototype.attributeChangedCallback = function (...args) {
calls.push(create_attribute_changed_callback_log(this, ...args));
}
CustomElement.observedAttributes = ['title'];
customElements.define('cloned-element-with-attribute', CustomElement);

var instance = document.createElement('cloned-element-with-attribute');
assert_equals(calls.length, 0);
instance.title = '';
assert_attribute_log_entry(calls[0], {name: 'title', oldValue: null, newValue: '', namespace: null});

calls = [];
var clone = instance.cloneNode(false);
assert_attribute_log_entry(calls[0], {name: 'title', oldValue: null, newValue: '', namespace: null});
}, 'Upgrading a cloned element must enqueue and invoke attributeChangedCallback for an HTML attribute');

</script>
</body>
</html>
16 changes: 16 additions & 0 deletions custom-elements/parser/parser-sets-attributes-and-children.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,30 @@
<link rel="help" href="https://dom.spec.whatwg.org/#concept-create-element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/custom-elements-helpers.js"></script>
</head>
<body>
<div id="log"></div>
<script>

var numberOfAttributesInConstructor;
var numberOfChildNodesInConstructor;
var attributesChangedCalls = [];

class MyCustomElement extends HTMLElement {
constructor(...args) {
super(...args);
numberOfAttributesInConstructor = this.attributes.length;
numberOfChildNodesInConstructor = this.childNodes.length;
}

attributeChangedCallback(...args) {
attributesChangedCalls.push(create_attribute_changed_callback_log(this, ...args));
}

static get observedAttributes() {
return ['id', 'class'];
}
};
customElements.define('my-custom-element', MyCustomElement);

Expand Down Expand Up @@ -54,6 +64,12 @@
assert_equals(numberOfChildNodesInConstructor, 0, 'HTML parser must not append child nodes to a custom element before invoking the constructor');
}, 'HTML parser must set the attributes or append children before calling constructor');

test(function () {
assert_equals(attributesChangedCalls.length, 2);
assert_attribute_log_entry(attributesChangedCalls[0], {name: 'id', oldValue: null, newValue: 'custom-element-id', namespace: null});
assert_attribute_log_entry(attributesChangedCalls[1], {name: 'class', oldValue: null, newValue: 'class1 class2', namespace: null});
}, 'HTML parser must enqueue attributeChanged reactions');

</script>
</body>
</html>
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>
4 changes: 4 additions & 0 deletions tools/ci/.bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function xvfb_start() {
GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH"
xvfb-run --server-args="-screen 0 $GEOMETRY -ac +extension RANDR" $@
}
76 changes: 76 additions & 0 deletions tools/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
FROM ubuntu:16.04

# No interactive frontend during docker build
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true

# General requirements not in the base image
RUN apt-get -qqy update \
&& apt-get -qqy install \
bzip2 \
ca-certificates \
dbus-x11 \
git \
locales \
pulseaudio \
python \
python-pip \
tzdata \
sudo \
unzip \
wget \
xvfb

# Installing just the deps of firefox and chrome is moderately tricky, so
# just install the default versions of them, and some extra deps we happen
# to know that chrome requires

RUN apt-get -qqy install \
firefox \
chromium-browser \
libnss3-tools \
fonts-liberation \
indicator-application \
libappindicator1 \
libappindicator3-1 \
libdbusmenu-gtk3-4 \
libindicator3-7 \
libindicator7

RUN pip install --upgrade pip
RUN pip install virtualenv

ENV TZ "UTC"
RUN echo "${TZ}" > /etc/timezone \
&& dpkg-reconfigure --frontend noninteractive tzdata

RUN useradd test \
--shell /bin/bash \
--create-home \
&& usermod -a -G sudo test \
&& echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers \
&& echo 'test:secret' | chpasswd

ENV SCREEN_WIDTH 1280
ENV SCREEN_HEIGHT 1024
ENV SCREEN_DEPTH 24
ENV DISPLAY :99.0

USER test

WORKDIR /home/test

COPY .bashrc /home/test/.bashrc

COPY start.sh /home/test/start.sh

# Remove information on how to use sudo on login
RUN sudo echo ""

RUN git clone --depth=1 https://github.com/w3c/web-platform-tests.git

RUN mkdir -p /home/test/.fonts && \
cp web-platform-tests/fonts/Ahem.ttf ~/.fonts && \
fc-cache -f -v

RUN mkdir -p /home/test/artifacts
7 changes: 7 additions & 0 deletions tools/ci/ci_taskcluster.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [ $1 == "firefox" ]; then
./wpt run firefox --log-tbpl=- --log-tbpl-level=debug --log-wptreport=../artifacts/wpt_report.json --this-chunk=$3 --total-chunks=$4 --test-type=$2 -y --install-browser --no-pause --no-restart-on-unexpected
elif [ $1 == "chrome" ]; then
./wpt run chrome --log-tbpl=- --log-tbpl-level=debug --log-wptreport=../artifacts/wpt_report.json --this-chunk=$3 --total-chunks=$4 --test-type=$2 -y --no-pause --no-restart-on-unexpected
fi
4 changes: 3 additions & 1 deletion tools/ci/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"test-jobs": {"path": "jobs.py", "script": "run", "parser": "create_parser", "help": "List test jobs that should run for a set of commits",
"virtualenv": false},
"check-stability": {"path": "check_stability.py", "script": "run", "parser": "get_parser", "parse_known": true, "help": "Check test stability",
"virtualenv": true, "install": ["requests"], "requirements": ["../wptrunner/requirements.txt"]}
"virtualenv": true, "install": ["requests"], "requirements": ["../wptrunner/requirements.txt"]},
"generate-tasks": {"path": "taskgraph.py", "script": "run", "parser": "get_parser", "parse_known": true, "help": "Generate taskcluster.yml file containing the run tasks",
"virtualenv": true, "install": ["pyyaml"]}
}
27 changes: 27 additions & 0 deletions tools/ci/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

sudo sh -c 'echo "
127.0.0.1 web-platform.test
127.0.0.1 www.web-platform.test
127.0.0.1 www1.web-platform.test
127.0.0.1 www2.web-platform.test
127.0.0.1 xn--n8j6ds53lwwkrqhv28a.web-platform.test
127.0.0.1 xn--lve-6lad.web-platform.test
0.0.0.0 nonexistent-origin.web-platform.test" >> /etc/hosts'

cd web-platform-tests
git pull --depth=1

# Install Chome unstable
deb_archive=google-chrome-unstable_current_amd64.deb
wget https://dl.google.com/linux/direct/$deb_archive

# Installation will fail in cases where the package has unmet dependencies.
# When this occurs, attempt to use the system package manager to fetch the
# required packages and retry.
if ! sudo dpkg --install $deb_archive; then
sudo apt-get -y install --fix-broken
sudo dpkg --install $deb_archive
fi

sudo Xvfb $DISPLAY -screen 0 ${SCREEN_WIDTH}x${SCREEN_HEIGHT}x${SCREEN_DEPTH} &
Loading