Skip to content

Commit

Permalink
hifive#169 ロードするjQMのバージョンを1.2.0にし、リンクのajax化を無効にした(テストコードはver.1.1.2のまま)
Browse files Browse the repository at this point in the history
  • Loading branch information
simdy committed Mar 10, 2013
1 parent b96ccda commit 7957031
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions hifive/src/main/webapp/test/h5.ui.jqm.manager.js
Expand Up @@ -29,8 +29,14 @@ $(function() {
//
// =========================================================================

$(document).bind('mobileinit', function() {
// テストページのリンクが押下できなくなるため無効にする
$.mobile.linkBindingEnabled = false;
$.mobile.loadingMessage = false;
});

// jQueryMobileの読み込み
h5.u.loadScript("../res/js/lib/jqplugins/jqm/1.1.0/jquery.mobile-1.1.0.js", {
h5.u.loadScript("../res/js/lib/jqplugins/jqm/1.2.0/jquery.mobile-1.2.0.js", {
async: false
});

Expand Down Expand Up @@ -1157,21 +1163,23 @@ $(function() {
// Body
//=============================
asyncTest('動的コントローラをバインド後unbindを実行し、別ページに遷移する', 2, function() {
var c = h5.core.controller('#test23', {
__name: 'Test23Controller',
__ready: function() {
try {
this.unbind();
changePage('#test24', true);
pageremove('test23');
ok(true, '動的に生成したコントローラをunbind後、ページ遷移を実行してもエラーが発生しないこと。');
} catch (e) {
ok(false, 'テスト失敗');
}
var c = h5.core.controller('#test23',
{
__name: 'Test23Controller',
__ready: function() {
try {
this.unbind();
changePage('#test24', true);
pageremove('test23');
ok(true, '動的に生成したコントローラをunbind後、ページ遷移を実行してもエラーが発生しないこと。');
} catch (e) {
ok(false, 'テスト失敗');
}

equal(isDisposed(c), false, 'unbindしたコントローラはjQMManagerの管理対象から除外されるのでdisposeされないこと');
start();
}
});
equal(isDisposed(c), false,
'unbindしたコントローラはjQMManagerの管理対象から除外されるのでdisposeされないこと');
start();
}
});
});
});

0 comments on commit 7957031

Please sign in to comment.