Introduce a Servo-only tree under web-platform-tests.

This commit is contained in:
Ms2ger 2015-04-14 12:01:13 +02:00
parent 8edd4e5ec5
commit a471704107
6 changed files with 65 additions and 25 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

@ -17,6 +17,7 @@ In particular, this folder contains:
* `metadata`: expected failures for the web-platform-tests we run.
* `css-tests`: copy of the built CSSWG tests.
* `metadata-css`: expected failures for the CSSWG tests we run.
* `mozilla`: web-platform-tests that cannot be upstreamed.
Running the tests
=================
@ -125,3 +126,11 @@ The easiest way to update the test harness is using git:
cd ../../..
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
metadata = metadata
url-base = /
[manifest:mozilla]
tests = mozilla/tests
metadata = mozilla/meta
url_base = /_mozilla/

View file

@ -97,3 +97,5 @@ skip: true
skip: false
[encoding]
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>