/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let frameCount = 0;
let tab = BrowserTestUtils.addTab(gBrowser, testURL);
tab.linkedBrowser.addEventListener( "load", function loadListener(aEvent) { // Wait for all frames to load completely. if (frameCount++ < 2) { return;
}
tab.linkedBrowser.removeEventListener("load", loadListener, true);
let tab2 = gBrowser.duplicateTab(tab);
tab2.linkedBrowser.addEventListener( "461743", function listener() {
tab2.linkedBrowser.removeEventListener("461743", listener, true);
is(aEvent.data, "done", "XSS injection was attempted");
executeSoon(function () {
let iframes = tab2.linkedBrowser.contentWindow.frames;
let innerHTML = iframes[1].document.body.innerHTML;
isnot(
innerHTML,
Cu.reportError.toString(), "chrome access denied!"
);
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.