blob: 480d38afcf17fd937b8f32e216ec72155bada677 [file] [log] [blame]
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// @assertion final Node parentNode
/// The parent node of this node.
/// from DOM-lelvel-3: if a node has just been created and not yet added to the tree,
/// or if it has been removed from the tree, this is null.
/// @description Checks expected parentNode values
import "dart:html";
import "../../../Utils/expect.dart";
void check(Node x) {
Expect.equals(null, x.parentNode, "before append $x");
var body = document.body;
Expect.equals(body, x.parentNode, "before remove $x");
Expect.equals(null, x.parentNode, "after remove $x");
main() {
List<Node> targets = [
new Comment("comment"),
new Text("text"),
// new DocumentFragment(),
for (Node x in targets) {