Tizen 2.1 base
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.0.1pre / tests / unit / widget / widget_init.js
1 /*
2  * mobile widget unit tests
3  */
4 (function($){
5         var widgetInitialized = false;
6
7         module( 'jquery.mobile.widget.js' );
8
9         $( "#foo" ).live( 'pageinit', function(){
10                 // ordering sensitive here, the value has to be set after the call
11                 // so that if the widget factory says that its not yet initialized,
12                 // which is an exception, the value won't be set
13                 $( "#foo-slider" ).slider( 'refresh' );
14                 widgetInitialized = true;
15         });
16
17         test( "page is enhanced before init is fired", function() {
18                 ok( widgetInitialized );
19         });
20 })( jQuery );