Bug 835237 - Part 2: Add marionette tests for signal strength. r=hsinyi
authorEdgar Chen <echen@mozilla.com>
Tue, 23 Jul 2013 17:41:18 +0800
changeset 153387 436aa701ca7c3f775dec71991e5d253d2acdf534
parent 153386 7d74434e7836ff555981cd9b99b14cbc7c04276b
child 153388 7efadf1f7325ef52259ec527422947374f5c9099
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi
bugs835237
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 835237 - Part 2: Add marionette tests for signal strength. r=hsinyi
dom/network/tests/marionette/test_mobile_voice_state.js
--- a/dom/network/tests/marionette/test_mobile_voice_state.js
+++ b/dom/network/tests/marionette/test_mobile_voice_state.js
@@ -67,22 +67,30 @@ function testCellLocation() {
     is(cell.gsmLocationAreaCode, 100);
     is(cell.gsmCellId, 100);
     is(cell.cdmaBaseStationId, -1);
     is(cell.cdmaBaseStationLatitude, -2147483648);
     is(cell.cdmaBaseStationLongitude, -2147483648);
     is(cell.cdmaSystemId, -1);
     is(cell.cdmaNetworkId, -1);
 
-    testUnregistered();
+    testSignalStrength();
   });
 
   setEmulatorGsmLocation(100, 100);
 }
 
+function testSignalStrength() {
+  // Android emulator initializes the signal strength to -99 dBm
+  is(connection.voice.signalStrength, -99);
+  is(connection.voice.relSignalStrength, 44);
+
+  testUnregistered();
+}
+
 function testUnregistered() {
   setEmulatorVoiceState("unregistered");
 
   connection.addEventListener("voicechange", function onvoicechange() {
     connection.removeEventListener("voicechange", onvoicechange);
 
     is(connection.voice.connected, false);
     is(connection.voice.state, "notSearching");