mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 478927 - Add new test. r=smaug
This commit is contained in:
parent
6df033d768
commit
e431d02474
@ -20,6 +20,11 @@
|
||||
Bug 307027
|
||||
"Going back from secure page to error page does not clear yellow bar"
|
||||
|
||||
And enhancements:
|
||||
|
||||
Bug 478927
|
||||
onLocationChange should notify whether or not loading an error page.
|
||||
|
||||
*/
|
||||
|
||||
const kDNSErrorURI = "https://example/err.html";
|
||||
@ -85,6 +90,10 @@ function step1B(aWebProgress, aRequest, aLocation, aFlags) {
|
||||
.LOCATION_CHANGE_SAME_DOCUMENT),
|
||||
"DocShell loaded a document (1)");
|
||||
|
||||
ok((aFlags & Components.interfaces.nsIWebProgressListener
|
||||
.LOCATION_CHANGE_ERROR_PAGE),
|
||||
"This page is an error page.");
|
||||
|
||||
ok(!(aWebProgress.QueryInterface(Components.interfaces.nsIDocShell)
|
||||
.securityUI.state &
|
||||
Components.interfaces.nsIWebProgressListener.STATE_IS_SECURE),
|
||||
@ -110,6 +119,10 @@ function step2B(aWebProgress, aRequest, aLocation, aFlags) {
|
||||
.LOCATION_CHANGE_SAME_DOCUMENT),
|
||||
"DocShell loaded a document (2)");
|
||||
|
||||
ok(!(aFlags & Components.interfaces.nsIWebProgressListener
|
||||
.LOCATION_CHANGE_ERROR_PAGE),
|
||||
"This page is not an error page.");
|
||||
|
||||
ok((aWebProgress.QueryInterface(Components.interfaces.nsIDocShell)
|
||||
.securityUI.state &
|
||||
Components.interfaces.nsIWebProgressListener.STATE_IS_SECURE),
|
||||
@ -136,6 +149,10 @@ function step3B(aWebProgress, aRequest, aLocation, aFlags) {
|
||||
.LOCATION_CHANGE_SAME_DOCUMENT),
|
||||
"We are in the same document as before (3)");
|
||||
|
||||
ok(!(aFlags & Components.interfaces.nsIWebProgressListener
|
||||
.LOCATION_CHANGE_ERROR_PAGE),
|
||||
"This page is not an error page.");
|
||||
|
||||
ok((aWebProgress.QueryInterface(Components.interfaces.nsIDocShell)
|
||||
.securityUI.state &
|
||||
Components.interfaces.nsIWebProgressListener.STATE_IS_SECURE),
|
||||
@ -162,6 +179,10 @@ function step4B(aWebProgress, aRequest, aLocation, aFlags) {
|
||||
.LOCATION_CHANGE_SAME_DOCUMENT),
|
||||
"DocShell loaded a document (4)");
|
||||
|
||||
ok((aFlags & Components.interfaces.nsIWebProgressListener
|
||||
.LOCATION_CHANGE_ERROR_PAGE),
|
||||
"This page is an error page.");
|
||||
|
||||
ok(!(aWebProgress.QueryInterface(Components.interfaces.nsIDocShell)
|
||||
.securityUI.state &
|
||||
Components.interfaces.nsIWebProgressListener.STATE_IS_SECURE),
|
||||
|
Loading…
Reference in New Issue
Block a user