Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  test_Heap_05.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/devtools/client/memory/test/chrome/test_Heap_05.html


<!DOCTYPE HTML>
<html>
<!--
Test that we show a message when the census results are empty.
-->

<head>
    <meta charset="utf-8">
    <title>Tree component test</title>
    <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
</head>
<body>
    <div id="container"></div>
    <pre id="test">
        <script src="head.js" type="application/javascript"></script>
        <script type="application/javascript">
         "use strict";
         window.onload = async function() {
           try {
             const container = document.getElementById("container");

             await renderComponent(Heap(immutableUpdate(TEST_HEAP_PROPS, {
               snapshot: immutableUpdate(TEST_HEAP_PROPS.snapshot, {
                 census: immutableUpdate(TEST_HEAP_PROPS.snapshot.census, {
                   report: {
                     bytes: 1,
                     totalBytes: 1,
                     count: 1,
                     totalCount: 1,
                     id: 1,
                     parent: undefined,
                     children: [
                       {
                         name: Cu.getJSTestingFunctions().saveStack(),
                         bytes: 1,
                         totalBytes: 1,
                         count: 1,
                         totalCount: 1,
                         children: undefined,
                         id: 2,
                         parent: 1,
                       },
                       {
                         name: "noStack",
                         bytes: 1,
                         totalBytes: 1,
                         count: 1,
                         totalCount: 1,
                         children: undefined,
                         id: 3,
                         parent: 1,
                       },
                     ],
                   },
                   display: censusDisplays.allocationStack,
                 }),
               }),
             })), container);

             ok(!container.querySelector(".empty"),
                "When the report is not empty, we should not show the empty message");

             // Empty Census Report

             const emptyCensus = {
               report: {
                 bytes: 0,
                 totalBytes: 0,
                 count: 0,
                 totalCount: 0,
                 id: 1,
                 parent: undefined,
                 children: undefined,
               },
               parentMap: Object.create(null),
               display: censusDisplays.allocationStack,
               filter: null,
               expanded: new Immutable.Set(),
               focused: null,
               state: censusState.SAVED,
             };

             await renderComponent(Heap(immutableUpdate(TEST_HEAP_PROPS, {
               snapshot: immutableUpdate(TEST_HEAP_PROPS.snapshot, {
                 census: immutableUpdate(TEST_HEAP_PROPS.snapshot.census, emptyCensus),
               }),
             })), container);

             ok(container.querySelector(".empty"),
                "When the report is empty in census view, we show the empty message");
             ok(container.textContent.includes(L10N.getStr("heapview.empty")));

             // Empty Diffing Report

             await renderComponent(Heap(immutableUpdate(TEST_HEAP_PROPS, {
               view: { state: viewState.DIFFING },
               diffing: {
                 firstSnapshotId: 1,
                 secondSnapshotId: 2,
                 census: emptyCensus,
                 state: diffingState.TOOK_DIFF,
               },
               snapshot: null,
             })), container);

             ok(container.querySelector(".empty"),
                "When the report is empty in diffing view, the empty message is shown");
             ok(container.textContent.includes(L10N.getStr("heapview.no-difference")));

             // Empty Filtered Census

             await renderComponent(Heap(immutableUpdate(TEST_HEAP_PROPS, {
               snapshot: immutableUpdate(TEST_HEAP_PROPS.snapshot, {
                 census: immutableUpdate(
                   TEST_HEAP_PROPS.snapshot.census, immutableUpdate(emptyCensus, {
                    filter: "zzzz",
                   })),
               }),
             })), container);

             ok(container.querySelector(".empty"),
                "When the report is empty in census view w/ filter, we show the empty message");
             ok(container.textContent.includes(L10N.getStr("heapview.none-match")));
           } catch (e) {
             ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
           } finally {
             SimpleTest.finish();
           }
         };
        </script>
    </pre>
</body>
</html>

Messung V0.5 in Prozent
C=92 H=95 G=93

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet am  2026-06-08) ¤

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

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik