blob: 4beef07ed9f9c22181f14a93400e4eead6e534b5 [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 Node insertAllBefore(Iterable<Node> newNodes, Node refChild)
* Inserts all of the nodes into this node directly before refChild.
* MDN: If referenceElement is null, newElement is inserted at the end of the
* list of child nodes.
* @description Checks expected dom after insert
*/
import "dart:html";
import "../../../Utils/expect.dart";
main() {
IFrameElement iframe = new Element.html('<iframe>Content</iframe>');
iframe.insertAllBefore([new HRElement(), new AnchorElement()], null);
Expect.equals('<iframe>Content<hr><a></a></iframe>', iframe.outerHtml,
'insert before null');
}