Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  test_bug1730284.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/base/test/test_bug1730284.html


<!DOCTYPE HTML>
<meta charset="utf-8">
<title>Test for bug 1730284 (throttling of same-origin iframes)</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
<style>
  iframe {
    width: 10px;
    height: 10px;
  }
  .display-none {
    display: none;
  }
  .vis-hidden {
    visibility: hidden
  }
  .transparent {
    opacity: 0;
  }
  .zero-size {
    width: 0;
    height: 0;
    border: 0;
  }
  .offscreen {
    position: absolute;
    top: 500%;
  }
  .scroller {
    height: 100px;
    overflow: auto;
  }
  .scroller-padding {
    height: 800px;
  }
</style>
<iframe class="visible"></iframe>
<iframe class="display-none" data-throttled-expected></iframe>
<iframe class="vis-hidden" data-throttled-expected></iframe>
<iframe class="transparent"></iframe>
<iframe class="zero-size"></iframe>
<div class="scroller">
  <div class="scroller-padding"></div>
  <iframe class="scrolled-out-of-view" data-throttled-expected></iframe>
</div>
<iframe class="offscreen" data-throttled-expected></iframe>
<iframe class="offscreen zero-size" data-throttled-expected></iframe>
<iframe class="offscreen vis-hidden" data-throttled-expected></iframe>
<iframe class="offscreen transparent" data-throttled-expected></iframe>
<script>
async function assertThrottled(win, shouldThrottle, msg) {
  if (isXOrigin) {
    // In XOrigin mode we need to depend as well on the main process having
    // painted the cross-origin iframe at least once for coordinates to be
    // correct.
    await SimpleTest.promiseWaitForCondition(() => {
      return SpecialPowers.getDOMWindowUtils(win).effectivelyThrottlesFrameRequests == shouldThrottle;
    }, msg);
  }
  is(SpecialPowers.getDOMWindowUtils(win).effectivelyThrottlesFrameRequests, shouldThrottle, msg);
}

add_task(async function() {
  await SimpleTest.promiseFocus(window);
  await assertThrottled(window, false, "Should not be throttling main page");
  for (let frame of document.querySelectorAll("iframe")) {
    let shouldThrottle = frame.getAttribute("data-throttled-expected") !== null;
    await assertThrottled(frame.contentWindow, shouldThrottle, frame.className);
  }
});
</script>

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

¤ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet am  2026-08-27) ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=476070
#Domains=661743