Bug 1341356 - remove dom/system/tests/marionette/* as it is b2g only. r=ahal
authorJoel Maher <jmaher@mozilla.com>
Wed, 22 Feb 2017 11:36:03 -0500
changeset 373335 3ed504efbcb221a04bc98af3e9f5c72372f72167
parent 373334 b2b72530f2930d421926b0606c0a5a4f7402376e
child 373336 1b113fa672072bedc07de1d71e5ab5475b99416b
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1341356
milestone54.0a1
Bug 1341356 - remove dom/system/tests/marionette/* as it is b2g only. r=ahal MozReview-Commit-ID: HqVTjaxW7E3
dom/system/tests/marionette/manifest.ini
dom/system/tests/marionette/test_proximity_change.js
dom/system/tests/marionette/test_proximity_init.js
testing/marionette/harness/marionette_harness/tests/webapi-tests.ini
deleted file mode 100644
--- a/dom/system/tests/marionette/manifest.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[DEFAULT]
-run-if = buildapp == 'b2g'
-
-[test_proximity_init.js]
-[test_proximity_change.js]
deleted file mode 100644
--- a/dom/system/tests/marionette/test_proximity_change.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 10000;
-
-var receivedEvent = false;
-var expectedEvent;
-
-function enableProximityListener() {
-  // Setup device proximity event listener, expect defaults
-  log("Enabling 'deviceproximity' event listener.");
-
-  // Bug 814043: Device proximity event 'min' and 'max' attributes incorrect
-  // Until that is fixed, expect 1:0:1 instead of 1:0:0
-  // expectedEvent = new DeviceProximityEvent("deviceproximity",
-  //     {value:1, min:0, max:0});
-  expectedEvent = new DeviceProximityEvent("deviceproximity",
-      {value:1, min:0, max:1});
-
-  window.addEventListener('deviceproximity', listener);
-  log("Waiting for device proximity event.");
-  waitFor(changeProximity, function() {
-    return(receivedEvent);
-  });
-}
-
-function listener(event) {
-  // Received proximity update
-  log("Received 'deviceproximity' event via listener (value:"
-      + event.value + " min:" + event.min + " max:" + event.max + ").");
-  // Verify event values are as expected
-  is(event.value, expectedEvent.value, "value");
-  is(event.min, expectedEvent.min, "min");
-  is(event.max, expectedEvent.max, "max");
-  receivedEvent = true;
-}
-
-function changeProximity() {
-  // Change emulator's proximity and verify event attributes
-  let newValue = "7:3:15";
-
-  // Bug 814043: Device proximity event 'min' and 'max' attributes won't change
-  // Until fixed, expect proximity event min to be '0' and max to be '1' always
-  // expectedEvent = new DeviceProximityEvent("deviceproximity",
-  //     {value: 7, min: 3, max: 15});
-  expectedEvent = new DeviceProximityEvent("deviceproximity",
-       {value:7, min:0, max:1});
-
-  // Setup handler and verify 'ondeviceproximity' event
-  window.ondeviceproximity = function(event) {
-    log("Received 'ondeviceproximity' event via handler (value:"
-        + event.value + " min:" + event.min + " max:"
-        + event.max + ").");
-    is(event.value, expectedEvent.value, "value");
-    is(event.min, expectedEvent.min, "min");
-    is(event.max, expectedEvent.max, "max");
-    // Turn off event handler and listener
-    window.ondeviceproximity = null;
-    window.removeEventListener('deviceproximity', listener);
-    restoreProximity();
-  };
-
-  log("Sending emulator command to fake proximity change (" + newValue + ").");
-  runEmulatorCmd("sensor set proximity " + newValue, function(result) {
-    log("Emulator callback.");
-  });
-}
-
-function restoreProximity() {
-  // Set the emulator's proximity value back to original
-  newValue = "1:0:0";
-  log("Sending emulator command to restore proximity (" + newValue + ").");
-  runEmulatorCmd("sensor set proximity " + newValue, function(result) {
-    cleanUp();
-  });
-}
-
-function cleanUp() {
-  finish();
-}
-
-// Start the test
-enableProximityListener();
deleted file mode 100644
--- a/dom/system/tests/marionette/test_proximity_init.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 10000;
-
-function testEventInit() {
-  let initValue = 7;
-  let initMin = 1;
-  let initMax = 30;
-
-  // Test DeviceProximityEvent initialization
-  log("Verifying DeviceProximityEvent constructor.");
-  let event = new DeviceProximityEvent("deviceproximity",
-      {value: initValue, min: initMin, max: initMax});
-  is(event.type, "deviceproximity", "event type");
-  is(event.value, initValue, "value");
-  is(event.min, initMin, "min");
-  is(event.max, initMax, "max");
-  if (event.value !== initValue ||
-      event.min !== initMin ||
-      event.max !== initMax) {
-    log("DeviceProximityEvent not initialized correctly.");
-  }
-
-  // Test UserProximityEvent initialization
-  log("Verifying UserProximityEvent constructor.");
-  event = new UserProximityEvent("userproximity", {near: true});
-  is(event.type, "userproximity", "event type");
-  ok(event.near, "Initialization of UserProximityEvent");
-  verifyDefaultStatus();
-}
-
-function verifyDefaultStatus() {
-  let emulatorDone = false;
-
-  // Ensure that device proximity is enabled by default
-  log("Getting sensor status from emulator.");
-
-  runEmulatorCmd("sensor status", function(result) {
-    log("Received sensor status (" + result[4] + ").");
-    is(result[4], "proximity: enabled.", "Proximity sensor enabled by default");
-    emulatorDone = true;
-  });
-
-  // Have this here so test doesn't drop out if emulator callback is slow
-  waitFor(getDefaultProximity, function() {
-    return(emulatorDone);
-  });
-}
-
-function getDefaultProximity() {
-  let expected = "1:0:0";
-
-  // Get and verify the default emulator proximity value
-  log("Getting device proximity from emulator.");
-
-  runEmulatorCmd("sensor get proximity", function(result) {
-    let values = result[0].split(" ")[2];
-    log("Received emulator proximity (" + values + ").");
-    is(values, "1:0:0", "Default proximity values");
-    cleanUp();
-  });
-}
-
-function cleanUp() {
-  finish();
-}
-
-// Start the test
-testEventInit();
--- a/testing/marionette/harness/marionette_harness/tests/webapi-tests.ini
+++ b/testing/marionette/harness/marionette_harness/tests/webapi-tests.ini
@@ -1,6 +1,4 @@
 [include:../../../../../dom/system/gonk/tests/marionette/manifest.ini]
-[include:../../../../../dom/system/tests/marionette/manifest.ini]
-skip-if = android_version > '15' # Bug 1203072
 [include:../../../../../dom/events/test/marionette/manifest.ini]
 skip-if = android_version > '15' # Bug 1203075
 [include:../../../../../dom/network/tests/marionette/manifest.ini]