From e44a7e37b6c7b5961adaffc62b9042b8d442938e Mon Sep 17 00:00:00 2001 From: mensonge Date: Thu, 13 Nov 2008 09:49:11 +0000 Subject: New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f --- includes/js/dojo/tests/_base/connect.js | 225 ++++++++++++++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 includes/js/dojo/tests/_base/connect.js (limited to 'includes/js/dojo/tests/_base/connect.js') diff --git a/includes/js/dojo/tests/_base/connect.js b/includes/js/dojo/tests/_base/connect.js new file mode 100644 index 0000000..3761861 --- /dev/null +++ b/includes/js/dojo/tests/_base/connect.js @@ -0,0 +1,225 @@ +if(!dojo._hasResource["tests._base.connect"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. +dojo._hasResource["tests._base.connect"] = true; +dojo.provide("tests._base.connect"); + +hub = function(){ +} + +failures = 0; +bad = function(){ + failures++; +} + +good = function(){ +} + +// make 'iterations' connections to hub +// roughly half of which will be to 'good' and +// half to 'bad' +// all connections to 'bad' are disconnected +// test can then be performed on the values +// 'failures' and 'successes' +markAndSweepTest = function(iterations){ + var marked = []; + // connections + for(var i=0; i