summaryrefslogtreecommitdiffstatshomepage
path: root/includes/js/dojox/dtl/tests/context.js
diff options
context:
space:
mode:
authorGravatar mensonge2008-11-14 15:39:19 +0000
committerGravatar mensonge2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/dtl/tests/context.js
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
scuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.zip
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/dojox/dtl/tests/context.js')
-rw-r--r--includes/js/dojox/dtl/tests/context.js79
1 files changed, 0 insertions, 79 deletions
diff --git a/includes/js/dojox/dtl/tests/context.js b/includes/js/dojox/dtl/tests/context.js
deleted file mode 100644
index a366098..0000000
--- a/includes/js/dojox/dtl/tests/context.js
+++ /dev/null
@@ -1,79 +0,0 @@
-if(!dojo._hasResource["dojox.dtl.tests.context"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.dtl.tests.context"] = true;
-dojo.provide("dojox.dtl.tests.context");
-
-dojo.require("dojox.dtl");
-dojo.require("dojox.dtl.Context");
-
-doh.register("dojox.dtl.context",
- [
- function test_context_creation(t){
- var context = new dojox.dtl.Context({ foo: "foo", bar: "bar" });
- t.is("foo", context.foo);
- t.is("bar", context.bar);
- },
- function test_context_push(t){
- var context = new dojox.dtl.Context({ foo: "foo", bar: "bar" });
- context.push();
- for(var key in context._dicts[0]){
- t.t(key == "foo" || key == "bar");
- }
- },
- function test_context_pop(t){
- var context = new dojox.dtl.Context({ foo: "foo", bar: "bar" });
- context.push();
- t.is("undefined", typeof context.foo);
- t.is("undefined", typeof context.bar);
- context.pop();
- t.is("foo", context.foo);
- t.is("bar", context.bar);
- },
- function test_context_overpop(t){
- var context = new dojox.dtl.Context();
- try{
- context.pop();
- t.t(false);
- }catch(e){
- t.is("pop() called on empty Context", e.message);
- }
- },
- function test_context_filter(t){
- var context = new dojox.dtl.Context({ foo: "one", bar: "two", baz: "three" });
- var filtered = context.filter("foo", "bar");
- t.is(filtered.foo, "one");
- t.is(filtered.bar, "two");
- t.f(filtered.baz);
-
- filtered = context.filter({ bar: true, baz: true });
- t.f(filtered.foo);
- t.is(filtered.bar, "two");
- t.is(filtered.baz, "three");
-
- filtered = context.filter(new dojox.dtl.Context({ foo: true, baz: true }));
- t.is(filtered.foo, "one");
- t.f(filtered.bar);
- t.is(filtered.baz, "three");
- },
- function test_context_extend(t){
- var context = new dojox.dtl.Context({ foo: "one" });
- var extended = context.extend({ bar: "two", baz: "three" });
- t.is(extended.foo, "one");
- t.is(extended.bar, "two");
- t.is(extended.baz, "three");
-
- extended = context.extend({ barr: "two", bazz: "three" });
- t.is(extended.foo, "one");
- t.f(extended.bar);
- t.f(extended.baz);
- t.is(extended.barr, "two");
- t.is(extended.bazz, "three");
-
- t.f(context.bar)
- t.f(context.baz);
- t.f(context.barr);
- t.f(context.bazz);
- }
- ]
-);
-
-}