1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /** For use inside an iframe onload function, throws an Error if iframe src is not blank.html
7 Should be applied *inside* catcher.watchFunction
9 this.assertIsBlankDocument = function assertIsBlankDocument(doc) {
10 if (doc.documentURI !== browser.extension.getURL("blank.html")) {
11 const exc = new Error("iframe URL does not match expected blank.html");
12 exc.foundURL = doc.documentURI;