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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/interactive-elements/the-details-element/details.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 <html>
3 <head>
4 <title>HTML details element API</title>
5 <style>#one, #two { visibility: hidden; }</style>
6 <script src="../../../../../../resources/testharness.js"></script>
7 <script src="../../../../../../resources/testharnessreport.js"></script>
8 </head>
9 <body>
10 <div id="log"></div>
11
12 <!-- Used in parsing tests -->
13 <div id='one'><details></details><details></details></div>
14 <div id='two'><p><details></details></div>
15
16 <script type="text/javascript">
17
18 function makeDetails () {
19 return document.createElement('details');
20 }
21
22
23 // <details>
24 test(function () {
25 var times = document.getElementById('one').getElementsByTagName('details');
26 assert_equals( times.length, 2 );
27 }, 'HTML parsing should locate 2 details elements in this document');
28
29 test(function () {
30 assert_equals( document.getElementById('two').getElementsByTagName('p')[0].inn erHTML, '' );
31 }, 'HTML parsing should close an unclosed <p> before <details>');
32
33 test(function () {
34 assert_true( !!window.HTMLDetailsElement );
35 }, 'HTMLDetailsElement should be exposed for prototyping');
36
37 test(function () {
38 assert_true( makeDetails() instanceof window.HTMLDetailsElement);
39 }, 'a dynamically created details element should be instanceof HTMLDetailsElemen t');
40
41 test(function () {
42 assert_true( document.getElementById('one').getElementsByTagName('details')[0] instanceof window.HTMLDetailsElement);
43 }, 'a details element from the parser should be instanceof HTMLDetailsElement');
44 </script>
45
46 </body>
47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698