Home | History | Annotate | Download | only in data
      1 <html>
      2   <!-- This page is meant to loaded inside the host browser (IE, FF, etc.) -->
      3   <head>
      4     <script type="text/javascript" 
      5             src="chrome_frame_tester_helpers.js"></script>
      6     <script type="text/javascript" 
      7             src="CFInstance.js"></script>
      8   </head>
      9 
     10   <body>
     11     <div id="statusPanel" style="border: 1px solid red; width: 100%">
     12       Test running....
     13     </div>
     14 
     15     <div id="parent">
     16       <div id="prev">before</div><div id="toBeReplaced"> 
     17         fallback content goes here 
     18       </div><div id="after">after</div>
     19     </div>
     20     <script type="text/javascript">
     21       var testName = "CFInstanceBasic";
     22       (function(){
     23         try{
     24           var cf = new CFInstance({
     25             src: "CFInstance_basic_frame.html",
     26             node: "toBeReplaced"
     27           });
     28 
     29           if (document.getElementById("parent") != cf.parentNode ) {
     30             onFailure(testName, 1, "parent node mismatch");
     31             return;
     32           }
     33 
     34           if (document.getElementById("prev").nextSibling != cf) {
     35             onFailure(testName, 1, "sibling node mismatch");
     36             return;
     37           }
     38 
     39           if (document.getElementById("after").previousSibling != cf) {
     40             onFailure(testName, 1, "sibling node mismatch");
     41             return;
     42           }
     43 
     44           onSuccess(testName, 1);
     45 
     46         } catch (e) {
     47           onFailure(testName, 1,
     48                     "CFInstance constructor failed with error: "+e);
     49         } 
     50       })();
     51     </script>
     52     <p>Tests ChromeFrame Navigation</p>
     53   </body>
     54 </html>
     55 
     56