blob: 1d17422c288e3e7a2157d3b715693e0be00921a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
<html>
<head>
<script type="text/javascript"
src="chrome_frame_tester_helpers.js"></script>
<script type="text/javascript"
src="CFInstall.js"></script>
</head>
<body>
<div id="statusPanel" style="border: 1px solid red; width: 100%">
Test running....
</div>
<script type="text/javascript">
var testName = 'CFInstallOverlay';
(function(){
try{
// Testing over-rides for GCF detection code.
CFInstall._force = true;
CFInstall._forceValue = false;
// Clobber prompt supression cookie if set.
document.cookie = 'disableGCFCheck=0;path=/';
CFInstall.check({
id: 'prompt',
mode: 'overlay'
});
var p = byId('prompt');
if (!p) {
onFailure(testName, 1, 'prompt not created with correct ID');
return;
}
// Make sure the prompt is parented in the display table.
if (p.parentNode != byId('chromeFrameIframeHolder')) {
onFailure(testName, 1, 'prompt not parented correctly');
return;
}
var lc = document.body.lastChild;
if (lc.nodeType != 1 || !lc.firstChild &&
lc.firstChild != byId('chromeFrameOverlayUnderlay')) {
onFailure(testName, 1, 'underlay placed incorrectly');
return;
}
if (lc.nodeType != 1 || !lc.firstChild &&
lc.firstChild.nextSibling != byId('chromeFrameOverlayContent')) {
onFailure(testName, 1, 'prompt placed incorrectly');
return;
}
onSuccess(testName, 1);
} catch (e) {
onFailure(testName, 1,
'CFInstall overlay prompt failed with error: '+e);
}
})();
</script>
<p>Tests CFInstall overlay prompt</p>
</body>
</html>
|