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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/xul-document-load/test010.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<!--
     1.6 +Any copyright is dedicated to the Public Domain.
     1.7 +http://creativecommons.org/licenses/publicdomain/
     1.8 +-->
     1.9 +<window id="main"
    1.10 +        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    1.11 +        style="background-color: green">
    1.12 +  <?xml-stylesheet href="test010.css" type="text/css"?>
    1.13 +  <?xul-overlay href="test010-overlay.xul" ?>
    1.14 +  <script>
    1.15 +  function assert(x, msg) {
    1.16 +    if(!x) {
    1.17 +      dump("assertion failed! " + msg + "\n");
    1.18 +      document.getElementById("main").style.backgroundColor = "red";
    1.19 +    }
    1.20 +  }
    1.21 +  
    1.22 +  try {
    1.23 +    assert(document.firstChild.id == "main", "nothing in prolog");
    1.24 +    var winEl = document.documentElement;
    1.25 +    assert(winEl.childNodes[0].nodeName == "xml-stylesheet", "xml-stylesheet PI is in the correct place");
    1.26 +    assert(winEl.childNodes[1].nodeName == "xul-overlay", "xul-overlay PI is in the correct place");
    1.27 +  } catch(e) {
    1.28 +    dump(e);
    1.29 +    assert(false, e);
    1.30 +    throw e;
    1.31 +  }
    1.32 +  </script>
    1.33 +</window>
    1.34 \ No newline at end of file

mercurial