Bug 897924 - Part 1: Skip contacts tests on Android < 4.0. r=reuben

This commit is contained in:
Shane Tully 2013-08-20 09:31:20 -07:00
parent fdbee8577c
commit cdbcc38972
6 changed files with 73 additions and 12 deletions

View File

@ -31,6 +31,9 @@ SpecialPowers.addPermission("contacts-read", true, document);
SpecialPowers.addPermission("contacts-create", true, document);
var isAndroid = (navigator.userAgent.indexOf("Android") !== -1);
var androidVersion = SpecialPowers.Cc['@mozilla.org/system-info;1']
.getService(SpecialPowers.Ci.nsIPropertyBag2)
.getProperty('version');
// For Sorting
var c1 = {
@ -1691,8 +1694,14 @@ function next() {
}
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(next);
// Skip tests on Android < 4.0 due to test failures on tbpl (see bugs 897924 & 888891)
if (!isAndroid || androidVersion >= 14) {
SimpleTest.waitForExplicitFinish();
addLoadEvent(next);
} else {
ok(true, "Skip tests on Android < 4.0 (bugs 897924 & 888891");
}
</script>
</pre>
</body>

View File

@ -30,6 +30,11 @@ SpecialPowers.addPermission("contacts-write", true, document);
SpecialPowers.addPermission("contacts-read", true, document);
SpecialPowers.addPermission("contacts-create", true, document);
var isAndroid = (navigator.userAgent.indexOf("Android") !== -1);
var androidVersion = SpecialPowers.Cc['@mozilla.org/system-info;1']
.getService(SpecialPowers.Ci.nsIPropertyBag2)
.getProperty('version');
var utils = SpecialPowers.getDOMWindowUtils(window);
function getView(size)
@ -303,8 +308,14 @@ function next() {
index += 1;
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(next);
// Skip tests on Android < 4.0 due to test failures on tbpl (see bugs 897924 & 888891)
if (!isAndroid || androidVersion >= 14) {
SimpleTest.waitForExplicitFinish();
addLoadEvent(next);
} else {
ok(true, "Skip tests on Android < 4.0 (bugs 897924 & 888891");
}
</script>
</pre>
</body>

View File

@ -30,6 +30,11 @@ SpecialPowers.addPermission("contacts-write", true, document);
SpecialPowers.addPermission("contacts-read", true, document);
SpecialPowers.addPermission("contacts-create", true, document);
var isAndroid = (navigator.userAgent.indexOf("Android") !== -1);
var androidVersion = SpecialPowers.Cc['@mozilla.org/system-info;1']
.getService(SpecialPowers.Ci.nsIPropertyBag2)
.getProperty('version');
let adr1 = {
type: "work",
streetAddress: "street 1",
@ -453,8 +458,14 @@ function next() {
}
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(next);
// Skip tests on Android < 4.0 due to test failures on tbpl (see bugs 897924 & 888891)
if (!isAndroid || androidVersion >= 14) {
SimpleTest.waitForExplicitFinish();
addLoadEvent(next);
} else {
ok(true, "Skip tests on Android < 4.0 (bugs 897924 & 888891");
}
</script>
</pre>
</body>

View File

@ -30,6 +30,11 @@ SpecialPowers.addPermission("contacts-write", true, document);
SpecialPowers.addPermission("contacts-read", true, document);
SpecialPowers.addPermission("contacts-create", true, document);
var isAndroid = (navigator.userAgent.indexOf("Android") !== -1);
var androidVersion = SpecialPowers.Cc['@mozilla.org/system-info;1']
.getService(SpecialPowers.Ci.nsIPropertyBag2)
.getProperty('version');
function onFailure() {
ok(false, "in on Failure!");
}
@ -247,8 +252,14 @@ function next() {
index += 1;
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(next);
// Skip tests on Android < 4.0 due to test failures on tbpl (see bugs 897924 & 888891)
if (!isAndroid || androidVersion >= 14) {
SimpleTest.waitForExplicitFinish();
addLoadEvent(next);
} else {
ok(true, "Skip tests on Android < 4.0 (bugs 897924 & 888891");
}
</script>
</pre>
</body>

View File

@ -33,6 +33,11 @@ SpecialPowers.addPermission("contacts-write", true, document);
SpecialPowers.addPermission("contacts-read", true, document);
SpecialPowers.addPermission("contacts-create", true, document);
var isAndroid = (navigator.userAgent.indexOf("Android") !== -1);
var androidVersion = SpecialPowers.Cc['@mozilla.org/system-info;1']
.getService(SpecialPowers.Ci.nsIPropertyBag2)
.getProperty('version');
var sample_id1;
var createResult1;
var findResult1;
@ -254,8 +259,14 @@ function next() {
index += 1;
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(next);
// Skip tests on Android < 4.0 due to test failures on tbpl (see bugs 897924 & 888891)
if (!isAndroid || androidVersion >= 14) {
SimpleTest.waitForExplicitFinish();
addLoadEvent(next);
} else {
ok(true, "Skip tests on Android < 4.0 (bugs 897924 & 888891");
}
</script>
</pre>
</body>

View File

@ -19,6 +19,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=889239
<script class="testbody" type="application/javascript;version=1.7">
"use strict";
var isAndroid = (navigator.userAgent.indexOf("Android") !== -1);
function checkStr(str1, str2, msg) {
if (str1 ^ str2) {
ok(false, "Expected both strings to be either present or absent");
@ -266,8 +268,14 @@ function next() {
}
}
SimpleTest.waitForExplicitFinish();
next();
// Skip tests on Android
if (!isAndroid) {
SimpleTest.waitForExplicitFinish();
next();
} else {
ok(true, "Skip test on Android");
}
</script>
</pre>
</body>