Backed out changeset b72700473956 (bug 1374672) on request from whimboo for failing xpcshell's testing/marionette/test_navigate.js. r=backout

This commit is contained in:
Sebastian Hengst 2017-07-08 10:49:55 +02:00
parent 4e9f239b9f
commit aca8a9ec23
2 changed files with 9 additions and 9 deletions

View File

@ -1629,11 +1629,11 @@ GeckoDriver.prototype.switchToFrame = function* (cmd, resp) {
if (win.document.readyState == "complete") {
return;
} else if (win.document.readyState == "interactive") {
let documentURI = win.document.documentURI;
if (documentURI.startsWith("about:certerror")) {
let baseURI = win.document.baseURI;
if (baseURI.startsWith("about:certerror")) {
throw new InsecureCertificateError();
} else if (otherErrorsExpr.exec(documentURI)) {
throw new UnknownError("Reached error page: " + documentURI);
} else if (otherErrorsExpr.exec(win.document.baseURI)) {
throw new UnknownError("Error loading page");
}
}

View File

@ -222,7 +222,7 @@ var loadListener = {
* Callback for registered DOM events.
*/
handleEvent(event) {
let location = event.target.documentURI || event.target.location.href;
let location = event.target.baseURI || event.target.location.href;
logger.debug(`Received DOM event "${event.type}" for "${location}"`);
switch (event.type) {
@ -255,21 +255,21 @@ var loadListener = {
break;
case "DOMContentLoaded":
if (event.target.documentURI.startsWith("about:certerror")) {
if (event.target.baseURI.startsWith("about:certerror")) {
this.stop();
sendError(new InsecureCertificateError(), this.command_id);
} else if (/about:.*(error)\?/.exec(event.target.documentURI)) {
} else if (/about:.*(error)\?/.exec(event.target.baseURI)) {
this.stop();
sendError(new UnknownError("Reached error page: " +
event.target.documentURI), this.command_id);
event.target.baseURI), this.command_id);
// Return early with a page load strategy of eager, and also
// special-case about:blocked pages which should be treated as
// non-error pages but do not raise a pageshow event.
} else if ((capabilities.get("pageLoadStrategy") ===
session.PageLoadStrategy.Eager) ||
/about:blocked\?/.exec(event.target.documentURI)) {
/about:blocked\?/.exec(event.target.baseURI)) {
this.stop();
sendOk(this.command_id);
}