Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit 07f2169

Browse files
committed
Merge pull request #445 from webcomponents/fix-tests
Fix WebComponents tests status
2 parents 43b5dfa + d405e3c commit 07f2169

18 files changed

Lines changed: 69 additions & 120 deletions

File tree

.travis.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
language: node_js
22
sudo: false
3-
matrix:
4-
include:
5-
- node_js: stable
6-
script: xvfb-run wct
7-
addons:
8-
firefox: latest
9-
apt:
10-
sources:
11-
- google-chrome
12-
packages:
13-
- google-chrome-stable
14-
- node_js: node
15-
script:
16-
- |
17-
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
18-
wct -s 'default'
19-
fi
3+
node_js: 4
4+
addons:
5+
sauce_connect: true
6+
firefox: latest
7+
apt:
8+
sources:
9+
- google-chrome
10+
- ubuntu-toolchain-r-test
11+
packages:
12+
- google-chrome-stable
13+
- g++-4.8
2014
before_script:
2115
- export PATH=$PWD/node_modules/.bin:$PATH
16+
script:
17+
- xvfb-run wct
18+
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
2219
env:
2320
global:
2421
- secure: c0kVrjNDtqd06Gyg4Xi3iopr0KCz1k0LbZeL+TCbnyCdmAE7m9FcJASWvM2Zr7d774hTiMSi0Z79SlV6XZhLN2pi4EsbdEpsnVeAXXH/GYzDKgpXbdfD/nQv4n1nMXL6XSaZkAX7WwgmrjzJ9cXQJYV9vNHIBRcGoVRRyCFx9v4=
2522
- secure: Mo+AVRGUmlDENnZ2GioF5pU62WhyLUMnPlSqzeodZzJoAnwcNr9VnHiRCgQBLnHCZwjbMv6C0vhWopY7lN9w77vlS5vr8MDZKjYT/YRl9jk0+hStJ+diSS9MD+FnNNerXe+V+WA6NYVHno3vdWRqDDMYzCdH/pyLukkuKdMFaAU=
23+
- CXX=g++-4.8

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
"license": "BSD",
1717
"ignore": [],
1818
"devDependencies": {
19-
"web-component-tester": "~3.3.10"
19+
"web-component-tester": "^4.0.1"
2020
}
2121
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
"bugs": {
1616
"url": "https://github.com/webcomponents/webcomponentsjs/issues"
1717
},
18+
"scripts": {
19+
"test": "wct"
20+
},
1821
"homepage": "http://webcomponents.org",
1922
"devDependencies": {
2023
"gulp": "^3.8.8",
@@ -23,6 +26,6 @@
2326
"gulp-header": "^1.1.1",
2427
"gulp-uglify": "^1.0.1",
2528
"run-sequence": "^1.0.1",
26-
"web-component-tester": "^3"
29+
"web-component-tester": "^4.0.1"
2730
}
2831
}

src/HTMLImports/base.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ function watchImportsLoad(callback, doc) {
139139
if (importCount) {
140140
for (var i=0, imp; i<importCount && (imp=imports[i]); i++) {
141141
if (isImportLoaded(imp)) {
142+
newImports.push(this);
142143
parsedCount++;
143144
checkDone();
144145
} else {

tests/HTMLImports/html/HTMLImportsLoaded-native.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,22 @@
1212
<head>
1313
<title>HTMLImportsLoaded, native</title>
1414
<script>WCT = {waitFor: function(cb){ cb() }}</script>
15+
<script>
16+
var loaded = false;
17+
addEventListener('HTMLImportsLoaded', function(e) {
18+
loaded = true;
19+
});
20+
</script>
1521
<script src="../../../src/HTMLImports/HTMLImports.js"></script>
1622
<script src="../../../../web-component-tester/browser.js"></script>
1723
</head>
1824
<body>
1925
<link rel="import" href="imports/import-1.html">
2026
<script>
21-
test('HTMLImportsLoaded fires with native imports', function(done) {
22-
if (!HTMLImports.useNative) {
23-
return done();
27+
test('HTMLImportsLoaded fires with native imports', function() {
28+
if (HTMLImports.useNative) {
29+
assert.isTrue(loaded);
2430
}
25-
addEventListener('HTMLImportsLoaded', function(e) {
26-
chai.assert.ok(true, 'HTMLImportsLoaded');
27-
done();
28-
});
2931
});
3032
</script>
3133
</body>

tests/HTMLImports/html/dynamic-loaded-detail.html

Lines changed: 0 additions & 51 deletions
This file was deleted.

tests/HTMLImports/html/template-script.html

Lines changed: 0 additions & 30 deletions
This file was deleted.

tests/HTMLImports/runner.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,9 @@
3636
'html/dynamic.html',
3737
'html/dynamic-all-imports-detail.html',
3838
'html/dynamic-errors-detail.html',
39-
'html/dynamic-loaded-detail.html',
4039
'html/csp.html',
4140
'html/customevent-detail.html',
4241
'html/encoding.html',
43-
'html/template-script.html',
4442
'html/HTMLImportsLoaded-native.html',
4543
];
4644
// NOTE: The MO polyfill does not function on disconnected documents

tests/ShadowCSS/html/combinators.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<title>Using combinators styling</title>
1515
<script src="../../../../web-component-tester/browser.js"></script>
1616

17-
<script src="../../../webcomponents.js"></script>
17+
<script src="../../../webcomponents.js" shadow="polyfill"></script>
1818
<script src="register.js"></script>
1919
<style shim-shadowdom>
2020
x-foo ^ .foo {

tests/ShadowDOM/js/events.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,6 +1418,8 @@ test('retarget order (multiple shadow roots)', function() {
14181418
};
14191419

14201420
var error = new Error(msg);
1421+
// tell WCT to ignore this error
1422+
error.ignore = true;
14211423
document.addEventListener('click', f = function(e) {
14221424
throw error;
14231425
});

0 commit comments

Comments
 (0)