| OLD | NEW | 
| (Empty) |  | 
 |   1 <?xml version="1.0" encoding="iso-8859-1"?> | 
 |   2 <html xmlns="http://www.w3.org/1999/xhtml"> | 
 |   3   <head> | 
 |   4     <title>HTML Test: Browsing context is first created</title> | 
 |   5     <link rel="author" title="Intel" href="http://www.intel.com/" /> | 
 |   6     <script src="../../../../../resources/testharness.js"></script> | 
 |   7     <script src="../../../../../resources/testharnessreport.js"></script> | 
 |   8   </head> | 
 |   9   <body> | 
 |  10     <div id="log"></div> | 
 |  11     <script> | 
 |  12     <![CDATA[ | 
 |  13  | 
 |  14     var doc, iframe; | 
 |  15  | 
 |  16     setup(function () { | 
 |  17       iframe = document.createElement("iframe"); | 
 |  18       document.body.appendChild(iframe); | 
 |  19       doc = iframe.contentDocument; | 
 |  20     }); | 
 |  21  | 
 |  22     test(function () { | 
 |  23       assert_equals(iframe.contentWindow.history.length, 1, "The history.length 
    should be 1."); | 
 |  24     }, "Check the history.length of the first created browsing context"); | 
 |  25  | 
 |  26     test(function () { | 
 |  27       assert_equals(doc.documentURI, "about:blank", "The document's address shou
    ld be 'about:blank'."); | 
 |  28       assert_equals(doc.URL, "about:blank", "The document's address should be 'a
    bout:blank'."); | 
 |  29       assert_equals(doc.contentType, "text/html", "The document should be an HTM
    L document."); | 
 |  30       assert_equals(doc.doctype, null, "The docType of a document without a docu
    ment type declaration should be null."); | 
 |  31       assert_equals(doc.compatMode, "BackCompat", "The compatMode of a document 
    without a document type declaration should be 'BackCompat'."); | 
 |  32       assert_equals(doc.characterSet, "UTF-8", "The document's encoding should b
    e 'UTF-8'."); | 
 |  33       assert_equals(iframe.contentWindow.parent.document, document); | 
 |  34       assert_equals(doc.referrer, document.URL, "The document's referrer should 
    be its creator document's address."); | 
 |  35     }, "Check the document's meta data"); | 
 |  36  | 
 |  37     test(function () { | 
 |  38       assert_equals(doc.readyState, "complete", "The readyState attribute should
     be 'complete'."); | 
 |  39     }, "Check the document's status"); | 
 |  40  | 
 |  41     test(function () { | 
 |  42       assert_equals(doc.childNodes.length, 1, "The document must have only one c
    hild."); | 
 |  43       assert_equals(doc.documentElement.tagName, "HTML"); | 
 |  44       assert_equals(doc.documentElement.childNodes.length, 2, "The HTML element 
    should have 2 children."); | 
 |  45       assert_equals(doc.documentElement.childNodes[0].tagName, "HEAD", "The firs
    t child of HTML element should be a HEAD element."); | 
 |  46       assert_false(doc.documentElement.childNodes[0].hasChildNodes(), "The HEAD 
    element should not have children."); | 
 |  47       assert_equals(doc.documentElement.childNodes[1].tagName, "BODY", "The seco
    nd child of HTML element should be a BODY element."); | 
 |  48       assert_false(doc.documentElement.childNodes[1].hasChildNodes(), "The BODY 
    element should not have children."); | 
 |  49     }, "Check the document's content"); | 
 |  50  | 
 |  51     ]]> | 
 |  52     </script> | 
 |  53   </body> | 
 |  54 </html> | 
| OLD | NEW |