changed up the unit test so that it didn't load the page in an iframe, which seemed to mess things up on the test server.

This commit is contained in:
scottjehl 2011-07-17 16:29:05 -04:00
parent 03f32728c6
commit a93cdbcea0
3 changed files with 29 additions and 12 deletions

View file

@ -211,16 +211,7 @@
start();
}, 500);
});
asyncTest( "page element is generated when not present in initial markup", function(){
expect( 1 );
$("<iframe src='nopage.html'>").appendTo("body").load(function(){
ok( $(this).contents().find( ".ui-page" ).length, 1 );
$(this).remove();
start();
});
});
asyncTest( "page element is generated when not present in ajax'd markup", function(){
expect( 1 );

View file

@ -0,0 +1,12 @@
/*
* mobile init tests
*/
(function($){
test( "page element is generated when not present in initial markup", function(){
ok( $( ".ui-page" ).length, 1 );
});
})(jQuery);

View file

@ -3,13 +3,27 @@
<head>
<meta charset="UTF-8" />
<title>jQuery Mobile Init Test Suite</title>
<!-- meta viewport left out on purpose for test append -->
<script src="../../../js/jquery.js"></script>
<script src="../jquery.setNameSpace.js"></script>
<script src="../../../js/"></script>
<script src="../../../external/qunit.js"></script>
<script src="../../jquery.testHelper.js"></script>
<script src="init_core_nopage.js"></script>
<link rel="stylesheet" href="../../../themes/default" />
<link rel="stylesheet" href="../../../external/qunit.css"/>
<style>
[data-nstest-role="page"], [data-nstest-role="dialog"] {
position: static !important;
}
</style>
</head>
<p>testing</p>
<h1 id="qunit-header">jQuery Mobile Init Test Suite</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests">
</ol>
</body>
</html>