mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-18 19:41:06 +00:00
tests for url root in params / path.clean Fixes #1039
This commit is contained in:
parent
1911dba7d7
commit
129b586666
1 changed files with 3 additions and 1 deletions
|
|
@ -86,11 +86,13 @@
|
|||
var localroot = location.href.split("/").slice(0, 3).join("/"),
|
||||
remoteroot = "http://google.com/",
|
||||
fakepath = "foo/bar/baz.html",
|
||||
pathWithParam = localroot + "/bar?baz=" + localroot,
|
||||
localpath = localroot + fakepath,
|
||||
remotepath = remoteroot + fakepath;
|
||||
|
||||
same( $.mobile.path.clean( localpath ), fakepath, "removes location protocol, host, port from same-domain path");
|
||||
same( $.mobile.path.clean( remotepath ), remotepath, "does nothing to an external domain path");
|
||||
same( $.mobile.path.clean( pathWithParam ), "/bar?baz=" + localroot, "doesn't remove params with localroot value");
|
||||
});
|
||||
|
||||
test( "path.stripHash is working properly", function(){
|
||||
|
|
@ -242,7 +244,7 @@
|
|||
function(){ $("#dup-history-second a:last").click(); },
|
||||
function(){ $("#dup-history-dialog .ui-icon-delete").click(); },
|
||||
function(){
|
||||
|
||||
|
||||
// third page in the stack to account for first page being hash manipulation
|
||||
same($.mobile.urlHistory.activeIndex, 3, "should be the third page in the stack");
|
||||
start();
|
||||
|
|
|
|||
Loading…
Reference in a new issue