diff --git a/spec/config.xml b/spec/config.xml index 4177ccb82..bd3ab6fbe 100644 --- a/spec/config.xml +++ b/spec/config.xml @@ -1,7 +1,7 @@ - Cordova-sqlite-spec + cordova-sqlite-spec Runs the unit tests suite for the Cordova SQLite plugin. diff --git a/spec/www/spec/basic-db-tx-sql-storage-results.js b/spec/www/spec/basic-db-tx-sql-storage-results.js index 2ad14b56e..8f7c7b78e 100644 --- a/spec/www/spec/basic-db-tx-sql-storage-results.js +++ b/spec/www/spec/basic-db-tx-sql-storage-results.js @@ -9,9 +9,10 @@ var isWindows = /Windows /.test(navigator.userAgent); // Windows var isAndroid = !isWindows && /Android/.test(navigator.userAgent); var isMac = /Macintosh/.test(navigator.userAgent); -// NOTE: In the core-master branch there is no difference between the default -// implementation and implementation #2. But the test will also apply -// the androidLockWorkaround: 1 option in the case of implementation #2. +// NOTE: While in certain version branches there is no difference between +// the default Android implementation and implementation #2, +// this test script will also apply the androidLockWorkaround: 1 option +// in case of implementation #2. var scenarioList = [ isAndroid ? 'Plugin-implementation-default' : 'Plugin', 'HTML5', diff --git a/spec/www/spec/browser-check-startup.js b/spec/www/spec/browser-check-startup.js index 019ddefe1..c0ff20016 100644 --- a/spec/www/spec/browser-check-startup.js +++ b/spec/www/spec/browser-check-startup.js @@ -2,14 +2,14 @@ var MYTIMEOUT = 12000; -var isAndroid = /Android/.test(navigator.userAgent); var isWP8 = /IEMobile/.test(navigator.userAgent); // Matches WP(7/8/8.1) var isWindows = /Windows /.test(navigator.userAgent); // Windows 8.1/Windows Phone 8.1/Windows 10 +var isAndroid = !isWindows && /Android/.test(navigator.userAgent); var isMac = /Macintosh/.test(navigator.userAgent); window.hasBrowser = true; -// XXX TODO rename to something like window.hasWebKitWebSQL here and -// in actual test scripts +// XXX FUTURE TODO rename to something like window.hasWebKitWebSQL here +// and in actual test scripts window.hasWebKitBrowser = (!isWindows && !isWP8 && !isMac && (isAndroid || !(window.webkit && window.webkit.messageHandlers))); describe('check startup', function() { diff --git a/spec/www/spec/db-simultaneous-tx-access-test.js b/spec/www/spec/db-simultaneous-tx-access-test.js index b397f6a3d..996373c4b 100755 --- a/spec/www/spec/db-simultaneous-tx-access-test.js +++ b/spec/www/spec/db-simultaneous-tx-access-test.js @@ -30,7 +30,7 @@ function start(n) { if (wait == 0) test_it_done(); } -var isWindows = /Windows /.test(navigator.userAgent); // Windows (8.1) +var isWindows = /Windows /.test(navigator.userAgent); // Windows 8.1/Windows Phone 8.1/Windows 10 var isAndroid = !isWindows && /Android/.test(navigator.userAgent); // NOTE: In the common storage-master branch there is no difference between the diff --git a/spec/www/spec/db-sql-operations-test.js b/spec/www/spec/db-sql-operations-test.js index a5ed27b72..628266e0c 100755 --- a/spec/www/spec/db-sql-operations-test.js +++ b/spec/www/spec/db-sql-operations-test.js @@ -35,9 +35,10 @@ var isAndroid = !isWindows && /Android/.test(navigator.userAgent); var isMac = /Macintosh/.test(navigator.userAgent); var isWKWebView = !isWindows && !isAndroid && !isWP8 && !isMac && !!window.webkit && !!window.webkit.messageHandlers; -// NOTE: In the common storage-master branch there is no difference between the -// default implementation and implementation #2. But the test will also apply -// the androidLockWorkaround: 1 option in the case of implementation #2. +// NOTE: While in certain version branches there is no difference between +// the default Android implementation and implementation #2, +// this test script will also apply the androidLockWorkaround: 1 option +// in case of implementation #2. var scenarioList = [ isAndroid ? 'Plugin-implementation-default' : 'Plugin', 'HTML5', diff --git a/spec/www/spec/db-tx-multiple-update-test.js b/spec/www/spec/db-tx-multiple-update-test.js index 2b8211fdd..83fe5f443 100755 --- a/spec/www/spec/db-tx-multiple-update-test.js +++ b/spec/www/spec/db-tx-multiple-update-test.js @@ -31,9 +31,10 @@ function start(n) { var isWindows = /Windows /.test(navigator.userAgent); // Windows var isAndroid = !isWindows && /Android/.test(navigator.userAgent); -// NOTE: In the common storage-master branch there is no difference between the -// default implementation and implementation #2. But the test will also apply -// the androidLockWorkaround: 1 option in the case of implementation #2. +// NOTE: While in certain version branches there is no difference between +// the default Android implementation and implementation #2, +// this test script will also apply the androidLockWorkaround: 1 option +// in case of implementation #2. var scenarioList = [ isAndroid ? 'Plugin-implementation-default' : 'Plugin', 'HTML5', diff --git a/spec/www/spec/db-tx-sql-features-test.js b/spec/www/spec/db-tx-sql-features-test.js index a272e6eb1..283551a73 100644 --- a/spec/www/spec/db-tx-sql-features-test.js +++ b/spec/www/spec/db-tx-sql-features-test.js @@ -8,9 +8,10 @@ var isWP8 = /IEMobile/.test(navigator.userAgent); // Matches WP(7/8/8.1) var isWindows = /Windows /.test(navigator.userAgent); // Windows var isAndroid = !isWindows && /Android/.test(navigator.userAgent); -// NOTE: In the common storage-master branch there is no difference between the -// default implementation and implementation #2. But the test will also apply -// the androidLockWorkaround: 1 option in the case of implementation #2. +// NOTE: While in certain version branches there is no difference between +// the default Android implementation and implementation #2, +// this test script will also apply the androidLockWorkaround: 1 option +// in case of implementation #2. var scenarioList = [ isAndroid ? 'Plugin-implementation-default' : 'Plugin', 'HTML5', diff --git a/spec/www/spec/db-tx-value-bindings-test.js b/spec/www/spec/db-tx-value-bindings-test.js index 419c657e7..cd5be8c32 100755 --- a/spec/www/spec/db-tx-value-bindings-test.js +++ b/spec/www/spec/db-tx-value-bindings-test.js @@ -5,7 +5,7 @@ var MYTIMEOUT = 12000; var DEFAULT_SIZE = 5000000; // max to avoid popup in safari/ios var isWP8 = /IEMobile/.test(navigator.userAgent); // Matches WP(7/8/8.1) -var isWindows = /Windows /.test(navigator.userAgent); // Windows (8.1) +var isWindows = /Windows /.test(navigator.userAgent); // Windows 8.1/Windows Phone 8.1/Windows 10 var isAndroid = !isWindows && /Android/.test(navigator.userAgent); var isMac = /Macintosh/.test(navigator.userAgent); var isWKWebView = !isWindows && !isAndroid && !isWP8 && !isMac && !!window.webkit && !!window.webkit.messageHandlers; diff --git a/spec/www/spec/ext-tx-blob-test.js b/spec/www/spec/ext-tx-blob-test.js index a88cb2640..705a4bdae 100755 --- a/spec/www/spec/ext-tx-blob-test.js +++ b/spec/www/spec/ext-tx-blob-test.js @@ -7,15 +7,9 @@ var DEFAULT_SIZE = 5000000; // max to avoid popup in safari/ios // FUTURE TODO replace in test(s): function ok(test, desc) { expect(test).toBe(true); } -var isAndroid = /Android/.test(navigator.userAgent); var isWP8 = /IEMobile/.test(navigator.userAgent); // Matches WP(7/8/8.1) -//var isWindows = /Windows NT/.test(navigator.userAgent); // Windows [NT] (8.1) -var isWindows = /Windows /.test(navigator.userAgent); // Windows (8.1) -//var isWindowsPC = /Windows NT/.test(navigator.userAgent); // Windows [NT] (8.1) -//var isWindowsPhone_8_1 = /Windows Phone 8.1/.test(navigator.userAgent); // Windows Phone 8.1 -//var isIE = isWindows || isWP8 || isWindowsPhone_8_1; -var isIE = isWindows || isWP8; -var isWebKit = !isIE; // TBD [Android or iOS] +var isWindows = /Windows /.test(navigator.userAgent); // Windows 8.1/Windows Phone 8.1/Windows 10 +var isAndroid = !isWindows && /Android/.test(navigator.userAgent); // NOTE: In the core-master branch there is no difference between the default // implementation and implementation #2. But the test will also apply @@ -32,7 +26,7 @@ var mytests = function() { for (var i=0; i