Bug 1564920 - Add browser.safebrowsing.debug to test environment prefs. r=geckoview-reviewers,agi
authorDylan Roeh <droeh@mozilla.com>
Fri, 20 Sep 2019 22:09:37 +0000
changeset 494339 899aa346b320a180dca88be1485f19cee20d50c4
parent 494338 9bb8cf06af1404e514589606da0914f79e64b160
child 494340 fe7128089ead96cc4e2d94e64b04b46e873f9dfc
push id95970
push userdroeh@mozilla.com
push dateFri, 20 Sep 2019 22:11:20 +0000
treeherderautoland@899aa346b320 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, agi
bugs1564920
milestone71.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 1564920 - Add browser.safebrowsing.debug to test environment prefs. r=geckoview-reviewers,agi Differential Revision: https://phabricator.services.mozilla.com/D46658
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentBlockingControllerTest.kt
testing/profiles/unittest-required/user.js
--- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentBlockingControllerTest.kt
+++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentBlockingControllerTest.kt
@@ -79,19 +79,16 @@ class ContentBlockingControllerTest : Ba
                         assertThat("URI should not be null", event.uri, Matchers.notNullValue())
                         assertThat("URI should match", event.uri, Matchers.endsWith("tracker.js"))
                     }
                 })
     }
 
     @Test
     fun importExportExceptions() {
-        // May provide useful info for 1580375.
-        sessionRule.setPrefsUntilTestEnd(mapOf("browser.safebrowsing.debug" to true))
-
         val category = ContentBlocking.AntiTracking.TEST
         sessionRule.runtime.settings.contentBlocking.setAntiTracking(category)
         sessionRule.session.loadTestPath(TRACKERS_PATH)
 
         sessionRule.waitForPageStop()
 
         sessionRule.runtime.contentBlockingController.addException(sessionRule.session)
 
--- a/testing/profiles/unittest-required/user.js
+++ b/testing/profiles/unittest-required/user.js
@@ -39,16 +39,19 @@ user_pref("browser.ping-centre.staging.e
 // Point the url-classifier to the local testing server for fast failures
 user_pref("browser.safebrowsing.downloads.remote.url", "http://{server}/safebrowsing-dummy/update");
 user_pref("browser.safebrowsing.provider.google.gethashURL", "http://{server}/safebrowsing-dummy/gethash");
 user_pref("browser.safebrowsing.provider.google.updateURL", "http://{server}/safebrowsing-dummy/update");
 user_pref("browser.safebrowsing.provider.google4.gethashURL", "http://{server}/safebrowsing4-dummy/gethash");
 user_pref("browser.safebrowsing.provider.google4.updateURL", "http://{server}/safebrowsing4-dummy/update");
 user_pref("browser.safebrowsing.provider.mozilla.gethashURL", "http://{server}/safebrowsing-dummy/gethash");
 user_pref("browser.safebrowsing.provider.mozilla.updateURL", "http://{server}/safebrowsing-dummy/update");
+// Add safebrowsing debug logging to see why JUnit tests are sometimes ignoring above prefs
+// See: 1564920
+user_pref("browser.safebrowsing.debug", true);
 user_pref("browser.search.suggest.timeout", 10000); // use a 10s suggestion timeout in tests
 user_pref("browser.shell.checkDefaultBrowser", false);
 user_pref("browser.startup.page", 0); // use about:blank, not browser.startup.homepage
 // Don't show a delay when hiding the audio indicator during tests
 user_pref("browser.tabs.delayHidingAudioPlayingIconMS", 0);
 // Don't allow background tabs to be zombified, otherwise for tests that
 // open additional tabs, the test harness tab itself might get unloaded.
 user_pref("browser.tabs.disableBackgroundZombification", true);