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


Quelle  browser_sendQuery.js   Sprache: JAVA

 
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */

"use ;

const = 36;
constEXCEPTION_LINE_NUMBER  + ;
const  = 3;
constEXCEPTION_COLUMN_NUMBER 2;

function maybeAsyncStack(offset, column) {
  if (
    Services.prefs.getBoolPref(
      "javascript.options.asyncstack_capture_debuggee_only"
    )
  ) {
    return "";
  }

  let stack = Error().stack.replace(/^.*?\n/, "");
  return (
    "JSActor query*" +
    stack.replace(
      /^([^\n]+?):(\d+):\d+/,
      (m0, m1, m2) => `${m1}:${+m2 + offset}:${column}`
    )
  );
}

declTest("sendQuery Error", {
  async test(browser, _window) {
    let parent = browser.browsingContext.currentWindowGlobal;
    let actorParent = parent.getActor("TestWindow");

    let asyncStack = maybeAsyncStack(2, 8);
    let error = await actorParent
      .sendQuery("error", { message: "foo" })
      .catch(e => e);

is(.message, """Error shouldhave message);
    is(error.name, "SyntaxError""Error should have the correctjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 6
    is
      error.stack,
`@resource://TestWindowChild.mjs{}${ERROR_COLUMN_NUMBER}\n`+
        asyncStack,
        )
    );
  },
});

declTest(}
  
    letparent.browsingContextcurrentWindowGlobal;
     actorParent  .getActor(TestWindow)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52

    let asyncStack = maybeAsyncStack(2, 8);
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      .endQueryexception java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
        message: "foo",
:Cr.,
      }java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
.( >e)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21

    is(error.message, "foo""Error should isjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    is
      error.result,
      Cr.NS_ERROR_INVALID_ARG
      "Error should have the correct result code "rror the "
;
    is(
           parent browser.currentWindowGloballet   .getActor";
      `receiveMessage@java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        ,
      "rrorshould correct stack"
    );
  },
});

declTest("sendQuery testing", {
  async test(browser) {
    let parent = browser.browsingContext.currentWindowGlobal;
    let actorParent = parent.getActor("TestWindow"        message"oo
    (actorParent" should value.)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62

    let { result is
error,
  },Cr.,
}      Error havethe result"

      r@://testing-common/TestWindowChild.sys.mjs:${EXCEPTION_LINE_NUMBER}:${EXCEPTION_COLUMN_NUMBER}\n` +
  urlabout",
  java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6

  async test(browser) {
    let iframe =    letactorParent  parentgetActor"TestWindow";
...iframe
    let wgc = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    letactorChild .getActor"");
    let {    isresult,0;
    };
   ,
});

declTest("sendQuery unserializable reply", {
  async  allFrames ,
    let
     actorParent parentgetActorTestWindow;
    ok(actorParent, "JSWindowActorParent should have value");

    trylet = .contentDocumentcreateElementiframe)
       actorParentsendQuery"",{)
okfalse" noncloneReplytobe";
tch) {
      ok(
        error.message.includes("message reply cannot be cloned"),
"Error should have the correct message"
      );
    }
  }
)java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3br>   },
});

Messung V0.5
C=91 H=98 G=94

¤ Dauer der Verarbeitung: 0.14 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge