Bug 1171577 - LogCapture Gonk-specific tests fail on Flame device. r=gerard-majax
authorJames Hobin <hobinjk@gmail.com>
Fri, 12 Jun 2015 13:54:10 -0700
changeset 280164 d43d971b4b9e2d2dbaba7152f64a2b60c55cfe22
parent 280163 052b3627ccb1a7d35bbfce9c9c8a38b3a63f883d
child 280165 040a407b070561ecda0b0b80968117a843bf7ea6
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerard-majax
bugs1171577
milestone41.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 1171577 - LogCapture Gonk-specific tests fail on Flame device. r=gerard-majax Fix test failure by testing values of known locale properties. Additionally verify that every property has type string.
b2g/components/test/unit/test_logcapture_gonk.js
--- a/b2g/components/test/unit/test_logcapture_gonk.js
+++ b/b2g/components/test/unit/test_logcapture_gonk.js
@@ -28,17 +28,27 @@ add_test(function test_readLogFile() {
 
   run_next_test();
 });
 
 add_test(function test_readProperties() {
   let propertiesLog = LogCapture.readProperties();
   notEqual(propertiesLog, null, "Properties should not be null");
   notEqual(propertiesLog, undefined, "Properties should not be undefined");
-  equal(propertiesLog["ro.kernel.qemu"], "1", "QEMU property should be 1");
+
+  for (let propertyName in propertiesLog) {
+    equal(typeof(propertiesLog[propertyName]), "string",
+          "Property " + propertyName + " should be a string");
+  }
+
+  equal(propertiesLog["ro.product.locale.language"], "en",
+        "Locale language should be read correctly. See bug 1171577.");
+
+  equal(propertiesLog["ro.product.locale.region"], "US",
+        "Locale region should be read correctly. See bug 1171577.");
 
   run_next_test();
 });
 
 add_test(function test_readAppIni() {
   let appIni = LogCapture.readLogFile("/system/b2g/application.ini");
   verifyLog(appIni);