ment = document.querySelector("template").content.ownerDocument;
      assert_equals(templateDocument.compatMode, "CSS1Compat");
      assert_equals(document.compatMode, "BackCompat");
      var container = document.querySelector("div");
      var button1 = container.querySelector(".foo");
      assert_true(button1 instanceof Element);
      templateDocument.appendChild(button1);
      assert_true(templateDocument.querySelector(".Foo") instanceof Element);
      assert_false(templateDocument.querySelector("