Issue #27312: Fallback measure for ETP UI tests and re-enabling them

This commit is contained in:
oana.horvath 2022-12-14 16:30:04 +02:00 committed by mergify[bot]
parent a35bfdc79b
commit c9083280ea
2 changed files with 20 additions and 13 deletions

View File

@ -13,31 +13,31 @@
<h3>Level 1 (Basic) List</h3>
<p>social-track-digest256:</p>
<img
src="https://social-track-digest256.dummytracker.org/test_not_blocked.png"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png'">
src="https://social-track-digest256.dummytracker.org/test_not_blocked.png" alt="social not blocked"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png';this.alt='social blocked'">
<br/>
<p>ads-track-digest256:</p>
<img
src="https://ads-track-digest256.dummytracker.org/test_not_blocked.png"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png'">
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png';this.alt='ads blocked'">
<br/>
<p>analytics-track-digest256:</p>
<img
src="https://analytics-track-digest256.dummytracker.org/test_not_blocked.png"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png'">
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png';this.alt='analytics blocked'">
<br/>
<p>Fingerprinting:
<pre id="result">test not run</pre>
<script src="https://base-fingerprinting-track-digest256.dummytracker.org/tracker.js"
onerror="this.onerror=null;var result=document.getElementById('result');result.innerHTML='blocked';"
onload="this.onload=null;var result=document.getElementById('result');result.innerHTML='NOT blocked';"
onerror="this.onerror=null;var result=document.getElementById('result');result.innerHTML='Fingerprinting blocked';"
onload="this.onload=null;var result=document.getElementById('result');result.innerHTML='Fingerprinting NOT blocked';"
></script>
</p>
<br/>
<p>Cryptomining:
<img
src="https://base-cryptomining-track-digest256.dummytracker.org/test_not_blocked.png" alt="not blocked"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png';this.alt='blocked'">
src="https://base-cryptomining-track-digest256.dummytracker.org/test_not_blocked.png" alt="Cryptomining not blocked"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png';this.alt='Cryptomining blocked'">
</p>
<p><b>Cookie blocking</b>

View File

@ -8,7 +8,6 @@ import androidx.core.net.toUri
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
@ -165,7 +164,6 @@ class EnhancedTrackingProtectionTest {
}
}
@Ignore("Permanent failure: https://github.com/mozilla-mobile/fenix/issues/27312")
@Test
fun testStrictVisitSheetDetails() {
appContext.settings().setStrictETP()
@ -182,7 +180,11 @@ class EnhancedTrackingProtectionTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(trackingProtectionTest.url) {
verifyTrackingProtectionWebContent("blocked")
verifyTrackingProtectionWebContent("social blocked")
verifyTrackingProtectionWebContent("ads blocked")
verifyTrackingProtectionWebContent("analytics blocked")
verifyTrackingProtectionWebContent("Fingerprinting blocked")
verifyTrackingProtectionWebContent("Cryptomining blocked")
}
enhancedTrackingProtection {
}.openEnhancedTrackingProtectionSheet {
@ -197,7 +199,6 @@ class EnhancedTrackingProtectionTest {
}
}
@Ignore("Permanent failure: https://github.com/mozilla-mobile/fenix/issues/27312")
@SmokeTest
@Test
fun customTrackingProtectionSettingsTest() {
@ -217,7 +218,13 @@ class EnhancedTrackingProtectionTest {
// browsing a basic page to allow GV to load on a fresh run
}.enterURLAndEnterToBrowser(genericWebPage.url) {
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(trackingPage.url) {}
}.enterURLAndEnterToBrowser(trackingPage.url) {
verifyTrackingProtectionWebContent("social blocked")
verifyTrackingProtectionWebContent("ads blocked")
verifyTrackingProtectionWebContent("analytics blocked")
verifyTrackingProtectionWebContent("Fingerprinting blocked")
verifyTrackingProtectionWebContent("Cryptomining blocked")
}
enhancedTrackingProtection {
}.openEnhancedTrackingProtectionSheet {