From c50fb275e2f37bcb26143228970e1fcbdaa18a16 Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Thu, 8 May 2014 23:32:49 -0600 Subject: [PATCH] backout 520df0a03a00 (bug 1004668) for breaking Android robocop --- mobile/android/base/tests/robocop.ini | 2 ++ mobile/android/base/tests/testUITelemetry.js | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/mobile/android/base/tests/robocop.ini b/mobile/android/base/tests/robocop.ini index c1da19d075b3..132b59cb119d 100644 --- a/mobile/android/base/tests/robocop.ini +++ b/mobile/android/base/tests/robocop.ini @@ -119,6 +119,8 @@ skip-if = android_version == "10" [testSharedPreferences] [testSimpleDiscovery] [testUITelemetry] +# disabled on 2.2, see bug 993813 +skip-if = android_version == "8" [testVideoDiscovery] # Used for Talos, please don't use in mochitest diff --git a/mobile/android/base/tests/testUITelemetry.js b/mobile/android/base/tests/testUITelemetry.js index 26769407da44..5ff8d452b014 100644 --- a/mobile/android/base/tests/testUITelemetry.js +++ b/mobile/android/base/tests/testUITelemetry.js @@ -48,11 +48,11 @@ add_test(function test_telemetry_events() { let expected = [ ["event", TEST_PREFIX + "enone", "method0", [], null], - ["event", TEST_PREFIX + "efoo", "method1", [TEST_PREFIX + "foo"], null], - ["event", TEST_PREFIX + "efoo", "method2", [TEST_PREFIX + "foo"], null], - ["event", TEST_PREFIX + "efoobar", "method3", [TEST_PREFIX + "foo", TEST_PREFIX + "bar"], "foobarextras"], + ["event", TEST_PREFIX + "efoo", "method1", ["foo"], null], + ["event", TEST_PREFIX + "efoo", "method2", ["foo"], null], + ["event", TEST_PREFIX + "efoobar", "method3", ["foo", "bar"], "foobarextras"], ["session", TEST_PREFIX + "foo", "reasonfoo"], - ["event", TEST_PREFIX + "ebar", "method4", [TEST_PREFIX + "bar"], "barextras"], + ["event", TEST_PREFIX + "ebar", "method4", ["bar"], "barextras"], ["session", TEST_PREFIX + "bar", "reasonbar"], ["event", TEST_PREFIX + "enone", "method5", [], null], ]; @@ -62,13 +62,12 @@ add_test(function test_telemetry_events() { for (let i = 0; i < measurements.length; ++i) { let m = measurements[i]; - let type = m.type; + let type = m[0]; if (type == "event") { let [type, action, method, sessions, extras] = expected[i]; do_check_eq(m.action, action); do_check_eq(m.method, method); - // might receive real sessions in addition to the test ones -- remove the real ones - do_check_array_eq(m.sessions.filter(TEST_REGEX.test), sessions); + do_check_array_eq(m.sessions, sessions); do_check_eq(m.extras, extras); continue; } @@ -76,7 +75,7 @@ add_test(function test_telemetry_events() { if (type == "session") { let [type, name, reason] = expected[i]; do_check_eq(m.name, name); - do_check_eq(m.reason, reason); + do_check_eq(m.reason, method); continue; } }