3 <script type="text/javascript"
4 src="chrome_frame_tester_helpers.js"></script>
5 <script type="text/javascript"
6 src="CFInstall.js"></script>
9 <div id="statusPanel" style="border: 1px solid red; width: 100%">
14 <div id="prev">before</div><div id="toBeReplaced">
15 fallback content goes here
16 </div><div id="after">after</div>
18 <script type="text/javascript">
19 var testName = 'CFInstallPlace';
22 // Testing over-rides for GCF detection code.
23 CFInstall._force = true;
24 CFInstall._forceValue = false;
29 cssText: 'width: 400px; height: 300px;',
33 var p = byId('prompt');
36 onFailure(testName, 1, 'prompt not created with correct ID');
40 var fc = document.body.firstChild;
42 if (fc.nodeType == 1 && fc.tagName == 'IFRAME') {
43 onFailure(testName, 1, 'prompt placed incorrectly');
47 if (p.tagName != 'IFRAME') {
48 onFailure(testName, 1, 'prompt has wrong tag type');
52 // Ensure that it got dropped into the right bit of the DOM
53 if (byId('prev').nextSibling != p) {
54 onFailure(testName, 1, 'prompt placed incorrectly');
58 // Make sure that the geometry took.
59 if (p.style.width != '400px') {
60 onFailure(testName, 1, 'prompt sized incorrectly');
64 onSuccess(testName, 1);
67 onFailure(testName, 1,
68 'CFInstall placement failed with error: '+e);
72 <p>Tests CFInstall prompt placement</p>