| Index: LayoutTests/imported/web-platform-tests/html/semantics/interfaces.html
|
| diff --git a/LayoutTests/imported/web-platform-tests/html/semantics/interfaces.html b/LayoutTests/imported/web-platform-tests/html/semantics/interfaces.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..37b96d22002e7c48088d9f286d3ab6912d527f65
|
| --- /dev/null
|
| +++ b/LayoutTests/imported/web-platform-tests/html/semantics/interfaces.html
|
| @@ -0,0 +1,33 @@
|
| +<!DOCTYPE html>
|
| +<title>Test of interfaces</title>
|
| +<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com">
|
| +<link rel="help" href="https://html.spec.whatwg.org/multipage/">
|
| +<link rel="help" href="https://heycam.github.io/webidl/#host-objects">
|
| +<link rel="help" href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf#page=96">
|
| +<script src="../../../../resources/testharness.js"></script>
|
| +<script src="../../../../resources/testharnessreport.js"></script>
|
| +<script src=interfaces.js></script>
|
| +<div id="log"></div>
|
| +<script>
|
| +function do_test(local_name, iface) {
|
| + test(function() {
|
| + var e = document.createElement(local_name), i = "HTML" + iface + "Element";
|
| + assert_class_string(e, i,
|
| + "Element " + local_name + " should have " + i +
|
| + " as its primary interface.");
|
| + assert_true(e instanceof window[i],
|
| + "Element " + local_name + " should implement " + i + ".");
|
| + assert_true(e instanceof HTMLElement,
|
| + "Element " + local_name + " should implement HTMLElement.");
|
| + assert_true(e instanceof Element,
|
| + "Element " + local_name + " should implement Element.");
|
| + assert_true(e instanceof Node,
|
| + "Element " + local_name + " should implement Node.");
|
| + }, "Interfaces for " + local_name);
|
| +}
|
| +
|
| +elements.forEach(function(a) {
|
| + do_test(a[0], a[1]);
|
| + do_test(a[0].toUpperCase(), a[1]);
|
| +})
|
| +</script>
|
|
|