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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/mozapps/extensions/test/xpinstall/bug645699.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,30 @@
     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 +<title>InstallTrigger tests</title>
    1.11 +<script type="text/javascript">
    1.12 +function startInstall() {
    1.13 +  var whiteUrl = "https://example.org/";
    1.14 +
    1.15 +  try {
    1.16 +    Object.defineProperty(window, "location", { value : { href : whiteUrl }	});
    1.17 +    throw new Error("Object.defineProperty(window, 'location', ...) should have thrown");
    1.18 +  } catch (exc) {
    1.19 +    if (!(exc instanceof TypeError))
    1.20 +      throw exc;
    1.21 +  }
    1.22 +  Object.defineProperty(document, "documentURIObject", { spec : { href : whiteUrl }	});
    1.23 +
    1.24 +  InstallTrigger.install({
    1.25 +    "Unsigned XPI": "http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/unsigned.xpi"
    1.26 +  });
    1.27 +}
    1.28 +</script>
    1.29 +</head>
    1.30 +<body onload="startInstall()">
    1.31 +<p>InstallTrigger tests</p>
    1.32 +</body>
    1.33 +</html>

mercurial