CB-7287 - Mark XMLHttpRequest.spec.4 and storage.spec.18 tests as pending when on iOS and using cordova-plugin-wkwebview-engine (due to known issues).
diff --git a/cordova-plugin-mobilespec-tests/tests/localXHR.tests.js b/cordova-plugin-mobilespec-tests/tests/localXHR.tests.js
index 1353692..f42ed63 100644
--- a/cordova-plugin-mobilespec-tests/tests/localXHR.tests.js
+++ b/cordova-plugin-mobilespec-tests/tests/localXHR.tests.js
@@ -21,7 +21,9 @@
exports.defineAutoTests = function () {
var isWp8 = cordova.platformId === "windowsphone";
-
+ var isIOS = (cordova.platformId === "ios");
+ var isIOSWKWebView = isIOS && (window.webkit && window.webkit.messageHandlers);
+
describe("XMLHttpRequest", function () {
var errorHandler = {
onError: function (done) {
@@ -105,6 +107,10 @@
});
it("XMLHttpRequest.spec.4 should be able to load the parent folder page ../index.html", function (done) {
+ if (isIOSWKWebView) {
+ pending();
+ }
+
createXHR("../index.html", true, done, errorHandler.onError.bind(null, done));
});
diff --git a/cordova-plugin-mobilespec-tests/tests/storage.tests.js b/cordova-plugin-mobilespec-tests/tests/storage.tests.js
index 2a344be..265e440 100644
--- a/cordova-plugin-mobilespec-tests/tests/storage.tests.js
+++ b/cordova-plugin-mobilespec-tests/tests/storage.tests.js
@@ -22,6 +22,8 @@
var isWindowsPhone = cordova.platformId == 'windowsphone';
var isWindows = (cordova.platformId === "windows") || (cordova.platformId === "windows8")
+ var isIOS = (cordova.platformId === "ios");
+ var isIOSWKWebView = isIOS && (window.webkit && window.webkit.messageHandlers);
describe("Session Storage", function () {
it("storage.spec.1 should exist", function () {
@@ -211,6 +213,10 @@
if (!window.openDatabase) {
pending();
}
+
+ if (isIOSWKWebView) {
+ pending();
+ }
var db = openDatabase("Database", "1.0", "HTML5 Database API example", 5 * 1024 * 1024);
db.transaction(function (t) {