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

Unified Diff: sky/tests/dom/replaceChild.dart

Issue 1212163009: Port remaining Sky tests to the new world (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: add 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/tests/dom/ownerScope.sky ('k') | sky/tests/dom/replaceChild.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/dom/replaceChild.dart
diff --git a/sky/tests/dom/replaceChild.sky b/sky/tests/dom/replaceChild.dart
similarity index 85%
rename from sky/tests/dom/replaceChild.sky
rename to sky/tests/dom/replaceChild.dart
index 8342eda84da05a9d9c68445a959443478b7c0a51..bef11f1f2147ef2afa797ad13bb743b0d554919e 100644
--- a/sky/tests/dom/replaceChild.sky
+++ b/sky/tests/dom/replaceChild.dart
@@ -1,6 +1,4 @@
-<sky>
-<import src="../resources/dom-utils.sky" as="DomUtils" />
-<script>
+import "../resources/dom_utils.dart";
import "../resources/third_party/unittest/unittest.dart";
import "../resources/unit.dart";
@@ -9,8 +7,7 @@ import "dart:sky";
void main() {
initUnit();
- var childElementCount = DomUtils.childElementCount;
- var childNodeCount = DomUtils.childNodeCount;
+ var document = new Document();
test("should replace elements", () {
var parent = document.createElement("div");
@@ -23,7 +20,7 @@ void main() {
test("should replace text", () {
var parent = document.createElement("div");
- var oldChild = parent.appendChild(new Text(" it's a text "));
+ var oldChild = parent.appendChild(document.createText(" it's a text "));
var newChild = document.createElement("div");
oldChild.replaceWith([newChild]);
expect(oldChild.parentNode, isNull);
@@ -33,8 +30,8 @@ void main() {
test("should replace children with a fragment", () {
var fragment = document.createDocumentFragment();
var child1 = fragment.appendChild(document.createElement("div"));
- var child2 = fragment.appendChild(new Text(" text "));
- var child3 = fragment.appendChild(new Text(" "));
+ var child2 = fragment.appendChild(document.createText(" text "));
+ var child3 = fragment.appendChild(document.createText(" "));
var child4 = fragment.appendChild(document.createElement("div"));
var parent = document.createElement("div");
var oldChild = parent.appendChild(document.createElement("div"));
@@ -72,5 +69,3 @@ void main() {
// }, throws);
// });
}
-</script>
-</sky>
« no previous file with comments | « sky/tests/dom/ownerScope.sky ('k') | sky/tests/dom/replaceChild.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698