Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Errors

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
Services.prefs.setBoolPref("network.early-hints.enabled", true);
const { test_hint_preload, request_count_checking } =
ChromeUtils.importESModule(
);
// Early hint to redirect to same origin in secure context
add_task(async function test_103_redirect_same_origin() {
await test_hint_preload(
"test_103_redirect_same_origin",
{ hinted: 2, normal: 0 } // successful preload of redirect and resulting image
);
});
// Early hint to redirect to cross origin in secure context
add_task(async function test_103_redirect_cross_origin() {
await test_hint_preload(
"test_103_redirect_cross_origin",
{ hinted: 2, normal: 0 }
);
});
// Early hint to redirect to cross origin in insecure context
add_task(async function test_103_redirect_insecure_cross_origin() {
await test_hint_preload(
"test_103_redirect_insecure_cross_origin",
{ hinted: 2, normal: 0 }
);
});
// Cross origin preload from secure context to redirected insecure context on same domain
add_task(async function test_103_preload_redirect_mixed_content() {
await test_hint_preload(
"test_103_preload_redirect_mixed_content",
{ hinted: 2, normal: 0 }
);
});