layout/reftests/xul-document-load/test010.xul

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     1 <?xml version="1.0"?>
     2 <!--
     3 Any copyright is dedicated to the Public Domain.
     4 http://creativecommons.org/licenses/publicdomain/
     5 -->
     6 <window id="main"
     7         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     8         style="background-color: green">
     9   <?xml-stylesheet href="test010.css" type="text/css"?>
    10   <?xul-overlay href="test010-overlay.xul" ?>
    11   <script>
    12   function assert(x, msg) {
    13     if(!x) {
    14       dump("assertion failed! " + msg + "\n");
    15       document.getElementById("main").style.backgroundColor = "red";
    16     }
    17   }
    19   try {
    20     assert(document.firstChild.id == "main", "nothing in prolog");
    21     var winEl = document.documentElement;
    22     assert(winEl.childNodes[0].nodeName == "xml-stylesheet", "xml-stylesheet PI is in the correct place");
    23     assert(winEl.childNodes[1].nodeName == "xul-overlay", "xul-overlay PI is in the correct place");
    24   } catch(e) {
    25     dump(e);
    26     assert(false, e);
    27     throw e;
    28   }
    29   </script>
    30 </window>

mercurial