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