Closed Bug 1748364 Opened 2 years ago Closed 2 years ago

Fix test dom/security/test/https-first/browser_navigation.js with browser.tabs.documentchannel.parent-controlled set to true

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: annyG, Assigned: mccr8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

details to be added below

With the parent controlled pref enabled, this test times out here. I haven't investigated it much, but https://phabricator.services.mozilla.com/D132566 this might be of interest. This is one of the patches from the bug where this test was added. I don't know how the HTTP first mode works, so I'm not sure if all we are missing is setting of flag IsExemptFromHTTPSOnlyMode on the loadState sometime when we are doing a parent initiated load, or something much more.

Severity: -- → S3

On the priority of this one - I think this needs to be fixed in order for the parent controlled pref to be enabled.

I've started looking at this test failure. The test loads a first page, a second page, then a third page, then clicks on the back button to go back to the second page. With the parent controlled pref, the test times out while waiting for the load to finish. I modified the test to use three different pages, which let me see that we are actually loading the second page, so I guess the load event isn't firing for some reason.

Assignee: nobody → continuation

In my investigations, I modified the test to not enable the HTTPS-only mode setting, and made it just load some regular pages. This caused the test to hang in the same way as it does when the parent controlled pref is enabled with the original test, but even when the parent controlled pref is not enabled.

This led me to look for similar code that clicked the back button, which led me to the goBack() function in docshell/test/browser/head.js. The code there is similar to what the test is doing, except that it uses BrowserTestUtils.waitForLocationChange() instead of BrowserTestUtils.browserLoaded(). I'm not sure why the load event that browserLoaded() needs is generated only with the HTTPS-only mode enabled.

Anyways, I then changed the test to use waitForLocationChange().

ith the fixed test, I reverted bug 1742899 and confirmed that with the parent controlled pref disabled that the test fails, so the test is still testing what it is supposed to test.

The odd thing is that with the parent controlled pref enabled, the test passes with or without bug 1742899. This concerned me a little, so I went through and manually checked the original reproduction steps from bug 1742899 comment 2, and it was fine, so I guess there's something about the way the parent controlled doc channel works that made it not affected by the issue.

Summary: Fix test dom/security/test/https-first/browser_navigation.js → Fix test dom/security/test/https-first/browser_navigation.js with browser.tabs.documentchannel.parent-controlled set to true

Also, fix the quirks warning for file_navigation.html.

Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4b0ad7ededf3
Make browser_navigation.js work with parent controlled doc channel. r=smaug
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: