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/_base/_loader/bootstrap.js | |
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/_base/_loader/bootstrap.js')
-rw-r--r-- | includes/js/dojo/tests/_base/_loader/bootstrap.js | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/includes/js/dojo/tests/_base/_loader/bootstrap.js b/includes/js/dojo/tests/_base/_loader/bootstrap.js deleted file mode 100644 index c2605cb..0000000 --- a/includes/js/dojo/tests/_base/_loader/bootstrap.js +++ /dev/null @@ -1,86 +0,0 @@ -if(!dojo._hasResource["tests._base._loader.bootstrap"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["tests._base._loader.bootstrap"] = true; -dojo.provide("tests._base._loader.bootstrap"); - -tests.register("tests._base._loader.bootstrap", - [ - - function hasConsole(t){ - t.assertTrue("console" in dojo.global); - t.assertTrue("assert" in console); - t.assertEqual("function", typeof console.assert); - }, - - { - name: "getObject", - setUp: function(){ - //Set an object in global scope. - dojo.global.globalValue = { - color: "blue", - size: 20 - }; - - //Set up an object in a specific scope. - this.foo = { - bar: { - color: "red", - size: 100 - } - }; - }, - runTest: function(t){ - //Test for existing object using global as root path. - var globalVar = dojo.getObject("globalValue"); - t.is("object", (typeof globalVar)); - t.assertEqual("blue", globalVar.color); - t.assertEqual(20, globalVar.size); - t.assertEqual("blue", dojo.getObject("globalValue.color")); - - //Test for non-existent object using global as root path. - //Then create it. - t.assertFalse(dojo.getObject("something.thatisNew")); - t.assertTrue(typeof(dojo.getObject("something.thatisNew", true)) == "object"); - - //Test for existing object using another object as root path. - var scopedVar = dojo.getObject("foo.bar", false, this); - t.assertTrue(typeof(scopedVar) == "object"); - t.assertEqual("red", scopedVar.color); - t.assertEqual(100, scopedVar.size); - t.assertEqual("red", dojo.getObject("foo.bar.color", true, this)); - - //Test for existing object using another object as root path. - //Then create it. - t.assertFalse(dojo.getObject("something.thatisNew", false, this)); - t.assertTrue(typeof(dojo.getObject("something.thatisNew", true, this)) == "object"); - }, - tearDown: function(){ - //Clean up global object that should not exist if - //the test is re-run. - try{ - delete dojo.global.something; - delete this.something; - }catch(e){} - } - }, - - { - name: "exists", - setUp: function(){ - this.foo = { - bar: {} - }; - }, - runTest: function(t){ - t.assertTrue(dojo.exists("foo.bar", this)); - t.assertFalse(dojo.exists("foo.bar")); - } - }, - - function evalWorks(t){ - t.assertTrue(dojo.eval("(true)")); - t.assertFalse(dojo.eval("(false)")); - } - ] -); - -} |