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

Unified Diff: sky/tests/dom/ownerScope.sky

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.dart ('k') | sky/tests/dom/replaceChild.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/dom/ownerScope.sky
diff --git a/sky/tests/dom/ownerScope.sky b/sky/tests/dom/ownerScope.sky
deleted file mode 100644
index fb163b55aa2ef339c8b8159f401b8c37c9debb5a..0000000000000000000000000000000000000000
--- a/sky/tests/dom/ownerScope.sky
+++ /dev/null
@@ -1,51 +0,0 @@
-<sky>
-<script>
-import "../resources/third_party/unittest/unittest.dart";
-import "../resources/unit.dart";
-
-import "dart:sky";
-
-void main() {
- initUnit();
-
- test("should return null for elements not a child of a scope", () {
- var doc = new Document();
- var element = doc.createElement("div");
- expect(element.owner, isNull);
- });
- test("should return the document for elements in the document scope", () {
- var doc = new Document();
- var element = doc.createElement("div");
- doc.appendChild(element);
- expect(element.owner, equals(doc));
- });
- test("should return the shadow root for elements in the shadow root scope", () {
- var doc = new Document();
- var host = doc.createElement("div");
- var child = doc.createElement("div");
- var shadowRoot = host.ensureShadowRoot();
- shadowRoot.appendChild(child);
- expect(child.owner, equals(shadowRoot));
- });
- test("should return self for a shadow root or document", () {
- var doc = new Document();
- var host = doc.createElement("div");
- doc.appendChild(host);
- var shadowRoot = host.ensureShadowRoot();
- expect(shadowRoot.owner, equals(shadowRoot));
- expect(doc.owner, equals(doc));
- });
- test("should dynamically update", () {
- var doc = new Document();
- var host = doc.createElement("div");
- var child = doc.createElement("div");
- var shadowRoot = host.ensureShadowRoot();
- expect(child.owner, isNull);
- shadowRoot.appendChild(child);
- expect(child.owner, equals(shadowRoot));
- child.remove();
- expect(child.owner, isNull);
- });
-}
-</script>
-</sky>
« no previous file with comments | « sky/tests/dom/ownerScope.dart ('k') | sky/tests/dom/replaceChild.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698