Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/security/test/https-first/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  test_fragment.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/security/test/https-first/test_fragment.html


<!DOCTYPE HTML>
<html>
<head>
<title>Bug 1706577: Have https-first mode account for fragment navigations</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>

<script class="testbody" type="text/javascript">
"use strict";
/*
 * Description of the test:
 * Have https-first detect a fragment navigation rather than navigating away
 * from the page.
 */

SimpleTest.waitForExplicitFinish();

const REQUEST_URL = "http://example.com/tests/dom/security/test/https-first/file_fragment.html";
const EXPECT_URL = REQUEST_URL.replace("http://""https://");

let winTest = null;
let checkButtonClicked = false;

async function receiveMessage(event) {
  let data = event.data;
  if (!checkButtonClicked) {
    ok(data.result == EXPECT_URL, "location is correct");
    ok(data.button"button is clicked");
    ok(data.info == "onload""Onloading worked");
    checkButtonClicked = true;
    return;
  }

  // Once the button was clicked we know the tast has finished
  ok(data.button"button is clicked");
  is(data.result, EXPECT_URL + "#foo""location (hash) is correct");
  ok(data.info == "scrolled-to-foo","Scrolled successfully without reloading!");
  is(data.documentURI, EXPECT_URL + "#foo""Document URI is correct");
  window.removeEventListener("message",receiveMessage);
  winTest.close();
  SimpleTest.finish();
}

async function runTest() {
  await SpecialPowers.pushPrefEnv({ set: [
    ["dom.security.https_first", true],
  ]});
  winTest = window.open(REQUEST_URL);
}

window.addEventListener("message", receiveMessage);

runTest();

</script>
</body>
</html>

Messung V0.5 in Prozent
C=100 H=100 G=100

¤ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet am  2026-06-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.