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

Quelle  test_window_named_frame_enumeration.html   Sprache: HTML

 
 products/sources/formale Sprachen/C/Firefox/dom/base/test/test_window_named_frame_enumeration.html


<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1019417
-->

<head>
  <meta charset="utf-8">
  <title>Test for Bug 1019417</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  <script type="application/javascript">

  /** Test for Bug 1019417 **/
  SimpleTest.waitForExplicitFinish();
  addLoadEvent(function() {
    var names1 = Object.getOwnPropertyNames(window);
    var names2 = [];
    var gsp = Object.getPrototypeOf(Window.prototype);
    var names3 = Object.getOwnPropertyNames(gsp);
    for (var i in window) {
      names2.push(i);
    }

    is(names1.indexOf(""), -1,
       "Frame with no name or empty name should not be in our own prop list");
    is(names2.indexOf(""), -1,
       "Frame with no name or empty name should not be in our enumeration list");
    is(names3.indexOf(""), -1,
       "Frame with no name or empty name should not be in GSP own prop list");
    is(names1.indexOf("x"), -1,
       "Frame with about:blank loaded should not be in our own prop list");
    is(names2.indexOf("x"), -1,
       "Frame with about:blank loaded should not be in our enumeration list");
    isnot(names3.indexOf("x"), -1,
          "Frame with about:blank loaded should be in GSP own prop list");
    is(names1.indexOf("y"), -1,
       "Frame with same-origin loaded should not be in our own prop list");
    is(names2.indexOf("y"), -1,
       "Frame with same-origin loaded should not be in our enumeration list");
    isnot(names3.indexOf("y"), -1,
          "Frame with same-origin loaded should be in GSP own prop list");
    is(names1.indexOf("z"), -1,
       "Frame with cross-origin loaded should not be in our own prop list");
    is(names2.indexOf("z"), -1,
       "Frame with cross-origin loaded should not be in our enumeration list");
    isnot(names3.indexOf("z"), -1,
          "Frame with cross-origin loaded should be in GSP own prop list");
    is(names1.indexOf("sameorigin"), -1,
          "Frame with same-origin changed name should not be in our own prop list");
    is(names2.indexOf("sameorigin"), -1,
       "Frame with same-origin changed name should not be in our enumeration list");
    isnot(names3.indexOf("sameorigin"), -1,
          "Frame with same-origin changed name should be in GSP own prop list");
    is(names1.indexOf("crossorigin"), -1,
       "Frame with cross-origin changed name should not be in our own prop list");
    is(names2.indexOf("crossorigin"), -1,
       "Frame with cross-origin changed name should not be in our enumeration list");
    is(names3.indexOf("crossorigin"), -1,
       "Frame with cross-origin changed name should not be in GSP own prop list");

    is(Object.getOwnPropertyDescriptor(gsp, ""), undefined,
       "Should not have empty string as a named frame");
    isnot(Object.getOwnPropertyDescriptor(gsp, "x"), undefined,
        "Should have about:blank subframe as a named frame");
    isnot(Object.getOwnPropertyDescriptor(gsp, "y"), undefined,
        "Should have same-origin subframe as a named frame");
    isnot(Object.getOwnPropertyDescriptor(gsp, "z"), undefined,
        "Should have cross-origin subframe as a named frame");
    isnot(Object.getOwnPropertyDescriptor(gsp, "sameorigin"), undefined,
          "Should have same-origin changed name as a named frame");
    is(Object.getOwnPropertyDescriptor(gsp, "crossorigin"), undefined,
       "Should not have cross-origin-origin changed name as a named frame");
    SimpleTest.finish();
  });
  </script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1019417">Mozilla Bug 1019417</a>
<p id="display"></p>
<div id="content" style="display: none">
<iframe></iframe>
<iframe name=""></iframe>
<iframe name="x"></iframe>
<iframe name="y"
        src="http://mochi.test:8888/tests/dom/base/test/file_empty.html"></iframe>
<iframe name="z"
        src="http://example.com/tests/dom/base/test/file_empty.html"></iframe>
<iframe name="v"
        src="http://mochi.test:8888/tests/dom/base/test/file_setname.html?sameorigin"></iframe>
<iframe name="w"
        src="http://example.com/tests/dom/base/test/file_setname.html?crossorigin"></iframe>
</div>
<pre id="test">
</pre>
</body>
</html>

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

¤ Dauer der Verarbeitung: 0.17 Sekunden  (vorverarbeitet)  ¤

*© 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.