Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/netwerk/test/browser/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  browser_103_http_v1_1_preload.js   Sprache: JAVA

 
/* 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);
Services.prefs.setBoolPref("network.early-hints.over-http-v1-1.enabled"true);

// Disable mixed-content upgrading as this test is expecting HTTP image loads
Services.prefs.setBoolPref(
  "security.mixed_content.upgrade_display_content",
  false
);

const { request_count_checking, test_preload_url, test_hint_preload } =
  ChromeUtils.importESModule(
    "resource://testing-common/early_hint_preload_test_helper.sys.mjs"
  );

// Test that with both early hints and early hints over http v1-1 prefs are disabled,
// no early hint requests are made
add_task(async function test_103_both_preload_disabled() {
  Services.prefs.setBoolPref("network.early-hints.enabled"false);
  Services.prefs.setBoolPref(
    "network.early-hints.over-http-v1-1.enabled",
    false
  );
  await test_hint_preload(
    "test_103_preload_disabled",
    "https://example.com",
    "https://example.com/browser/netwerk/test/browser/early_hint_pixel.sjs",
    { hinted: 0, normal: 1 }
  );
  Services.prefs.setBoolPref("network.early-hints.enabled"true);
  Services.prefs.setBoolPref(
    "network.early-hints.over-http-v1-1.enabled",
    true
  );
});

// Test that with only early hints over http v1-1 config option is disabled, no early hint requests are made
add_task(async function test_103_http_v1_1_preload_disabled() {
  Services.prefs.setBoolPref("network.early-hints.enabled"true);
  Services.prefs.setBoolPref("network.early-hints.enabled"false);
  await test_hint_preload(
    "test_103_preload_disabled",
    "https://example.com",
    "https://example.com/browser/netwerk/test/browser/early_hint_pixel.sjs",
    { hinted: 0, normal: 1 }
  );
  Services.prefs.setBoolPref("network.early-hints.enabled"true);
  Services.prefs.setBoolPref(
    "network.early-hints.over-http-v1-1.enabled",
    true
  );
});

Messung V0.5
C=83 H=100 G=91

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.