Bug 1593424 - Check content blocking log entry count in browser_socialtracking.js test. r=Ehsan
authorNihanth Subramanya <nhnt11@gmail.com>
Sat, 02 Nov 2019 20:40:53 +0000
changeset 500282 d3d3f36ec041a16ad1037362edbaae5213dd5f37
parent 500281 10548d5bb1ccaf86261063de07c61dbea975f900
child 500283 ff9cd9a275796006bc19d706b77b7319fd335d0c
push id36759
push usercbrindusan@mozilla.com
push dateSun, 03 Nov 2019 09:46:18 +0000
treeherdermozilla-central@3e02f4745b0d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersEhsan
bugs1593424
milestone72.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 1593424 - Check content blocking log entry count in browser_socialtracking.js test. r=Ehsan Differential Revision: https://phabricator.services.mozilla.com/D51497
toolkit/components/antitracking/test/browser/browser_socialtracking.js
--- a/toolkit/components/antitracking/test/browser/browser_socialtracking.js
+++ b/toolkit/components/antitracking/test/browser/browser_socialtracking.js
@@ -65,17 +65,19 @@ function runTest(obj) {
           let value = await p;
           is(value.status, obj.result, "We expect to succeed");
         }
       }
     );
 
     info("Checking content blocking log.");
     let contentBlockingLog = JSON.parse(await browser.getContentBlockingLog());
-    for (let origin of Object.keys(contentBlockingLog)) {
+    let origins = Object.keys(contentBlockingLog);
+    is(origins.length, 1, "There should be one origin entry in the log.");
+    for (let origin of origins) {
       is(
         origin + "/",
         TEST_3RD_PARTY_DOMAIN_STP,
         "Correct tracker origin must be reported"
       );
       Assert.deepEqual(
         contentBlockingLog[origin],
         obj.expectedLogItems,