Commit e40093d9 authored by Sven Franck's avatar Sven Franck

updated tests for Chrome

parent 56c3a105
...@@ -255,7 +255,6 @@ generateTools = function (sinon) { ...@@ -255,7 +255,6 @@ generateTools = function (sinon) {
return ( (A < B) ? -1 : ((A > B) ? 1 : 0) ) * [-1,1][+!!reverse]; return ( (A < B) ? -1 : ((A > B) ? 1 : 0) ) * [-1,1][+!!reverse];
} }
}; };
return o; return o;
}, },
//// end tools //// end tools
...@@ -1111,11 +1110,11 @@ test ("AllDocs", function(){ ...@@ -1111,11 +1110,11 @@ test ("AllDocs", function(){
for (i = 0; i < m; i += 1) { for (i = 0; i < m; i += 1) {
o.fakeDoc = {}; o.fakeDoc = {};
o.fakeDoc._id = "doc_"+i; o.fakeDoc._id = "doc_"+(i < 10 ? "0"+i : i);
o.fakeDoc.title = o.titles[i]; o.fakeDoc.title = o.titles[i];
o.fakeDoc.year = o.years[i]; o.fakeDoc.year = o.years[i];
o.fakeDoc.author = o.director[i]; o.fakeDoc.author = o.director[i];
localstorage.setItem(o.localpath+"/doc_"+i, o.fakeDoc); localstorage.setItem(o.localpath+"/doc_"+(i < 10 ? "0"+i : i), o.fakeDoc);
} }
// response // response
...@@ -1124,14 +1123,15 @@ test ("AllDocs", function(){ ...@@ -1124,14 +1123,15 @@ test ("AllDocs", function(){
o.allDocsResponse.total_rows = 15; o.allDocsResponse.total_rows = 15;
for (i = 0; i < m; i += 1) { for (i = 0; i < m; i += 1) {
o.allDocsResponse.rows.push({ o.allDocsResponse.rows.push({
"id": "doc_"+i, "id": "doc_"+(i < 10 ? "0"+i : i),
"key": "doc_"+i, "key": "doc_"+(i < 10 ? "0"+i : i),
"value": {} "value": {}
}); });
}; };
// alldocs // alldocs
o.spy(o, "value", o.allDocsResponse, "All docs"); o.spy(o, "value", o.allDocsResponse, "All docs");
o.jio.allDocs(o.f); o.jio.allDocs(o.f);
o.clock.tick(1000);
o.tick(o); o.tick(o);
// include docs // include docs
...@@ -1140,10 +1140,10 @@ test ("AllDocs", function(){ ...@@ -1140,10 +1140,10 @@ test ("AllDocs", function(){
o.allDocsResponse.total_rows = 15; o.allDocsResponse.total_rows = 15;
for (i = 0; i < m; i += 1) { for (i = 0; i < m; i += 1) {
o.allDocsResponse.rows.push({ o.allDocsResponse.rows.push({
"id": "doc_"+i, "id": "doc_"+(i < 10 ? "0"+i : i),
"key": "doc_"+i, "key": "doc_"+(i < 10 ? "0"+i : i),
"value": {}, "value": {},
"doc": localstorage.getItem(o.localpath+"/doc_"+i) "doc": localstorage.getItem(o.localpath+"/doc_"+(i < 10 ? "0"+i : i))
}); });
}; };
...@@ -2536,7 +2536,7 @@ test ("AllDocs", function () { ...@@ -2536,7 +2536,7 @@ test ("AllDocs", function () {
"password": "checkpwd", "password": "checkpwd",
"url": "https://ca-davstorage:8080" "url": "https://ca-davstorage:8080"
}); });
console.log(davlist);
// get allDocs, no content // get allDocs, no content
o.addFakeServerResponse("dav", "PROPFIND", "", 200, davlist); o.addFakeServerResponse("dav", "PROPFIND", "", 200, davlist);
o.thisShouldBeTheAnswer = { o.thisShouldBeTheAnswer = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment