1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/mozapps/extensions/test/xpinstall/concurrent_installs.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 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 +<head> 1.10 + <meta charset="utf-8"> 1.11 +<title>Concurrent InstallTrigger tests</title> 1.12 +<script type="text/javascript"> 1.13 +function installCallback(url, status) { 1.14 + window.installTriggerCallback({loc: location.href, xpi: url}); 1.15 + document.getElementById("status").textContent = status; 1.16 +} 1.17 + 1.18 +function startInstall() { 1.19 + var root = location.href.replace("concurrent_installs.html", ""); 1.20 + var triggers = { 1.21 + "Unsigned XPI": root + "unsigned.xpi" 1.22 + }; 1.23 + try { 1.24 + document.getElementById("return").textContent = InstallTrigger.install(triggers, installCallback); 1.25 + } 1.26 + catch (e) { 1.27 + document.getElementById("return").textContent = "exception"; 1.28 + throw e; 1.29 + } 1.30 +} 1.31 +</script> 1.32 +</head> 1.33 +<body> 1.34 +<p>InstallTrigger tests</p> 1.35 +<button id="installnow" onclick="startInstall()">Click to install</button> 1.36 +<p id="return"></p> 1.37 +<p id="status"></p> 1.38 +</body> 1.39 +</html>