Bug 1511477 - [2.0] Extend tracking protection test. r=snorp
authorEugen Sawin <esawin@mozilla.com>
Wed, 19 Dec 2018 15:48:47 +0000
changeset 511307 52ee186f9550cca7423474be94e80ee81fb47f56
parent 511306 1a27d1c7cb0cd4e3410658df97d457757c6b8112
child 511308 6e495850f8f315023fc44562d3b52a069a127d9c
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1511477
milestone66.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 1511477 - [2.0] Extend tracking protection test. r=snorp Differential Revision: https://phabricator.services.mozilla.com/D14792
mobile/android/geckoview/src/androidTest/assets/www/trackers.html
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/NavigationDelegateTest.kt
--- a/mobile/android/geckoview/src/androidTest/assets/www/trackers.html
+++ b/mobile/android/geckoview/src/androidTest/assets/www/trackers.html
@@ -1,9 +1,11 @@
 <html>
     <head><title>Trackers</title></head>
     <body>
         <p>Trackers</p>
 
         <!-- test-track-simple -->
-        <script src="https://trackertest.org/tracker.js"></script>
+        <script src="http://trackertest.org/tracker.js"></script>
+        <script src="https://tracking.example.com/tracker.js"></script>
+        <script src="https://itisatracker.org/tracker.js"></script>
     </body>
 </html>
--- 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
@@ -174,24 +174,24 @@ class NavigationDelegateTest : BaseSessi
     @Setting(key = Setting.Key.USE_TRACKING_PROTECTION, value = "true")
     @Test fun trackingProtection() {
         val category = TrackingProtectionDelegate.CATEGORY_TEST;
         sessionRule.runtime.settings.trackingProtectionCategories = category
         sessionRule.session.loadTestPath(TRACKERS_PATH)
 
         sessionRule.waitUntilCalled(
                 object : Callbacks.TrackingProtectionDelegate {
-            @AssertCalled(count = 1)
+            @AssertCalled(count = 3)
             override fun onTrackerBlocked(session: GeckoSession, uri: String,
                                           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"))
+                assertThat("URI should match", uri, endsWith("tracker.js"))
             }
         })
 
         sessionRule.session.settings.setBoolean(
             GeckoSessionSettings.USE_TRACKING_PROTECTION, false)
 
         sessionRule.session.reload()
         sessionRule.session.waitForPageStop()