Bug 1310297 - Remove test annotations using b2g, mulet or gonk: dom/power. r?RyanVM draft
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sat, 05 Nov 2016 11:29:17 +0100
changeset 434273 dcb2829df7ad1ec2afc241ad304da49f1dcf5e8b
parent 434272 a24c9055d0e34ee82f83f9b0c7dfc1e68688d849
child 434274 b9582535dcb45f91db6d133bdc1904285e6c9d35
push id34753
push userarchaeopteryx@coole-files.de
push dateSat, 05 Nov 2016 10:33:00 +0000
reviewersRyanVM
bugs1310297
milestone52.0a1
Bug 1310297 - Remove test annotations using b2g, mulet or gonk: dom/power. r?RyanVM MozReview-Commit-ID: KAEQYNtLCI9
dom/power/test/chrome.ini
dom/power/test/mochitest.ini
dom/power/test/test_power_set_cpusleepallowed.html
dom/power/test/test_power_set_key_light_enabled.html
dom/power/test/test_power_set_screen_brightness.html
dom/power/test/test_power_set_screen_enabled.html
--- a/dom/power/test/chrome.ini
+++ b/dom/power/test/chrome.ini
@@ -1,9 +1,1 @@
 [test_power_basics.html]
-[test_power_set_cpusleepallowed.html]
-skip-if = toolkit != "gonk"
-[test_power_set_screen_brightness.html]
-skip-if = toolkit != "gonk"
-[test_power_set_screen_enabled.html]
-skip-if = toolkit != "gonk"
-[test_power_set_key_light_enabled.html]
-skip-if = toolkit != "gonk"
--- a/dom/power/test/mochitest.ini
+++ b/dom/power/test/mochitest.ini
@@ -1,4 +1,3 @@
 [test_bug957893.html]
 [test_bug957899.html]
 [test_wakelock_not_exposed.html]
