Permalink
Browse files

Tests: Fix errors and visual glitches seen in Chrome

(cherry picked from commit 797516a)

Closes gh-7508
Fixes gh-7499
  • Loading branch information...
gabrielschulhof committed Jun 13, 2014
1 parent b068128 commit ede2f5fa99523da4d2f6909e69e7eff070d2ce1f
@@ -1,27 +1,18 @@
$.testHelper.setPushState();
(function( $ ) {
module( "beforenavigate", {
setup: function() {
location.hash = "";
},
teardown: function() {
$( window ).unbind( "beforenavigate" );
}
});
asyncTest( "changes to the url trigger a beforenavigate", function() {
asyncTest( "changes to the url trigger a beforenavigate", function() {
setTimeout( function() {
ok( false, "beforenavigate should have been triggered" );
start();
}, 3000 );
$( window ).one( "beforenavigate", function( event, data ) {
ok( true, "beforenavigate should have been triggered" );
$.testHelper.detailedEventCascade([
function() {
location.hash = "foo";
},
{
beforenavigate: { src: $( window ), event: "beforenavigate.changesToUrlTrigger1" }
},
function( result ) {
deepEqual( result.beforenavigate.timedOut, false,
"beforenavigate event was triggered" );
start();
});
location.hash = "foo";
});
})( jQuery );
}
]);
});
@@ -229,7 +229,7 @@ $.testHelper.delayStart();
function(){
$.mobile.changePage = newChangePage;
$('#non-ajax-form').one('submit', function(event){
$('#non-ajax-form').one('submit', function(event){
ok(true, 'submit callbacks are fired');
event.preventDefault();
}).submit();
@@ -16,6 +16,7 @@
<script src="../../../jquery.setNameSpace.js"></script>
<script src="../../../jquery.testHelper.js"></script>
<script src="../../../../external/qunit/qunit.js"></script>
<link rel="stylesheet" href="../../../jqm-tests.css"/>
<script>
$.testHelper.asyncLoad([
[
View
@@ -2,3 +2,11 @@
position: absolute !important;
top: -10000px !important;
}
[data-nstest-role='header'][data-nstest-position='fixed'] {
top: -10000px !important;
}
[data-nstest-role='footer'][data-nstest-position='fixed'] {
left: -10000px !important;
}

0 comments on commit ede2f5f

Please sign in to comment.