Bug 1577040 - Part 6: Fix a couple of tests, r=Ehsan

Differential Revision: https://phabricator.services.mozilla.com/D63304
This commit is contained in:
Andrea Marchesini
2020-02-20 07:30:02 +00:00
parent bc4414d219
commit 2cf1195578
3 changed files with 10 additions and 5 deletions

View File

@@ -128,6 +128,7 @@ add_task(async function testShouldClassify() {
"privacy.trackingprotection.annotate_channels",
true
);
Services.prefs.setBoolPref("network.dns.native-is-localhost", true);
setupHttpServer();
@@ -141,9 +142,11 @@ add_task(async function testShouldClassify() {
channel.asyncOpen({
onStartRequest: (request, context) => {
Assert.equal(
request
.QueryInterface(Ci.nsIClassifiedChannel)
.isTrackingResource(),
!!(
request.QueryInterface(Ci.nsIClassifiedChannel)
.classificationFlags &
Ci.nsIClassifiedChannel.CLASSIFIED_ANY_BASIC_TRACKING
),
getExpectedResult(params)
);
request.cancel(Cr.NS_ERROR_ABORT);