testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.head-02.html
author James Graham <james@hoppipolla.co.uk>
Fri, 08 Apr 2016 12:17:53 +0100
changeset 292674 0cd33f35bcb4feea6fcdfbc0f6f09912e2ad106c
parent 216659 f642698590301f923237de6d2479429096b61edd
permissions -rw-r--r--
Bug 1263631 - Update web-platform-tests to revision 8d896c2015ab1e50ad00a0013700f87813d9364c, a=testonly MozReview-Commit-ID: 7NCdvJqZ1UH

<!DOCTYPE html>
<title>document.head</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-document-head">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
var HTML = "http://www.w3.org/1999/xhtml";
test(function() {
  var head = document.getElementsByTagName("head")[0];
  assert_equals(document.head, head);
  var head2 = document.createElementNS(HTML, "blah:head");
  document.documentElement.insertBefore(head2, head);
  assert_equals(document.head, head2);
  var head3 = document.createElementNS("http://www.example.org/", "blah:head");
  document.documentElement.insertBefore(head3, head2);
  assert_equals(document.head, head2);
});
</script>