OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script type="text/javascript" | |
4 src="chrome_frame_tester_helpers.js"></script> | |
5 <script type="text/javascript" | |
6 src="CFInstall.js"></script> | |
7 </head> | |
8 <body> | |
9 <div id="statusPanel" style="border: 1px solid red; width: 100%"> | |
10 Test running.... | |
11 </div> | |
12 | |
13 <script type="text/javascript"> | |
14 var testName = 'CFInstallDismiss'; | |
15 (function(){ | |
16 try{ | |
17 // Testing over-rides for GCF detection code. | |
18 CFInstall._force = true; | |
19 CFInstall._forceValue = false; | |
20 | |
21 // Clobber prompt suppression cookie if set. | |
22 document.cookie = 'disableGCFCheck=0;path=/'; | |
23 | |
24 CFInstall.check({ | |
25 id: 'prompt', | |
26 mode: 'overlay' | |
27 }); | |
28 | |
29 var p = byId('prompt'); | |
30 | |
31 if (!p) { | |
32 onFailure(testName, 1, 'prompt not created with correct ID'); | |
33 return; | |
34 } | |
35 | |
36 byId('chromeFrameCloseButton').click(); | |
37 | |
38 if (document.cookie.indexOf('disableGCFCheck=1') == -1) { | |
39 onFailure(testName, 1, 'dismiss cookie not set'); | |
40 return; | |
41 } | |
42 | |
43 onSuccess(testName, 1); | |
44 | |
45 } catch (e) { | |
46 onFailure(testName, 1, | |
47 'CFInstall overlay prompt failed with error: '+e); | |
48 } | |
49 })(); | |
50 </script> | |
51 <p>Tests CFInstall overlay prompt</p> | |
52 </body> | |
53 </html> | |
OLD | NEW |