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

Side by Side Diff: LayoutTests/dart/Node.html

Issue 9188009: Things to unfork. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 8 years, 11 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
« no previous file with comments | « LayoutTests/dart/Multiscript-expected.txt ('k') | LayoutTests/dart/Node-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <body>
3
4 <div id="insert">*Insert Test Parent*<div id="refChild">Reference Child</div></d iv>
5 <div id="replace">*Replace Test Parent*<div id="oldChild">Old Child</div></div>
6 <div id="remove">*Remove Test Parent*<div id="child">Child</div></div>
7 <div id="append">*Append Test Parent*</div>
8
9 <script id="dart" type="application/dart">
10 #import('dart:dom');
11
12 class NodeTest {
13
14 NodeTest() {}
15
16 void testInsertBefore() {
17 HTMLElement parent = document.getElementById('insert');
18 HTMLElement child = document.createElement('div');
19 child.innerHTML = 'Inserted Child';
20 HTMLElement refChild = document.getElementById('refChild');
21 parent.insertBefore(child, refChild);
22 }
23
24 void testReplaceChild() {
25 HTMLElement parent = document.getElementById('replace');
26 HTMLElement child = document.createElement('div');
27 child.innerHTML = 'New Child';
28 HTMLElement oldChild = document.getElementById('oldChild');
29 parent.replaceChild(child, oldChild);
30 }
31
32 void testRemoveChild() {
33 HTMLElement parent = document.getElementById('remove');
34 HTMLElement child = document.getElementById('child');
35 parent.removeChild(child);
36 }
37
38 void testAppendChild() {
39 HTMLElement parent = document.getElementById('append');
40 HTMLElement child = document.createElement('div');
41 child.innerHTML = 'Appended Child';
42 parent.appendChild(child);
43 }
44 }
45
46 void main() {
47 if (null !== layoutTestController) {
48 layoutTestController.dumpAsText();
49 }
50 NodeTest tester = new NodeTest();
51 tester.testInsertBefore();
52 tester.testReplaceChild();
53 tester.testRemoveChild();
54 tester.testAppendChild();
55 }
56 </script>
57
58 <script>
59 // Fake script to trigger Dart execution.
60 </script>
61
62 </body>
63 </html>
OLDNEW
« no previous file with comments | « LayoutTests/dart/Multiscript-expected.txt ('k') | LayoutTests/dart/Node-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698