Permalink
Browse files

Commenting out calls to delete as they were preventing cajoling. Upda…

…ted XHR test paths and logger.css link path.
  • Loading branch information...
1 parent 0cbdb1c commit f604446f336f630466669b7fe1c768e5a9b56d58 @lsmith lsmith committed Oct 14, 2009
Showing with 54 additions and 54 deletions.
  1. +54 −54 yui2.8/tests/datasource/tests/datasource_caja.html
@@ -1,8 +1,8 @@
<html>
<head>
<title>YUI DataSource Tests</title>
-<link type="text/css" rel="stylesheet" href="yui/logger/assets/skins/sam/logger.css" />
-<link type="text/css" rel="stylesheet" href="yui/yuitest/assets/testlogger.css" />
+<link type="text/css" rel="stylesheet" href="yui/logger/assets/logger.css">
+<link type="text/css" rel="stylesheet" href="yui/yuitest/assets/testlogger.css">
<style type="text/css">
.yui-skin-sam .yui-log {
padding: 2.5em 1em 1em;
@@ -116,56 +116,56 @@
ArrayAssert.itemsAreSame(data, ds.liveData, "Simple Array");
Assert.areSame(DS.TYPE_LOCAL, ds.dataType, "Simple Array");
Assert.areSame(DS.TYPE_JSARRAY, ds.responseType, "Simple Array");
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = [["a","b","c"],["1","2","3"],["one","two","three"]];
ds = new LocalDS(data);
ArrayAssert.itemsAreSame(data, ds.liveData, "Complex Array");
Assert.areSame(DS.TYPE_LOCAL, ds.dataType, "Complex Array");
Assert.areSame(DS.TYPE_JSARRAY, ds.responseType, "Complex Array");
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = [{a:"1",b:"2",c:"3"}, {a:"one",b:"two",c:"three"}, {a:"uno",b:"dos",c:"tres"}];
ds = new LocalDS(data);
ArrayAssert.itemsAreSame(data, ds.liveData, "Object Array");
Assert.areSame(DS.TYPE_LOCAL, ds.dataType, "Object Array");
Assert.areSame(DS.TYPE_JSARRAY, ds.responseType, "Object Array");
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = {items: [{a:"1",b:"2",c:"3"}, {a:"one",b:"two",c:"three"}, {a:"uno",b:"dos",c:"tres"}]};
ds = new LocalDS(data);
ObjectAssert.propertiesAreEqual(data, ds.liveData, "JSON");
Assert.areSame(DS.TYPE_LOCAL, ds.dataType, "JSON");
Assert.areSame(DS.TYPE_JSON, ds.responseType, "JSON");
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = document.createElement("table");
ds = new LocalDS(data);
Assert.areSame(data.nodeName, ds.liveData.nodeName, "HTML TABLE");
Assert.areSame(DS.TYPE_LOCAL, ds.dataType, "HTML TABLE");
Assert.areSame(DS.TYPE_HTMLTABLE, ds.responseType, "HTML TABLE");
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data =new XMLDocument("myRoot");
ds = new LocalDS(data);
Assert.areSame(data.nodeType, ds.liveData.nodeType, "XML");
Assert.areSame(DS.TYPE_LOCAL, ds.dataType, "XML");
Assert.areSame(DS.TYPE_XML, ds.responseType, "XML");
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = null;
ds = new LocalDS(data);
ArrayAssert.itemsAreSame([], ds.liveData, "null");
Assert.areSame(DS.TYPE_LOCAL, ds.dataType, "null");
Assert.areSame(DS.TYPE_JSARRAY, ds.responseType, "null");
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
},
testLocalSendReqeust: function(){
@@ -220,16 +220,16 @@
Assert.isFunction(ds.liveData);
Assert.areSame(DS.TYPE_JSFUNCTION, ds.dataType);
Assert.areSame(DS.TYPE_UNKNOWN, ds.responseType);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = null;
ds = new FunctionDS(data);
Assert.isFunction(ds.liveData);
Assert.areSame(DS.TYPE_JSFUNCTION, ds.dataType);
Assert.areSame(DS.TYPE_UNKNOWN, ds.responseType);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
}
});
@@ -249,20 +249,20 @@
Assert.isString(ds.liveData);
Assert.areSame(DS.TYPE_XHR, ds.dataType);
Assert.areSame(DS.TYPE_UNKNOWN, ds.responseType);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = null;
ds = new XHRDS(data);
Assert.isString(ds.liveData);
Assert.areSame(DS.TYPE_XHR, ds.dataType);
Assert.areSame(DS.TYPE_UNKNOWN, ds.responseType);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
},
testXHRSendRequest: function() {
- var ds = new XHRDS("php/proxy_ylocal.php?query=madonna&output=json&results=10");
+ var ds = new XHRDS("_tests/datasource/tests/php/proxy_ylocal.php?query=madonna&output=json&results=10");
ds.responseType = DS.TYPE_JSON;
ds.responseSchema = {
resultsList: "ResultSet.Result",
@@ -288,7 +288,7 @@
},
testXHRHTMLTable: function () {
- var ds = new XHRDS("php/xhr_table.php?cols=4",{
+ var ds = new XHRDS("_tests/datasource/tests/php/xhr_table.php?cols=4",{
responseType: DS.TYPE_HTMLTABLE,
responseSchema: {
fields: ['Col0','Col1','Col2','Col3']
@@ -331,16 +331,16 @@
Assert.isString(ds.liveData);
Assert.areSame(DS.TYPE_SCRIPTNODE, ds.dataType);
Assert.areSame(DS.TYPE_UNKNOWN, ds.responseType);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = null;
ds = new ScriptNodeDS(data);
Assert.isString(ds.liveData);
Assert.areSame(DS.TYPE_SCRIPTNODE, ds.dataType);
Assert.areSame(DS.TYPE_UNKNOWN, ds.responseType);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
}
});
@@ -358,46 +358,46 @@
var data = ["a","b","c"];
var ds = new DataSource(data);
Assert.areSame(true, ds instanceof LocalDS);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = function(query) {
return ["a","b","c"]
};
ds = new DataSource(data);
Assert.areSame(true, ds instanceof FunctionDS);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = "path/to/server";
ds = new DataSource(data);
Assert.areSame(true, ds instanceof XHRDS);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = null;
ds = new DataSource(data, {dataType:DS.TYPE_LOCAL});
Assert.areSame(true, ds instanceof LocalDS);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = null;
ds = new DataSource(data, {dataType:DS.TYPE_JSFUNCTION});
Assert.areSame(true, ds instanceof FunctionDS);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = null;
ds = new DataSource(data, {dataType:DS.TYPE_XHR});
Assert.areSame(true, ds instanceof XHRDS);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = null;
ds = new DataSource(data, {dataType:DS.TYPE_SCRIPTNODE});
Assert.areSame(true, ds instanceof ScriptNodeDS);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
}
});
@@ -422,16 +422,16 @@
ObjectAssert.hasProperty("responseCacheEvent", ds.__yui_events);
ObjectAssert.hasProperty("responseEvent", ds.__yui_events);
ObjectAssert.hasProperty("responseParseEvent", ds.__yui_events);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
},
testCache: function() {
var data = ["a","b","c"];
var ds = new DS(data);
Assert.areSame(null, ds._aCache);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = ["a","b","c"];
ds = new DS(data, {maxCacheEntries:5});
@@ -444,8 +444,8 @@
ds.flushCache();
Assert.areSame(0, ds._aCache.length, "Cache should be empty");
});
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
data = ["a","b","c"];
ds = new DS(data);
@@ -463,8 +463,8 @@
Assert.isNull(ds._aCache, "Cache should be destroyed");
});
});
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
}
});
@@ -524,8 +524,8 @@
};
ds.sendRequest(null,oCallback);
- delete data;
- delete ds;
+ //delete data;
+ //delete ds;
}
});

0 comments on commit f604446

Please sign in to comment.