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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Test of interfaces</title>
3 <link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com">
4 <link rel="help" href="https://html.spec.whatwg.org/multipage/">
5 <link rel="help" href="https://heycam.github.io/webidl/#host-objects">
6 <link rel="help" href="http://www.ecma-international.org/publications/files/ECMA -ST/ECMA-262.pdf#page=96">
7 <script src="../../../../resources/testharness.js"></script>
8 <script src="../../../../resources/testharnessreport.js"></script>
9 <script src=interfaces.js></script>
10 <div id="log"></div>
11 <script>
12 function do_test(local_name, iface) {
13 test(function() {
14 var e = document.createElement(local_name), i = "HTML" + iface + "Element";
15 assert_class_string(e, i,
16 "Element " + local_name + " should have " + i +
17 " as its primary interface.");
18 assert_true(e instanceof window[i],
19 "Element " + local_name + " should implement " + i + ".");
20 assert_true(e instanceof HTMLElement,
21 "Element " + local_name + " should implement HTMLElement.");
22 assert_true(e instanceof Element,
23 "Element " + local_name + " should implement Element.");
24 assert_true(e instanceof Node,
25 "Element " + local_name + " should implement Node.");
26 }, "Interfaces for " + local_name);
27 }
28
29 elements.forEach(function(a) {
30 do_test(a[0], a[1]);
31 do_test(a[0].toUpperCase(), a[1]);
32 })
33 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698