Bug 1318351 - Remove B2G related assertions. r=ato

MozReview-Commit-ID: Iy0wYJoodvO

--HG--
extra : rebase_source : 3bd93ecc4ef24df3db6846d7db2a314c183128aa
This commit is contained in:
Henrik Skupin 2017-05-03 16:40:37 +02:00
Родитель 6c250f896a
Коммит 16a144567e
2 изменённых файлов: 1 добавлений и 31 удалений

Просмотреть файл

@ -15,7 +15,6 @@ Cu.import("chrome://marionette/content/error.js");
this.EXPORTED_SYMBOLS = ["assert"];
const isFennec = () => AppConstants.platform == "android";
const isB2G = () => AppConstants.MOZ_B2G;
const isFirefox = () => Services.appinfo.name == "Firefox";
/** Shorthands for common assertions made in Marionette. */
@ -69,20 +68,6 @@ assert.fennec = function (msg = "") {
assert.that(isFennec, msg, UnsupportedOperationError)();
};
/**
* Asserts that the current browser is B2G.
*
* @param {string=} msg
* Custom error message.
*
* @throws {UnsupportedOperationError}
* If the current browser is not B2G.
*/
assert.b2g = function (msg = "") {
msg = msg || "Only supported in B2G";
assert.that(isB2G, msg, UnsupportedOperationError)();
};
/**
* Asserts that the current |context| is content.
*
@ -102,21 +87,6 @@ assert.content = function (context, msg = "") {
assert.that(c => c.toString() == "content", msg, UnsupportedOperationError)(context);
};
/**
* Asserts that the current browser is a mobile browser, that is either
* B2G or Fennec.
*
* @param {string=} msg
* Custom error message.
*
* @throws {UnsupportedOperationError}
* If the current browser is not B2G or Fennec.
*/
assert.mobile = function (msg = "") {
msg = msg || "Only supported in Fennec or B2G";
assert.that(() => isFennec() || isB2G(), msg, UnsupportedOperationError)();
};
/**
* Asserts that |win| is open.
*

Просмотреть файл

@ -21,7 +21,7 @@ add_test(function test_session() {
add_test(function test_platforms() {
// at least one will fail
let raised;
for (let fn of [assert.firefox, assert.fennec, assert.b2g, assert.mobile]) {
for (let fn of [assert.firefox, assert.fennec]) {
try {
fn();
} catch (e) {