toolkit/mozapps/extensions/test/xpinstall/installtrigger.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/mozapps/extensions/test/xpinstall/installtrigger.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     1.5 +          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     1.6 +
     1.7 +<html>
     1.8 +
     1.9 +<!-- This page will accept some json as the uri query and pass it to InstallTrigger.install -->
    1.10 +
    1.11 +<head>
    1.12 +<title>InstallTrigger tests</title>
    1.13 +<script type="text/javascript">
    1.14 +function installCallback(url, status) {
    1.15 +  document.getElementById("status").textContent = status;
    1.16 +}
    1.17 +
    1.18 +function startInstall() {
    1.19 +  var text = decodeURIComponent(document.location.search.substring(1));
    1.20 +  var triggers = JSON.parse(text);
    1.21 +  try {
    1.22 +    document.getElementById("return").textContent = InstallTrigger.install(triggers, installCallback);
    1.23 +  }
    1.24 +  catch (e) {
    1.25 +    document.getElementById("return").textContent = "exception";
    1.26 +    throw e;
    1.27 +  }
    1.28 +}
    1.29 +</script>
    1.30 +</head>
    1.31 +<body onload="startInstall()">
    1.32 +<p>InstallTrigger tests</p>
    1.33 +<p id="return"></p>
    1.34 +<p id="status"></p>
    1.35 +</body>
    1.36 +</html>

mercurial