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

Unified Diff: sky/tests/dom/document-child-mutations.sky

Issue 924203002: Morph the APIs for Node, ParentNode, and Element closer to the specs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: less Created 5 years, 10 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
« no previous file with comments | « sky/engine/tonic/dart_wrappable.cc ('k') | sky/tests/dom/ownerScope.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/dom/document-child-mutations.sky
diff --git a/sky/tests/dom/document-child-mutations.sky b/sky/tests/dom/document-child-mutations.sky
index 7aecd2b9a27766eb33ff5e000226441d18121ad0..1ffe1eff5c93626c9a44f5b9e82433adb6717c5f 100644
--- a/sky/tests/dom/document-child-mutations.sky
+++ b/sky/tests/dom/document-child-mutations.sky
@@ -22,7 +22,7 @@ void main() {
var oldChild = doc.appendChild(doc.createElement("div"));
expect(childElementCount(doc), equals(1));
var newChild = doc.createElement("div");
- doc.replaceChild(newChild, oldChild);
+ oldChild.replaceWith([newChild]);
expect(childElementCount(doc), equals(1));
expect(newChild.parentNode, equals(doc));
expect(oldChild.parentNode, isNull);
@@ -33,7 +33,7 @@ void main() {
expect(childElementCount(doc), equals(0));
expect(childNodeCount(doc), equals(1));
var newChild = doc.createElement("div");
- doc.replaceChild(newChild, oldChild);
+ oldChild.replaceWith([newChild]);
expect(childElementCount(doc), equals(1));
expect(childNodeCount(doc), equals(1));
expect(newChild.parentNode, equals(doc));
@@ -44,7 +44,7 @@ void main() {
var oldChild = doc.appendChild(doc.createElement("div"));
expect(childElementCount(doc), equals(1));
var newChild = new Text(" text ");
- doc.replaceChild(newChild, oldChild);
+ oldChild.replaceWith([newChild]);
expect(childElementCount(doc), equals(0));
expect(childNodeCount(doc), equals(1));
expect(newChild.parentNode, equals(doc));
@@ -68,7 +68,7 @@ void main() {
fragment.appendChild(new Text(" text "));
var newChild = fragment.appendChild(doc.createElement("div"));
fragment.appendChild(new Text(" "));
- doc.replaceChild(fragment, oldChild);
+ oldChild.replaceWith([fragment]);
expect(childElementCount(doc), equals(1));
expect(childNodeCount(doc), equals(3));
expect(newChild.parentNode, equals(doc));
« no previous file with comments | « sky/engine/tonic/dart_wrappable.cc ('k') | sky/tests/dom/ownerScope.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698