Closed Bug 1661266 Opened 4 years ago Closed 4 years ago

Re-enable test_formless_submit_navigation.html in cross-origin mode

Categories

(Toolkit :: Password Manager, defect, P2)

defect

Tracking

()

RESOLVED FIXED
83 Branch
Fission Milestone M6c
Tracking Status
firefox83 --- fixed

People

(Reporter: enndeakin, Assigned: annyG)

References

Details

Attachments

(1 file)

These tests fail due to session history.

The failure occurs because nsDocShell::GetRootSessionHistory() returns null at https://searchfox.org/mozilla-central/rev/9b282b34b5aa0f836beb735656c55efb2cc4c617/docshell/base/nsDocShell.cpp#10242

Note that disabling that block of code causes the test to pass, although I assume that isn't the correct fix.

Depends on: 1649131

What team should be looking into this?

Severity: -- → S4
Priority: -- → P1

Neil, since pushState is fixed now, could you check if there's anything else blocking this?

Severity: S4 → S3
Flags: needinfo?(enndeakin)
Priority: P1 → P2

The above patch fixes the test part. peterv said he would investigate the history part. It behaves differently in cross-origin mode within nsDocShell::OnNewURI at I described above.

Flags: needinfo?(enndeakin) → needinfo?(peterv)

Sorry, I wasn't clear in my question, Neil. Can you test with fission.sessionHistoryInParent pref and see if that fixes the issue? The history issue is fixed with this pref, and it will be enabled for Fission when bug 1656208 lands.

Flags: needinfo?(enndeakin)

Can you test with fission.sessionHistoryInParent pref and see if that fixes the issue?

The test is still not fixed.

Flags: needinfo?(enndeakin)
Fission Milestone: --- → M6b
Whiteboard: waiting on session history
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Flags: needinfo?(peterv)

Anny, can you test test_formless_submit_navigation.html and test_formless_submit_navigation_negative.html for (Fission+xorigin) with Neil's patch in this bug?

Assignee: peterv → agakhokidze
Fission Milestone: M6b → M6c

With Neil's patch and fission (that now includes the session history pref) and xorigin tests enabled , test_formless_submit_navigation.html now passes on latest central.

test_formless_submit_navigation_negative.html, however, is failing (but no longer hanging as is indicated in the manifest file) with the following errors

  FAIL No formSubmissionProcessed should occur in this test
    SimpleTest.ok@SimpleTest/SimpleTest.js:417:16
    submissionProcessed@toolkit/components/passwordmgr/test/mochitest/test_formless_submit_navigation_negative.html?currentTestURL=toolkit%2Fcomponents%2Fpasswordmgr%2Ftest%2Fmochitest%2Ftest_formless_submit_navigation_negative.html&closeWhenDone=1&showTestReport=true&expected=pass:23:5
  FAIL No formSubmissionProcessed should occur in this test
    SimpleTest.ok@SimpleTest/SimpleTest.js:417:16
    submissionProcessed@toolkit/components/passwordmgr/test/mochitest/test_formless_submit_navigation_negative.html?currentTestURL=toolkit%2Fcomponents%2Fpasswordmgr%2Ftest%2Fmochitest%2Ftest_formless_submit_navigation_negative.html&closeWhenDone=1&showTestReport=true&expected=pass:23:5
  FAIL No formSubmissionProcessed should occur in this test
    SimpleTest.ok@SimpleTest/SimpleTest.js:417:16
    submissionProcessed@toolkit/components/passwordmgr/test/mochitest/test_formless_submit_navigation_negative.html?currentTestURL=toolkit%2Fcomponents%2Fpasswordmgr%2Ftest%2Fmochitest%2Ftest_formless_submit_navigation_negative.html&closeWhenDone=1&showTestReport=true&expected=pass:23:5

Neil, can you please look into these assertions failures?

Flags: needinfo?(enndeakin)

This test test_formless_submit_navigation_negative.html loads a form and then navigates through history using history.back() and history.go(-1) and expects to not save filled in passwords in these cases. Normally, at

https://searchfox.org/mozilla-central/rev/1a973762afcbc5066f73f1508b0c846872fe3952/toolkit/components/passwordmgr/LoginManagerChild.jsm#171

the value of webProgress.loadType is checked to see whether the load is due to a history navigation and returns early if so. With cross-origin mode disabled, the value is correctly LOAD_CMD_HISTORY.

With cross-origin mode enabled, the value is instead LOAD_CMD_NORMAL, so the form is saved instead and the popup appears, causing the test to fail.

So the issue here is likely that the web progress loadType is not being set correctly.

Reassigning needinfo, as I don't know who would be best able to fix this.

(Note: the other test test_formless_submit_navigation.html does indeed now work and could be enabled)

Flags: needinfo?(enndeakin) → needinfo?(nkochar)

Thanks for the analysis, Neil. Anny will look into why the loadType isn't correct with cross-origin.

Flags: needinfo?(nkochar)
Whiteboard: waiting on session history
Attachment #9173100 - Attachment description: Bug 1661266, use promiseFormsProcessedInChildFrame to listen for form process complete for test_formless_submit_navigation.html test → Bug 1661266, use promiseFormsProcessedInChildFrame to listen for form process complete for test_formless_submit_navigation.html test, r=sfoster
Blocks: 1670137

I filed bug 1670137 on the remaining test test_formless_submit_navigation_negative.html

No longer blocks: 1670137
Summary: Re-enable test_formless_submit_navigation.html and test_formless_submit_navigation_negative.html in cross-origin mode → Re-enable test_formless_submit_navigation.html in cross-origin mode
Pushed by neil@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cc15cd016330 use promiseFormsProcessedInChildFrame to listen for form process complete for test_formless_submit_navigation.html test, r=sfoster
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: