Update web-platform-tests to revision 4a5223502fa660ce03e470af6a61c8bc26c5a8ee

This commit is contained in:
WPT Sync Bot 2018-04-23 21:13:37 -04:00
parent c5f7c9ccf3
commit e891345f26
1328 changed files with 36632 additions and 20588 deletions

View file

@ -1,27 +0,0 @@
{"host": "web-platform.test",
"doc_root": null,
"ws_doc_root": null,
"external_host": null,
"ports":{"http":[8000, "auto"],
"https":[9003],
"ws":["auto"],
"wss":["auto"]},
"check_subdomains": true,
"log_level":"debug",
"bind_hostname": true,
"ssl": {"type": "openssl",
"encrypt_after_connect": false,
"openssl": {
"openssl_binary": "openssl",
"base_path": "_certs",
"force_regenerate": false,
"base_conf_path": null
},
"pregenerated": {
"host_key_path": null,
"host_cert_path": null
},
"none": {}
},
"aliases": []
}

View file

@ -29,6 +29,19 @@
var A = idl.members["A"];
assert_array_equals(A.get_inheritance_stack().map(d => d.name), ["A", "B", "C"]);
}, 'should return an array of inherited dictionaries in order of inheritance, starting with itself.');
test(function () {
let i = new IdlArray();
i.add_untested_idls('dictionary A : B {};');
i.assert_throws(new IdlHarnessError('A inherits B, but B is undefined.'), i => i.test());
}, 'A : B with B undeclared should throw IdlHarnessError');
test(function () {
let i = new IdlArray();
i.add_untested_idls('dictionary A : B {};');
i.add_untested_idls('interface B {};');
i.assert_throws(new IdlHarnessError('A inherits B, but A is not an interface.'), i => i.test());
}, 'dictionary A : B with B interface should throw IdlHarnessError');
</script>
</body>
</html>

View file

@ -29,6 +29,13 @@
var A = idl.members["A"];
assert_array_equals(A.get_inheritance_stack().map(i => i.name), ["A", "B", "C"]);
}, 'should return an array of inherited interfaces in order of inheritance, starting with itself.');
test(function () {
var idl = new IdlArray();
idl.add_untested_idls('interface A : B { };');
idl.add_untested_idls('interface B : A { };');
idl.assert_throws('A has a circular dependency: A,B,A', i => i.test());
}, 'should throw when inheritance is circular');
</script>
</body>
</html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE HTML>
<html>
<head>
<title>idlharness test_primary_interface_of_undefined</title>
</head>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script>
'use strict';
test(function () {
let i = new IdlArray();
i.add_untested_idls('interface A : B {};');
i.assert_throws(new IdlHarnessError('A inherits B, but B is undefined.'), i => i.test());
}, 'A : B with B undeclared should throw IdlHarnessError');
test(function () {
let i = new IdlArray();
i.add_untested_idls('interface A : B {};');
i.add_untested_idls('dictionary B {};');
i.assert_throws(new IdlHarnessError('A inherits B, but B is not an interface.'), i => i.test());
}, 'interface A : B with B dictionary should throw IdlHarnessError');
</script>
</body>
</html>

View file

@ -4,17 +4,15 @@ import subprocess
import time
import urllib2
_CONFIG_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'config.test.json')
class WPTServer(object):
def __init__(self, wpt_root):
self.wpt_root = wpt_root
with open(_CONFIG_FILE, 'r') as config_handle:
config_file = os.path.join(wpt_root, 'config.default.json')
with open(config_file, 'rb') as config_handle:
config = json.load(config_handle)
self.host = config["host"]
self.host = config["browser_host"]
self.http_port = config["ports"]["http"][0]
self.https_port = config["ports"]["https"][0]
self.base_url = 'http://%s:%s' % (self.host, self.http_port)
@ -23,7 +21,7 @@ class WPTServer(object):
def start(self):
self.devnull = open(os.devnull, 'w')
self.proc = subprocess.Popen(
[os.path.join(self.wpt_root, 'wpt'), 'serve', '--config=' + _CONFIG_FILE],
[os.path.join(self.wpt_root, 'wpt'), 'serve'],
stderr=self.devnull,
cwd=self.wpt_root)