           <body>
             <script>
               $.get("/xhr/html", function(response, status, xhr) {
-                window.html = xhr.responseXML;
+                document.body.appendChild(xhr.responseXML);
               });
             </script>
           </body>

      assert.equal "Text", browser.document.text


  describe "HTML document", ->
    before (done)->
      brains.get "/xhr/get-html", (req, res)->
        res.send """

        """
      brains.get "/xhr/html", (req, res)->
        res.type("text/html")
        res.send("<foo><bar id='bar'></foo>")
      brains.ready done

    before (done)->
      browser.visit("http://localhost:3003/xhr/get-html", done)

    it "should parse HTML document", ->
      browser.assert.element "foo > bar#bar"


  after ->
