diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
commit | 1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch) | |
tree | 3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojo/tests/cookie.html | |
parent | 104d59099e048688c4dbac37d72137006e396558 (diff) | |
download | semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2 |
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojo/tests/cookie.html')
-rw-r--r-- | includes/js/dojo/tests/cookie.html | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/includes/js/dojo/tests/cookie.html b/includes/js/dojo/tests/cookie.html deleted file mode 100644 index a89b0f8..0000000 --- a/includes/js/dojo/tests/cookie.html +++ /dev/null @@ -1,84 +0,0 @@ -<html> - <head> - <title>testing Cookies</title> - <style type="text/css"> - @import "../resources/dojo.css"; - </style> - <script type="text/javascript" - src="../dojo.js" - djConfig="isDebug:true"></script> - <script type="text/javascript" src="../cookie.js"></script> - <script type="text/javascript"> - dojo.require("doh.runner"); - dojo.addOnLoad(function(){ - doh.register("t", - [ - { - name: "basicSet", - runTest: function(t){ - // make sure the cookie is dead - var old = new Date(1976, 8, 15); - document.cookie = "dojo_test=blah; expires=" + old.toUTCString(); - t.is(-1, document.cookie.indexOf("dojo_test=")); - - // set the new one - var n = "dojo_test"; - var v = "test value"; - dojo.cookie(n, v); - t.t(document.cookie.indexOf(n+"=") >= 0); - var start = document.cookie.indexOf(n+"=") + n.length + 1; - var end = document.cookie.indexOf(";", start); - if(end == -1){ end = document.cookie.length; } - t.is(v, decodeURIComponent(document.cookie.substring(start, end))); - } - }, - { - name: "basicGet", - runTest: function(t){ - // set the cookie - var n = "dojo_test"; - var v = "foofoo"; - document.cookie = n + "=" + v; - - t.is(v, dojo.cookie(n)); - } - }, - { - name: "daysAsNumber", - runTest: function(t){ - // set a cookie with a numerical expires - dojo.cookie("dojo_num", "foo", { expires: 10 }); - t.is("foo", dojo.cookie("dojo_num")); - - // remove the cookie by setting it with a negative - // numerical expires. value doesn't really matter here - dojo.cookie("dojo_num", "-deleted-", { expires: -10 }); - t.is(null, dojo.cookie("dojo_num")); - } - }, - { - name: "nameSuffix", - runTest: function(t){ - // set two cookies with the same suffix - dojo.cookie("user", "123", { expires: 10 }); - dojo.cookie("xuser", "abc", { expires: 10 }); - t.is("123", dojo.cookie("user")); - t.is("abc", dojo.cookie("xuser")); - - // remove the cookie by setting it with a negative - // numerical expires. value doesn't really matter here - dojo.cookie("user", "-deleted-", { expires: -10 }); - t.is(null, dojo.cookie("user")); - dojo.cookie("xuser", "-deleted-", { expires: -10 }); - t.is(null, dojo.cookie("xuser")); - } - } - ] - ); - doh.run(); - }); - </script> - </head> - <body> - </body> -</html> |