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 = "CFInstanceRPC";
     24       (function() {
     25         try {
     26           var cf = new CFInstance({
     27             node: "toBeReplaced",
     28             src: "CFInstance_rpc_frame.html"
     29           });
     30 
     31           var handleCallback = function(arg) {
     32             // alert(arg);
     33             if (arg == "hola!") {
     34               onSuccess(testName, 1);
     35             }
     36           };
     37 
     38           cf.rpc.expose("handleCallback", handleCallback);
     39           cf.rpc.init();
     40 
     41           cf.rpc.callRemote("rpcHandler", ["whatcho talkin 'bout, willis!?"]);
     42         } catch (e) {
     43           onFailure(testName, 1,
     44                     "CFInstance constructor failed with error: " + e);
     45         } 
     46       })();
     47     </script>
     48     <p>Tests CFInstance event handling on iframes</p>
     49   </body>
     50 </html>
     51 
     52