Auto merge of #5685 - Ms2ger:wpt-servo, r=jdm

This commit is contained in:
bors-servo 2015-04-14 08:51:35 -05:00
commit 0941f46162
6 changed files with 70 additions and 30 deletions

View file

@ -1,25 +0,0 @@
<html>
<head>
<meta charset="utf-8">
<script src="harness.js"></script>
</head>
<body onload="test()">
<foo-á>foo</foo-á>
<script>
function test() {
is_a(window.document, Node);
gc(); // ensure that our document rooting works; subsequent accesses should be valid.
is_a(window.document, Node);
is(window.document.nodeType, Node.DOCUMENT_NODE);
is_a(window.document.documentElement, Node);
is_a(window.document.documentElement, Element);
is_a(window.document.documentElement, HTMLElement);
is_a(window.document.documentElement, HTMLHtmlElement);
is_a(window.document, Document);
is(window.document.documentElement.tagName, "HTML");
is_a(window.document.getElementsByTagName('foo-á')[0], HTMLUnknownElement);
is(window.document.getElementsByTagName('foo-á')[0].tagName, "FOO-á");
}
</script>
</body>
</html>

View file

@ -10,13 +10,14 @@ In particular, this folder contains:
* `include.ini`: the subset of web-platform-tests we currently run. * `include.ini`: the subset of web-platform-tests we currently run.
* `config_css.ini`: some configuration for the CSSWG tests. * `config_css.ini`: some configuration for the CSSWG tests.
* `include_css.ini`: the subset of the CSSWG tests we currently run. * `include_css.ini`: the subset of the CSSWG tests we currently run.
* `run_wpt.py` glue code to run the web-platform-tests in Servo. * `run_wpt.py`: glue code to run the web-platform-tests in Servo.
* `run_css.py` glue code to run the CSSWG tests in Servo. * `run_css.py`: glue code to run the CSSWG tests in Servo.
* `run.py` common code used by `run_wpt.py` and `run_css.py`. * `run.py`: common code used by `run_wpt.py` and `run_css.py`.
* `web-platform-tests`: copy of the web-platform-tests. * `web-platform-tests`: copy of the web-platform-tests.
* `metadata`: expected failures for the web-platform-tests we run. * `metadata`: expected failures for the web-platform-tests we run.
* `css-tests` copy of the built CSSWG tests. * `css-tests`: copy of the built CSSWG tests.
* `metadata-css` expected failures for the CSSWG tests we run. * `metadata-css`: expected failures for the CSSWG tests we run.
* `mozilla`: web-platform-tests that cannot be upstreamed.
Running the tests Running the tests
================= =================
@ -125,3 +126,11 @@ The easiest way to update the test harness is using git:
cd ../../.. cd ../../..
At this point you should commit the updated files in the *servo* git repository. At this point you should commit the updated files in the *servo* git repository.
Servo-specific tests
====================
The `mozilla` directory contains tests that cannot be upstreamed for some
reason (e.g. because they depend on Servo-specific APIs), as well as some
legacy tests that should be upstreamed at some point. When run they are
mounted on the server under `/_mozilla/`.

View file

@ -13,3 +13,8 @@ run-info = .
tests = web-platform-tests tests = web-platform-tests
metadata = metadata metadata = metadata
url-base = / url-base = /
[manifest:mozilla]
tests = mozilla/tests
metadata = mozilla/meta
url_base = /_mozilla/

View file

@ -97,3 +97,5 @@ skip: true
skip: false skip: false
[encoding] [encoding]
skip: false skip: false
[_mozilla]
skip: false

View file

@ -0,0 +1,23 @@
{
"items": {
"manual": [],
"reftest": [],
"stub": [],
"testharness": [
{
"path": "mozilla/prototypes.html",
"url": "/_mozilla/mozilla/prototypes.html"
}
],
"wdspec": []
},
"local_changes": {
"deleted": [],
"items": {},
"reftest_nodes": {}
},
"reftest_nodes": {},
"rev": null,
"url_base": "/_mozilla/",
"version": 2
}

View file

@ -0,0 +1,26 @@
<html>
<head>
<meta charset="utf-8">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<foo-á>foo</foo-á>
<script>
test(function() {
assert_true(window.document instanceof Node, "Should be Node");
gc(); // ensure that our document rooting works; subsequent accesses should be valid.
assert_true(window.document instanceof Node, "Should be Node");
assert_equals(window.document.nodeType, Node.DOCUMENT_NODE);
assert_true(window.document.documentElement instanceof Node, "Should be Node");
assert_true(window.document.documentElement instanceof Element, "Should be Element");
assert_true(window.document.documentElement instanceof HTMLElement, "Should be HTMLElement");
assert_true(window.document.documentElement instanceof HTMLHtmlElement, "Should be HTMLHtmlElement");
assert_true(window.document instanceof Document, "Should be Document");
assert_equals(window.document.documentElement.tagName, "HTML");
assert_true(window.document.getElementsByTagName('foo-á')[0] instanceof HTMLUnknownElement, "Should be HTMLUnknownElement");
assert_equals(window.document.getElementsByTagName('foo-á')[0].tagName, "FOO-á");
});
</script>
</body>
</html>