Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

/* 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 } = ChromeUtils.importESModule(
);
// 400 Bad Request
add_task(async function test_103_error_400() {
await test_hint_preload(
"test_103_error_400",
{ hinted: 1, normal: 0 }
);
});
// 401 Unauthorized
add_task(async function test_103_error_401() {
await test_hint_preload(
"test_103_error_401",
{ hinted: 1, normal: 0 }
);
});
// 403 Forbidden
add_task(async function test_103_error_403() {
await test_hint_preload(
"test_103_error_403",
{ hinted: 1, normal: 0 }
);
});
// 404 Not Found
add_task(async function test_103_error_404() {
await test_hint_preload(
"test_103_error_404",
{ hinted: 1, normal: 0 }
);
});
// 408 Request Timeout
add_task(async function test_103_error_408() {
await test_hint_preload(
"test_103_error_408",
{ hinted: 1, normal: 0 }
);
});
// 410 Gone
add_task(async function test_103_error_410() {
await test_hint_preload(
"test_103_error_410",
{ hinted: 1, normal: 0 }
);
});
// 429 Too Many Requests
add_task(async function test_103_error_429() {
await test_hint_preload(
"test_103_error_429",
{ hinted: 1, normal: 0 }
);
});
// 500 Internal Server Error
add_task(async function test_103_error_500() {
await test_hint_preload(
"test_103_error_500",
{ hinted: 1, normal: 0 }
);
});
// 502 Bad Gateway
add_task(async function test_103_error_502() {
await test_hint_preload(
"test_103_error_502",
{ hinted: 1, normal: 0 }
);
});
// 503 Service Unavailable
add_task(async function test_103_error_503() {
await test_hint_preload(
"test_103_error_503",
{ hinted: 1, normal: 0 }
);
});
// 504 Gateway Timeout
add_task(async function test_103_error_504() {
await test_hint_preload(
"test_103_error_504",
{ hinted: 1, normal: 0 }
);
});