|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
|
4 <html> |
|
5 |
|
6 <head> |
|
7 <meta charset="utf-8"> |
|
8 <title>Concurrent InstallTrigger tests</title> |
|
9 <script type="text/javascript"> |
|
10 function installCallback(url, status) { |
|
11 window.installTriggerCallback({loc: location.href, xpi: url}); |
|
12 document.getElementById("status").textContent = status; |
|
13 } |
|
14 |
|
15 function startInstall() { |
|
16 var root = location.href.replace("concurrent_installs.html", ""); |
|
17 var triggers = { |
|
18 "Unsigned XPI": root + "unsigned.xpi" |
|
19 }; |
|
20 try { |
|
21 document.getElementById("return").textContent = InstallTrigger.install(triggers, installCallback); |
|
22 } |
|
23 catch (e) { |
|
24 document.getElementById("return").textContent = "exception"; |
|
25 throw e; |
|
26 } |
|
27 } |
|
28 </script> |
|
29 </head> |
|
30 <body> |
|
31 <p>InstallTrigger tests</p> |
|
32 <button id="installnow" onclick="startInstall()">Click to install</button> |
|
33 <p id="return"></p> |
|
34 <p id="status"></p> |
|
35 </body> |
|
36 </html> |