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

Unified Diff: sky/tests/dom/ownerScope.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/tests/dom/document-child-mutations.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/ownerScope.sky
diff --git a/sky/tests/dom/ownerScope.sky b/sky/tests/dom/ownerScope.sky
index d5793790004d97068ae96b75c134a0377aa91a79..fb163b55aa2ef339c8b8159f401b8c37c9debb5a 100644
--- a/sky/tests/dom/ownerScope.sky
+++ b/sky/tests/dom/ownerScope.sky
@@ -11,14 +11,13 @@ void main() {
test("should return null for elements not a child of a scope", () {
var doc = new Document();
var element = doc.createElement("div");
- expect(element.ownerScope, isNull);
+ 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.ownerScope, equals(element.ownerDocument));
- expect(element.ownerScope, equals(doc));
+ expect(element.owner, equals(doc));
});
test("should return the shadow root for elements in the shadow root scope", () {
var doc = new Document();
@@ -26,26 +25,26 @@ void main() {
var child = doc.createElement("div");
var shadowRoot = host.ensureShadowRoot();
shadowRoot.appendChild(child);
- expect(child.ownerScope, equals(shadowRoot));
+ 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.ownerScope, equals(shadowRoot));
- expect(doc.ownerScope, equals(doc));
+ 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.ownerScope, isNull);
+ expect(child.owner, isNull);
shadowRoot.appendChild(child);
- expect(child.ownerScope, equals(shadowRoot));
+ expect(child.owner, equals(shadowRoot));
child.remove();
- expect(child.ownerScope, isNull);
+ expect(child.owner, isNull);
});
}
</script>
« no previous file with comments | « sky/tests/dom/document-child-mutations.sky ('k') | sky/tests/dom/replaceChild.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698