[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser] 266/311: Bug 1761268 - Ensure we can record data in tests in child processes on Android r=TravisLong a=dmeehan



This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch geckoview-99.0.1-11.0-1
in repository tor-browser.

commit 1fafb56e428230b88942f3c43dce72b8eb6c9f3b
Author: Chris H-C <chutten@xxxxxxxxxxx>
AuthorDate: Fri Mar 25 20:27:13 2022 +0000

    Bug 1761268 - Ensure we can record data in tests in child processes on Android r=TravisLong a=dmeehan
    
    On Android we don't run the JSMs that turn `canRecordBase` on in content
    processes in xpcshell, so we have to turn that on ourselves.
    
    Differential Revision: https://phabricator.services.mozilla.com/D142110
---
 toolkit/components/glean/tests/xpcshell/test_GIFFTIPC.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/toolkit/components/glean/tests/xpcshell/test_GIFFTIPC.js b/toolkit/components/glean/tests/xpcshell/test_GIFFTIPC.js
index 952f4d6246802..71eee1112db5f 100644
--- a/toolkit/components/glean/tests/xpcshell/test_GIFFTIPC.js
+++ b/toolkit/components/glean/tests/xpcshell/test_GIFFTIPC.js
@@ -66,6 +66,9 @@ const IRATE_NUMERATOR = 44;
 const IRATE_DENOMINATOR = 14;
 
 add_task({ skip_if: () => runningInParent }, async function run_child_stuff() {
+  let oldCanRecordBase = Telemetry.canRecordBase;
+  Telemetry.canRecordBase = true; // Ensure we're able to record things.
+
   Glean.testOnlyIpc.aCounter.add(COUNT);
   Glean.testOnlyIpc.aStringList.add(CHEESY_STRING);
   Glean.testOnlyIpc.aStringList.add(CHEESIER_STRING);
@@ -101,6 +104,7 @@ add_task({ skip_if: () => runningInParent }, async function run_child_stuff() {
 
   Glean.testOnlyIpc.irate.addToNumerator(IRATE_NUMERATOR);
   Glean.testOnlyIpc.irate.addToDenominator(IRATE_DENOMINATOR);
+  Telemetry.canRecordBase = oldCanRecordBase;
 });
 
 add_task(
@@ -123,7 +127,7 @@ add_task(
         "content" in snapshot &&
         "telemetry.test.mirror_for_rate" in snapshot.content
       );
-    });
+    }, "failed to find content telemetry in parent");
 
     // boolean
     // Doesn't work over IPC

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits