| 
0
 | 
     1 <!DOCTYPE html>
 | 
| 
 | 
     2 <html>
 | 
| 
 | 
     3 <head>
 | 
| 
 | 
     4   <meta charset="utf-8">
 | 
| 
 | 
     5   <title>QUnit LoadHide</title>
 | 
| 
 | 
     6   <link rel="stylesheet" href="resources/qunit.css">
 | 
| 
 | 
     7 </head>
 | 
| 
 | 
     8 <body>
 | 
| 
 | 
     9   <div id="qunit"></div>
 | 
| 
 | 
    10   <div id="qunit-fixture">
 | 
| 
 | 
    11 
 | 
| 
 | 
    12     <div style="width:600px;">
 | 
| 
 | 
    13       <iframe src="resources/frame.content.html" width="100%" scrolling="no"></iframe>
 | 
| 
 | 
    14     </div>
 | 
| 
 | 
    15 
 | 
| 
 | 
    16   </div>
 | 
| 
 | 
    17   <script src="resources/qunit.js"></script>
 | 
| 
 | 
    18   <script src="resources/jquery.js"></script>
 | 
| 
 | 
    19   <script src="resources/testLib.js"></script>
 | 
| 
 | 
    20   <script src="../js/iframeResizer.min.js"></script>
 | 
| 
 | 
    21   <script>
 | 
| 
 | 
    22   
 | 
| 
 | 
    23     'use strict';
 | 
| 
 | 
    24     var msgId = '[iFrameSizerTest]:';
 | 
| 
 | 
    25 
 | 
| 
 | 
    26 		asyncTest( "setHeightCalculationMethod", function() {
 | 
| 
 | 
    27 
 | 
| 
 | 
    28       var callbackCounter = 0;
 | 
| 
 | 
    29 
 | 
| 
 | 
    30       iFrameResize({
 | 
| 
 | 
    31         log:true,
 | 
| 
 | 
    32         interval:0,
 | 
| 
 | 
    33         enablePublicMethods:true,
 | 
| 
 | 
    34         resizedCallback:function(messageData){
 | 
| 
 | 
    35 
 | 
| 
 | 
    36           switch  (''+(++callbackCounter)){
 | 
| 
 | 
    37             case '1':
 | 
| 
 | 
    38               sendMessage('setHeightCalculationMethod');  
 | 
| 
 | 
    39               break;
 | 
| 
 | 
    40             default:
 | 
| 
 | 
    41               ok( true, 'iFrame detected content change');
 | 
| 
 | 
    42               start();
 | 
| 
 | 
    43           }
 | 
| 
 | 
    44 
 | 
| 
 | 
    45         }
 | 
| 
 | 
    46       });
 | 
| 
 | 
    47     });
 | 
| 
 | 
    48     
 | 
| 
 | 
    49   </script>
 | 
| 
 | 
    50 </body>
 | 
| 
 | 
    51 </html> |