This file was deleted.

@@ -19,8 +19,7 @@
<script>
$.testHelper.asyncLoad([
[
"widgets/page",
"widgets/page.sections"
"widgets/page"
],
[ "jquery.mobile.init" ],
[
@@ -21,7 +21,6 @@
[
"widgets/dialog",
"widgets/page",
"widgets/page.sections",
"widgets/popup"
],
[ "jquery.mobile.init" ],
@@ -21,7 +21,6 @@
[
"widgets/dialog",
"widgets/page",
"widgets/page.sections",
"widgets/popup"
],
[ "jquery.mobile.init" ],
@@ -14,14 +14,13 @@
<script>
$.testHelper.asyncLoad([
[
"widgets/page.sections"
],
[
"widgets/page",
"jquery.mobile.links",
"jquery.mobile.buttonMarkup",
"widgets/toolbar",

],
[ "page_title_entity.js" ],
[ "jquery.mobile.init" ]
[ "jquery.mobile.init" ],
[ "page_title_entity.js" ]
]);
</script>

File renamed without changes.
@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery Mobile Popup Test Suite</title>

<script src="../../../external/requirejs/require.js"></script>
<script src="../../../js/requirejs.config.js"></script>
<script src="../../../js/jquery.tag.inserter.js"></script>
<script src="../../jquery.setNameSpace.js"></script>
<script src="../../../tests/jquery.testHelper.js"></script>


<link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css"/>
<link rel="stylesheet" href="../../../external/qunit.css"/>
<script src="../../../external/qunit.js"></script>
<script>
( function( $, undefined ) {
// Set the default transition to "fade" if specified in the query
if ( !!~location.search.indexOf( "setFadeTransition" ) ) {
$( document ).one( "mobileinit", function() {
$.mobile.popup.prototype.options.transition = "fade";
});
}
})( jQuery );
</script>
<script>
$.testHelper.asyncLoad([
[
"widgets/popup",
"widgets/listview",
"widgets/dialog"
],
[ "jquery.mobile.init" ],
[
"popup_core.js"
]
]);
</script>

<script src="../../swarminject.js"></script>
</head>
<body>
<div id="qunit"></div>

<div data-nstest-role="page" id="start-page">
<div data-nstest-role="content" id="page-content">
<div data-nstest-role="popup" id="test-popup">
<p>This is the test popup</p>
<a href="other.html">other.html</a>
</div>
<div data-nstest-role="popup" id="test-popup-2">
<p>This is another test popup</p>
</div>
<a id="open-xyzzy-popup" href="#xyzzy" data-nstest-rel="popup" data-nstest-role="button">Pop</a>
<a id="open-test-popup" href="#test-popup" data-nstest-rel="popup" data-nstest-role="button">Pop</a>
<ul data-nstest-role="listview">
<li id="open-test-popup-li"><a id="open-test-popup-li-link" href="#test-popup" data-nstest-rel="popup">Pop</a></li>
</ul>
<div data-nstest-role="popup" id="popup-sequence-test">
<a id="popup-sequence-test-open-dialog" href="popup-sequence-test-dialog.html">Dialog</a>
</div>

<div data-nstest-role="popup" id="test-history-popup" data-nstest-history="false">
<p>This is the test popup</p>
<a href="#" data-nstest-rel="back" data-nstest-role="button" data-nstest-theme="a" data-nstest-icon="delete" data-nstest-iconpos="notext" class="ui-btn-right">Close</a>
</div>

<div data-nstest-role="popup" id="test-destroy-popup" data-nstest-history="false">
<p>This is the test popup</p>
</div>

<div data-nstest-role="popup" id="test-popup-dismissible" data-nstest-dismissible="false">
<p>This is the test popup</p>
</div>
<a id="go-to-another-page" href="back-two.html">Go</a>

<div data-nstest-role="popup" id="popupLogin">
<form>
<input type="text" name="user" id="textBox" value="" placeholder="username" />
</form>
</div>

</div>
</div>

<div data-nstest-role="page" id="no-popups">
Page that is not the popup page
</div>
</body>
</html>
File renamed without changes.
File renamed without changes.

Large diffs are not rendered by default.

@@ -20,8 +20,6 @@
],
[ "jquery.mobile.init" ],
[
"select_events.js",
"select_native.js",
"select_core.js"
]
]);
@@ -5,7 +5,7 @@
(function($){
var libName = "jquery.mobile.forms.select",
originalDefaultDialogTrans = $.mobile.defaultDialogTransition,
originalDefTransitionHandler = $.mobile.defaultTransitionHandler,
originalDefTransitionHandler = $.mobile.defaultTransitionHandler.prototype.transition,
originalGetEncodedText = $.fn.getEncodedText,
resetHash, closeDialog;

@@ -79,7 +79,7 @@

teardown: function(){
$.mobile.defaultDialogTransition = originalDefaultDialogTrans;
$.mobile.defaultTransitionHandler = originalDefTransitionHandler;
$.mobile.defaultTransitionHandler.prototype.transition = originalDefTransitionHandler;

$.fn.getEncodedText = originalGetEncodedText;
window.encodedValueIsDefined = undefined;
@@ -140,22 +140,23 @@
});

asyncTest( "a large select menu should use the default dialog transition", function(){
var select;

$.testHelper.pageSequence([
resetHash,

function(timeout){
var select, old;

select = $("#select-choice-many-container-1 a");

//set to something else
$.mobile.defaultTransitionHandler = $.testHelper.decorate({
fn: $.mobile.defaultTransitionHandler,
old = $.mobile.defaultTransitionHandler.prototype.transition;

before: function(name){
deepEqual(name, $.mobile.defaultDialogTransition);
}
});
//set to something else
$.mobile.defaultTransitionHandler.prototype.transition = function(){
// check that the instantiated transition handlers transition name
// property matches the default transition
deepEqual(this.name, $.mobile.defaultDialogTransition);
return old.apply(this, arguments);
};

// bring up the dialog
select.trigger("click");
@@ -17,7 +17,7 @@
<link rel="stylesheet" href="../../../external/qunit.css"/>
<script src="../../../external/qunit.js"></script>

<script type="text/javascript" src="navigation_transitions.js"></script>
<script type="text/javascript" src="transitions_core.js"></script>
<script src="../../swarminject.js"></script>
</head>
<body>
@@ -2,8 +2,7 @@
* mobile navigation unit tests
*/
(function($){
var perspective,
transitioning = "ui-mobile-viewport-transitioning",
var transitioning = "ui-mobile-viewport-transitioning",
animationCompleteFn = $.fn.animationComplete,
defaultMaxTrans = $.mobile.maxTransitionWidth,

@@ -52,13 +51,6 @@
$.mobile.urlHistory.activeIndex = 0;
};


if( !$.support.cssTransform3d ) {
perspective = "viewport-fade";
} else {
perspective = "viewport-flip";
}

module('jquery.mobile.navigation.js', {
setup: function(){

@@ -82,7 +74,7 @@
resetQueues();
clearUrlHistory();

if ( location.hash !== "#harmless-default-page" ) {
if ( location.hash !== "#harmless-default-page" ) {
stop();

$(document).one("pagechange", function() {
@@ -115,7 +107,7 @@

function() {
onToComplete( function( el ) {
ok($("body").hasClass(perspective), "has viewport-flip or viewport-fade based on 3d transform");
ok($("body").hasClass("viewport-flip") || $("body").hasClass("viewport-fade"), "has viewport-flip or viewport-fade");
start();
});

@@ -163,7 +155,7 @@
onToComplete(function(){
ok($("#no-trans").hasClass("fade"), "has fade class");
start();
})
});

$("#default-trans > a").click();
});
@@ -188,22 +180,6 @@
});
});

asyncTest( "default transition is pop for a dialog", function(){
var defaultTransition = "pop";

if( !$.support.cssTransform3d ){
defaultTransition = "fade";
}

expect( 1 );
onToComplete(function(){
ok( $("#no-trans-dialog").hasClass(defaultTransition), "has pop class" );
start();
});

$("#default-trans-dialog > a").click();
});

test( "animationComplete return value", function(){
$.fn.animationComplete = animationCompleteFn;
equal($("#foo").animationComplete(function(){})[0], $("#foo")[0]);
@@ -362,7 +362,10 @@
decorate: function(opts){
var thisVal = opts.self || window;

console.log( "decorate called" );

return function(){
console.log( "decorated function called" );
var returnVal;
opts.before && opts.before.apply(thisVal, arguments);
returnVal = opts.fn.apply(thisVal, arguments);
@@ -4,26 +4,6 @@
(function($){
module("jquery.mobile.buttonMarkup.js");

test( "header buttons should have the header class", function() {
var headerButton1 = $("#header-button-1"),
headerButton2 = $("#header-button-2");

ok((headerButton1.hasClass("ui-btn-left") &&
headerButton2.hasClass("ui-btn-right")), "first header button should have class 'ui-btn-left' and the second one should have 'ui-btn-right'");
});

test( "control group buttons should be enhanced inside a footer", function(){
var group, linkCount;

group = $("#control-group-footer");
linkCount = group.find( "a" ).length;

deepEqual( group.find("a.ui-btn").length, linkCount, "all 4 links should be buttons");
deepEqual( group.find("a.ui-first-child").length, 1, "only 1 left cornered button");
deepEqual( group.find("a.ui-last-child").length, 1, "only 1 right cornered button");
deepEqual( group.find("a:not(.ui-first-child):not(.ui-last-child)").length, linkCount - 2, "only 2 buttons are cornered");
});

test( "control group buttons should respect theme-related data attributes", function(){
var group = $("#control-group-content");

@@ -15,6 +15,7 @@
[
"jquery.mobile.buttonMarkup",
"widgets/controlgroup",
"widgets/toolbar",
"widgets/fixedToolbar",
"widgets/forms/button",
],
@@ -39,10 +40,6 @@ <h2 id="qunit-userAgent"></h2>
</ol>

<div data-nstest-role="page" id="default">
<div data-nstest-role="header" id="page-header">
<a id="header-button-1" data-role="button" href="index.html">Header button 1</a>
<a id="header-button-2" data-role="button" href="index.html">Header button 2</a>
</div>
<div data-nstest-role="content" id="control-group-content">
<input type="submit" data-nstest-role="button" value="Double Enhanced?" id="double-enhanced" />
<a href="index.html" data-nstest-role="button" data-nstest-shadow="false">No shadow</a>
@@ -66,14 +63,6 @@ <h2 id="qunit-userAgent"></h2>
<a id="iconpos3" data-nstest-role="button" href="index.html" data-nstest-icon="check" data-nstest-iconpos="right">Right iconpos</a>
<a id="hover-delay" data-nstest-role="button" href="index.html"></a>
</div>
<div data-nstest-role="footer" id="control-group-footer" class="ui-bar" data-nstest-position="inline">
<div data-nstest-role="controlgroup" data-nstest-type="horizontal">
<a href="index.html" data-nstest-icon="delete">Remove</a>
<a href="index.html" data-nstest-icon="plus">Add</a>
<a href="index.html" data-nstest-icon="arrow-u">Up</a>
<a href="index.html" data-nstest-icon="arrow-d">Down</a>
</div>
</div>
</div>
</body>
</html>
@@ -38,7 +38,7 @@
var $inherited = $( "#theme-check" ),
$explicit = $( "#theme-check-explicit" );

ok( $inherited.closest("div").hasClass( "ui-btn-up-a" ), "should inherit from page" );
ok( $inherited.closest("div").hasClass( "ui-btn-up-p" ), "should inherit from content" );
ok( $explicit.closest("div").hasClass( "ui-btn-up-b" ), "should not inherit" );
});

@@ -20,8 +20,7 @@
$.testHelper.asyncLoad([
[
"widgets/dialog",
"widgets/page",
"widgets/page.sections"
"widgets/page"
],
[ "jquery.mobile.init" ],
[
@@ -2,7 +2,7 @@
* mobile Fixed Toolbar unit tests
*/
(function($){
module('jquery.mobile.fixedToolbar.js');
module('jquery.mobile.toolbar.js');

test( "Fixed Header Structural Classes are applied correctly", function(){
//footer
@@ -18,44 +18,42 @@
//parent
ok( $('#classes-test-b').closest( ".ui-page" ).hasClass( "ui-page-header-fixed" ), "Parent page of a fixed header has class ui-page-header-fixed" );
ok( $('#classes-test-e').closest( ".ui-page" ).hasClass( "ui-page-footer-fixed" ), "Parent page of a fixed footer has class ui-page-header-fixed" );
ok( $('#classes-test-c').closest( ".ui-page" ).hasClass( "ui-page-header-fullscreen" ), "Parent page of a fullscreen header has class ui-page-header-fullscreen" );
ok( $('#classes-test-f').closest( ".ui-page" ).hasClass( "ui-page-footer-fullscreen" ), "Parent page of a fullscreen footer has class ui-page-header-fullscreen" );
});

test( "User zooming is disabled when the header is visible and disablePageZoom is true", function(){
$.mobile.zoom.enable();
var defaultZoom = $.mobile.fixedtoolbar.prototype.options.disablePageZoom;
$( ".ui-page-active .ui-header-fixed" ).fixedtoolbar("option", "disablePageZoom", true );
var defaultZoom = $.mobile.toolbar.prototype.options.disablePageZoom;
$( ".ui-page-active .ui-header-fixed" ).toolbar("option", "disablePageZoom", true );

$( ".ui-page-active" ).trigger( "pagebeforeshow" );
ok( !$.mobile.zoom.enabled, "Viewport scaling is disabled before page show." );
$( ".ui-page-active .ui-header-fixed" ).fixedtoolbar("option", "disablePageZoom", defaultZoom );
$( ".ui-page-active .ui-header-fixed" ).toolbar("option", "disablePageZoom", defaultZoom );
$.mobile.zoom.enable();
});

test( "Meta viewport content is restored to previous state, and zooming renabled, after pagebeforehide", function(){
$.mobile.zoom.enable( true );
var defaultZoom = $.mobile.fixedtoolbar.prototype.options.disablePageZoom;
$( ".ui-page-active .ui-header-fixed" ).fixedtoolbar("option", "disablePageZoom", true );
var defaultZoom = $.mobile.toolbar.prototype.options.disablePageZoom;
$( ".ui-page-active .ui-header-fixed" ).toolbar("option", "disablePageZoom", true );

$( ".ui-page-active" ).trigger( "pagebeforeshow" );
ok( !$.mobile.zoom.enabled, "Viewport scaling is disabled before page show." );
$( ".ui-page-active" ).trigger( "pagebeforehide" );
ok( $.mobile.zoom.enabled, "Viewport scaling is enabled." );
$( ".ui-page-active .ui-header-fixed" ).fixedtoolbar("option", "disablePageZoom", defaultZoom );
$( ".ui-page-active .ui-header-fixed" ).toolbar("option", "disablePageZoom", defaultZoom );
$.mobile.zoom.enable( true );
});

test( "User zooming is not disabled when the header is visible and disablePageZoom is false", function(){
$.mobile.zoom.enable( true );
var defaultZoom = $.mobile.fixedtoolbar.prototype.options.disablePageZoom;
$( ".ui-page :jqmData(position='fixed')" ).fixedtoolbar( "option", "disablePageZoom", false );
var defaultZoom = $.mobile.toolbar.prototype.options.disablePageZoom;
$( ".ui-page :jqmData(position='fixed')" ).toolbar( "option", "disablePageZoom", false );

$( ".ui-page-active" ).trigger( "pagebeforeshow" );

ok( $.mobile.zoom.enabled, "Viewport scaling is not disabled before page show." );

$( ".ui-page :jqmData(position='fixed')" ).fixedtoolbar( "option", "disablePageZoom", defaultZoom );
$( ".ui-page :jqmData(position='fixed')" ).toolbar( "option", "disablePageZoom", defaultZoom );

$.mobile.zoom.enable( true );
});
@@ -14,8 +14,10 @@
<script>
$.testHelper.asyncLoad([
[
"navigation/method",
"widgets/fixedToolbar"
"navigation/method",
"jquery.mobile.buttonMarkup",
"widgets/toolbar",
"widgets/fixedToolbar"
],
[ "jquery.mobile.init" ],
[ "./fixedToolbar.js" ]
@@ -14,8 +14,7 @@
<script>
$.testHelper.asyncLoad([
[
"widgets/page",
"widgets/page.sections"
"widgets/toolbar"
],
[
"jquery.mobile.buttonMarkup",
@@ -29,8 +29,6 @@
$.testHelper.asyncLoad([
[
"widgets/popup",
"widgets/listview",
"widgets/dialog"
],
[ "jquery.mobile.init" ],
[
@@ -48,41 +46,11 @@
<div data-nstest-role="content" id="page-content">
<div data-nstest-role="popup" id="test-popup">
<p>This is the test popup</p>
<a href="other.html">other.html</a>
</div>
<div data-nstest-role="popup" id="test-popup-2">
<p>This is another test popup</p>
</div>
<a id="open-xyzzy-popup" href="#xyzzy" data-nstest-rel="popup" data-nstest-role="button">Pop</a>
<a id="open-test-popup" href="#test-popup" data-nstest-rel="popup" data-nstest-role="button">Pop</a>
<ul data-nstest-role="listview">
<li id="open-test-popup-li"><a id="open-test-popup-li-link" href="#test-popup" data-nstest-rel="popup">Pop</a></li>
</ul>
<div data-nstest-role="popup" id="tolerance-test">
<p>Tolerance test popup</p>
</div>
<div data-nstest-role="popup" id="popup-sequence-test">
<a id="popup-sequence-test-open-dialog" href="popup-sequence-test-dialog.html">Dialog</a>
</div>

<div data-nstest-role="popup" id="test-history-popup" data-nstest-history="false">
<p>This is the test popup</p>
<a href="#" data-nstest-rel="back" data-nstest-role="button" data-nstest-theme="a" data-nstest-icon="delete" data-nstest-iconpos="notext" class="ui-btn-right">Close</a>
</div>

<div data-nstest-role="popup" id="test-destroy-popup" data-nstest-history="false">
<p>This is the test popup</p>
</div>

<div data-nstest-role="popup" id="test-popup-dismissible" data-nstest-dismissible="false">
<p>This is the test popup</p>
</div>
<a id="go-to-another-page" href="back-two.html">Go</a>
</div>
</div>

<div data-nstest-role="page" id="no-popups">
Page that is not the popup page
</div>
</body>
</html>

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.