blob: ff47036bd13ff83e71ed0b50e18ce0cfdf0791d8 [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 bool hasChildNodes()
/// Returns true if this node has any children.
/// @description Checks expected values.
import "dart:html";
import "../../../Utils/expect.dart";
main() {
IFrameElement x = new IFrameElement();
Expect.isFalse(x.hasChildNodes(), 'no children');
x.append(new Comment("foo"));
x.append(new Comment("bar"));
Expect.isTrue(x.hasChildNodes(), 'two children');
Expect.isTrue(x.hasChildNodes(), 'one child');
Expect.isFalse(x.hasChildNodes(), 'all removed');