Bug 1471599 - [3.0] Extend tracking protection test to verify per-session setting. r=snorp
authorEugen Sawin <esawin@mozilla.com>
Wed, 27 Jun 2018 15:11:09 +0200
changeset 424021 dc7caa85ff1da9d4308c9d77571fae9b5fc74b07
parent 424020 50eead5ec68f9b62cd7a72ca3038992f5cc2e90b
child 424022 bd0da8113fac3b4028d253ad0cdd6f629555900c
push id34198
push usercsabou@mozilla.com
push dateThu, 28 Jun 2018 10:05:18 +0000
treeherdermozilla-central@b429b9fb68f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1471599
milestone63.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 1471599 - [3.0] Extend tracking protection test to verify per-session setting. r=snorp
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/NavigationDelegateTest.kt
--- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/NavigationDelegateTest.kt
+++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/NavigationDelegateTest.kt
@@ -39,16 +39,30 @@ class NavigationDelegateTest : BaseSessi
                                           categories: Int) {
                 assertThat("Category should be set",
                            categories,
                            equalTo(category))
                 assertThat("URI should not be null", uri, notNullValue())
                 assertThat("URI should match", uri, endsWith("trackertest.org/tracker.js"))
             }
         })
+
+        sessionRule.session.settings.setBoolean(
+            GeckoSessionSettings.USE_TRACKING_PROTECTION, false)
+
+        sessionRule.session.reload()
+        sessionRule.session.waitForPageStop()
+
+        sessionRule.forCallbacksDuringWait(
+                object : Callbacks.TrackingProtectionDelegate {
+            @AssertCalled(false)
+            override fun onTrackerBlocked(session: GeckoSession, uri: String,
+                                          categories: Int) {
+            }
+        })
     }
 
     @WithDevToolsAPI
     @Test fun desktopMode() {
         sessionRule.session.loadUri("https://example.com")
         sessionRule.waitForPageStop()
 
         val userAgentJs = "window.navigator.userAgent"