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

Side by Side Diff: third_party/WebKit/LayoutTests/dom/parent_node/prepend.html

Issue 2783813003: Move tests for ChildNode and ParentNode to dom/child_node/ and dom/parent_node/. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script> 4 <script>
5 5
6 test(function () { 6 test(function () {
7 var node = document.createElement('div'); 7 var node = document.createElement('div');
8 assert_true('prepend' in node); 8 assert_true('prepend' in node);
9 var prepend = 'mine'; 9 var prepend = 'mine';
10 var getAttribute = 'mine'; 10 var getAttribute = 'mine';
11 with (node) { 11 with (node) {
12 assert_true(prepend === 'mine'); 12 assert_true(prepend === 'mine');
13 assert_false(getAttribute === 'mine'); 13 assert_false(getAttribute === 'mine');
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 var doc2 = document.implementation.createDocument("http://www.w3.org/199 9/xhtml", "html"); 85 var doc2 = document.implementation.createDocument("http://www.w3.org/199 9/xhtml", "html");
86 assert_throws('HierarchyRequestError', () => { parent.prepend(doc2, "foo ") }); 86 assert_throws('HierarchyRequestError', () => { parent.prepend(doc2, "foo ") });
87 assert_equals(parent.firstChild, null); 87 assert_equals(parent.firstChild, null);
88 }, nodeName + '.prepend() with a Document as an argument should throw.'); 88 }, nodeName + '.prepend() with a Document as an argument should throw.');
89 } 89 }
90 90
91 test_prepend(document.createElement('div'), 'Element'); 91 test_prepend(document.createElement('div'), 'Element');
92 test_prepend(document.createDocumentFragment(), 'DocumentFrgment'); 92 test_prepend(document.createDocumentFragment(), 'DocumentFrgment');
93 </script> 93 </script>
94 </html> 94 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698