|
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 <title>InstallTrigger tests</title> |
|
8 <script type="text/javascript"> |
|
9 function startInstall() { |
|
10 var whiteUrl = "https://example.org/"; |
|
11 |
|
12 try { |
|
13 Object.defineProperty(window, "location", { value : { href : whiteUrl } }); |
|
14 throw new Error("Object.defineProperty(window, 'location', ...) should have thrown"); |
|
15 } catch (exc) { |
|
16 if (!(exc instanceof TypeError)) |
|
17 throw exc; |
|
18 } |
|
19 Object.defineProperty(document, "documentURIObject", { spec : { href : whiteUrl } }); |
|
20 |
|
21 InstallTrigger.install({ |
|
22 "Unsigned XPI": "http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/unsigned.xpi" |
|
23 }); |
|
24 } |
|
25 </script> |
|
26 </head> |
|
27 <body onload="startInstall()"> |
|
28 <p>InstallTrigger tests</p> |
|
29 </body> |
|
30 </html> |