Add a new 'default' provider option so we can force the memory provider

for testing
This commit is contained in:
Alan K 2015-08-16 13:02:39 -04:00
parent 4de8bc4b81
commit 8325b5a9d7
3 changed files with 30781 additions and 3 deletions

10076
dist/filer-perf.js vendored Normal file

File diff suppressed because it is too large Load Diff

20701
dist/filer-test.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -37,7 +37,6 @@ function getUrlParams() {
}
function getProviderType() {
var defaultProvider = 'Memory';
var queryString = getUrlParams();
// If the environment is node or the query string is empty,
@ -46,7 +45,7 @@ function getProviderType() {
return defaultProvider;
}
return queryString['filer-provider'] || defaultProvider;
return queryString['filer-provider'] || 'default';
}
function setup(callback) {
@ -65,7 +64,9 @@ function setup(callback) {
_provider = new WebSQLTestProvider(name);
break;
case 'memory':
/* falls through */
_provider = new MemoryTestProvider(name);
break;
case 'default':
default:
var BestProvider = findBestProvider();
_provider = new BestProvider(name);