-skip-if = appname == "b2g" || buildapp == "mulet"
deleted file mode 100644
--- a/dom/power/test/test_power_set_cpusleepallowed.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test Enabling/Disabling CPU Sleep with Power Management API</title>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-  <script type="application/javascript">
-
-  "use strict";
-
-  function testEnableSleep() {
-    try {
-      navigator.mozPower.cpuSleepAllowed = true;
-      ok(navigator.mozPower.cpuSleepAllowed === true, "Allow entering suspend state.");
-    } catch (e) {
-      ok(false, "Unexpected exception trying to enable entering suspend state.");
-    }
-  }
-
-  function testDisableSleep() {
-    try {
-      navigator.mozPower.cpuSleepAllowed = false;
-      ok(navigator.mozPower.cpuSleepAllowed === false, "Deny entering suspend state.");
-    } catch (e) {
-      ok(false, "Unexpected exception trying to disable entering suspend state.");
-    }
-  }
-
-  function startTests() {
-    testDisableSleep();
-    testEnableSleep();
-
-    SimpleTest.finish();
-  }
-
-  SimpleTest.expectAssertions(0, 9);
-  SimpleTest.waitForExplicitFinish();
-  // Currently only applicable on FxOS
-  if (navigator.userAgent.indexOf("Mobile") != -1 &&
-      navigator.appVersion.indexOf("Android") == -1) {
-     startTests();
-  } else {
-    ok(true, "mozPower on Firefox OS only.");
-    SimpleTest.finish();
-  }
-  </script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/dom/power/test/test_power_set_key_light_enabled.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test Enabling/Disabling Screen with Power Management API</title>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-  <script type="application/javascript">
-
-  "use strict";
-
-  function testEnableKeyLight() {
-    try {
-      navigator.mozPower.keyLightEnabled = true;
-      ok(navigator.mozPower.keyLightEnabled === true, "Enabled key backlight.");
-    } catch (e) {
-      ok(false, "Unexpected exception trying to enable key backlight.");
-    }
-  }
-
-  function testDisableKeyLight() {
-    try {
-      navigator.mozPower.keyLightEnabled = false;
-      ok(navigator.mozPower.keyLightEnabled === false, "Disabled key backlight.");
-    } catch (e) {
-      ok(false, "Unexpected exception trying to disable key backlight.");
-    }
-  }
-
-  function startTests() {
-
-    // Make sure we don't suspend
-    navigator.mozPower.cpuSleepAllowed = false;
-
-    testDisableKeyLight();
-    testEnableKeyLight();
-
-    SimpleTest.finish();
-  }
-
-  SimpleTest.waitForExplicitFinish();
-  // Currently only applicable on FxOS
-  if (navigator.userAgent.indexOf("Mobile") != -1 &&
-      navigator.appVersion.indexOf("Android") == -1) {
-    startTests();
-  } else {
-    ok(true, "mozPower on Firefox OS only.");
-    SimpleTest.finish();
-  }
-  </script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/dom/power/test/test_power_set_screen_brightness.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test Setting Screen Brightness with Power Management API</title>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-  <script type="application/javascript">
-
-  "use strict";
-
-  // Test setting brightness to a value < 0
-  function testInvalidBrightness1() {
-    try {
-      navigator.mozPower.screenBrightness = -1;
-    } catch (e) {
-      return ok(true, "Invalid brightness level results in exception.");
-    }
-    ok(false, "Exeception not thrown for invalid brightness level.");
-  }
-
-  // Test setting brightness to a value > 1
-  function testInvalidBrightness2() {
-    try {
-      navigator.mozPower.screenBrightness = 2;
-    } catch (e) {
-      return ok(true, "Invalid brightness level results in exception.");
-    }
-    ok(false, "Exeception not thrown for invalid brightness level.");
-  }
-
-  function testSettingBrightness() {
-    var newBright = 0.312;
-    navigator.mozPower.screenBrightness = newBright;
-    ok(fuzzyEq(newBright, navigator.mozPower.screenBrightness),
-       "Set new brightness value.");
-  }
-
-  function startTests() {
-    testInvalidBrightness1();
-    testInvalidBrightness2();
-    testSettingBrightness();
-
-    SimpleTest.finish();
-  }
-
-  function fuzzyEq(a, b) {
-    var epsilon = 0.002;
-    return Math.abs(a - b) < epsilon;
-  }
-
-  SimpleTest.expectAssertions(0, 9);
-  SimpleTest.waitForExplicitFinish();
-  // Currently only applicable on FxOS
-  if (navigator.userAgent.indexOf("Mobile") != -1 &&
-      navigator.appVersion.indexOf("Android") == -1) {
-    startTests();
-  } else {
-    ok(true, "mozPower on Firefox OS only.");
-    SimpleTest.finish();
-  }
-  </script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/dom/power/test/test_power_set_screen_enabled.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test Enabling/Disabling Screen with Power Management API</title>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-  <script type="application/javascript">
-
-  "use strict";
-
-  function testEnableScreen() {
-    try {
-      navigator.mozPower.screenEnabled = true;
-      ok(navigator.mozPower.screenEnabled === true, "Enabled screen.");
-    } catch (e) {
-      ok(false, "Unexpected exception trying to enable screen.");
-    }
-  }
-
-  function testDisableScreen() {
-    try {
-      navigator.mozPower.screenEnabled = false;
-      ok(navigator.mozPower.screenEnabled === false, "Disabled screen.");
-    } catch (e) {
-      ok(false, "Unexpected exception trying to disable screen.");
-    }
-  }
-
-  function startTests() {
-
-    // Make sure we don't suspend
-    navigator.mozPower.cpuSleepAllowed = false;
-
-    testDisableScreen();
-    testEnableScreen();
-
-    SimpleTest.finish();
-  }
-
-  SimpleTest.expectAssertions(0, 9);
-  SimpleTest.waitForExplicitFinish();
-  // Currently only applicable on FxOS
-  if (navigator.userAgent.indexOf("Mobile") != -1 &&
-      navigator.appVersion.indexOf("Android") == -1) {
-    startTests();
-  } else {
-    ok(true, "mozPower on Firefox OS only.");
-    SimpleTest.finish();
-  }
-  </script>
-</pre>
-</body>
-</html>