mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
18 lines
482 B
Dart
18 lines
482 B
Dart
import 'dart:sky';
|
|
|
|
import 'package:test/test.dart';
|
|
|
|
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.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));
|
|
});
|
|
}
|