Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: LayoutTests/imported/web-platform-tests/html/semantics/interfaces.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698