Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
switch live to on
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbender committed Dec 19, 2012
1 parent e497aa2 commit 3571bed
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
26 changes: 13 additions & 13 deletions tests/unit/page/page_core.js
Expand Up @@ -22,7 +22,7 @@
etargets.push( e.target );
});

$( "#c" ).live( "pagebeforecreate", function( e ){
$( "body" ).on("pagebeforecreate", "#c", function( e ){
cEvents.push( e.type );
cTargets.push( e.target );
return false;
Expand Down Expand Up @@ -116,16 +116,16 @@

$.mobile.ignoreContentEnabled = false;
});


asyncTest( "page container is updated to page theme at pagebeforeshow", function(){

expect( 1 );

var pageTheme = "ui-overlay-" + $.mobile.activePage.page( "option", "theme" );

$.mobile.pageContainer.removeClass( pageTheme );

$.mobile.activePage
.bind( "pagebeforeshow", function(){
ok( $.mobile.pageContainer.hasClass( pageTheme ), "Page container has the same theme as the page on pagebeforeshow" );
Expand All @@ -134,15 +134,15 @@
.trigger( "pagebeforeshow" );

} );

asyncTest( "page container is updated to page theme at pagebeforeshow", function(){

expect( 1 );

var pageTheme = "ui-overlay-" + $.mobile.activePage.page( "option", "theme" );

$.mobile.pageContainer.addClass( pageTheme );

$.mobile.activePage
.bind( "pagebeforehide", function(){
ok( !$.mobile.pageContainer.hasClass( pageTheme ), "Page container does not have the same theme as the page on pagebeforeshow" );
Expand All @@ -151,7 +151,7 @@
.trigger( "pagebeforehide" );

} );



})(jQuery);
6 changes: 1 addition & 5 deletions tests/unit/widget/index.html
Expand Up @@ -32,11 +32,7 @@
</head>
<body>

<h1 id="qunit-header">jQuery Mobile Widget Test Suite</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests">
</ol>
<div id="qunit"></div>

<div id="qunit-fixture">

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/widget/widget_init.js
Expand Up @@ -6,7 +6,7 @@

module( 'jquery.mobile.widget.js' );

$( "#foo" ).live( 'pageinit', function(){
$( document ).on( 'pageinit', "#foo", function(){
// ordering sensitive here, the value has to be set after the call
// so that if the widget factory says that its not yet initialized,
// which is an exception, the value won't be set
Expand Down

0 comments on commit 3571bed

Please sign in to comment.