blob: 875eb956345d09e9906c40fd7ee60dce15f19d73 [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.
* @description This tests for a bug in replaceChild where it would fail to
* replace an element if it was the first child of its container.
* See <a href="">bug 6782</a>
* for details.
import "dart:html";
import "../../testcommon.dart";
main() {
<div><div id="replace"></div></div>
<div id="result"></div></body>
''', treeSanitizer: new NullTreeSanitizer());
var expected = document.body.querySelector('div');
var node = document.createElement("div");
shouldBe(node.parentNode, expected);