Closed Bug 1654436 Opened 6 months ago Closed 5 months ago

Fix failing localStorage mochitests with cross-origin and Fission enabled

Categories

(Core :: Privacy: Anti-Tracking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
81 Branch
Fission Milestone M6b
Tracking Status
firefox81 --- fixed

People

(Reporter: neha, Assigned: timhuang)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

These tests are marked as skipped/failed for cross-origin and Fission, and need to be fixed
dom/tests/mochitest/localstorage/test_localStorageCookieSettings.html

https://docs.google.com/spreadsheets/d/16G5AZhHWWow3rBgim4QBHzWXMIIJiky2SzXYgDMTTKY/edit#gid=1354562828&range=82:83

More info: https://wiki.mozilla.org/Project_Fission/Enabling_Tests_with_Fission#Cross-Origin_Mochitests

Fission Milestone: --- → M6b
Severity: -- → S2
Priority: -- → P2

I ran this test with ./mach test test_localStorageCookieSettings.html --enable-fission --enable-xorigin-tests and I saw JavaScript error: http://example.com/tests/dom/tests/mochitest/localstorage/frameLocalStorageCookieSettings.html, line 12: ReferenceError: is is not defined and UNEXPECTED-PASS fail-if condition in manifest - We expected at least one failure.

I wonder if the issue still exists or not. I will push a patch with replacing is with ok and remove the skip mark to try to see if the issue is still there or not.

Assignee: nobody → ttung
Status: NEW → ASSIGNED

(In reply to Tom Tung [:tt, :ttung] from comment #2)

try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=03beedde45b940defe267122c37a3d0c2e619fb6

Hmm, so there seem to have two issues for the test:
One is JavaScript error: http://example.com/tests/dom/tests/mochitest/localstorage/frameLocalStorageCookieSettings.html, line 12: ReferenceError: is is not defined and it can be fixed by adding <script src="/tests/SimpleTest/SimpleTest.js"></script> in frameLocalStorageCookieSettings.html
The other is UNEXPECTED-PASS fail-if condition in manifest - We expected at least one failure and it's https://searchfox.org/mozilla-central/rev/0e309417bdc73be33fc93f6bd7a0d4063d2c6e51/dom/tests/mochitest/localstorage/test_localStorageCookieSettings.html#49.

I cannot reproduce the latter one with ./mach test test_localStorageCookieSettings.html --enable-fission --enable-xorigin-tests on my machine. I will look into it more to see if I can find a way to reproduce this.

(In reply to Tom Tung [:tt, :ttung] from comment #3)

(In reply to Tom Tung [:tt, :ttung] from comment #2)

try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=03beedde45b940defe267122c37a3d0c2e619fb6

Hmm, so there seem to have two issues for the test:
One is JavaScript error: http://example.com/tests/dom/tests/mochitest/localstorage/frameLocalStorageCookieSettings.html, line 12: ReferenceError: is is not defined and it can be fixed by adding <script src="/tests/SimpleTest/SimpleTest.js"></script> in frameLocalStorageCookieSettings.html
The other is UNEXPECTED-PASS fail-if condition in manifest - We expected at least one failure and it's https://searchfox.org/mozilla-central/rev/0e309417bdc73be33fc93f6bd7a0d4063d2c6e51/dom/tests/mochitest/localstorage/test_localStorageCookieSettings.html#49.

I cannot reproduce the latter one with ./mach test test_localStorageCookieSettings.html --enable-fission --enable-xorigin-tests on my machine. I will look into it more to see if I can find a way to reproduce this.

I finally am able to reproduce the failure by executing: ./mach mochitest --enable-fission --enable-xorigin-tests --headless dom/tests/mochitest/localstorage*

*It appears you need to run a few tests together to trigger --enable-xorigin-tests

So, in the normal run (without enabling fission and xorigin)
aCookiePermission is set to UNKNOWN_ACTION here and aCookiePermission is set to DENY_ACTION in the run with enabling fission and xorigin.

It seems that it's an issue in permission manager such that cause this test to fail.

Tim, would you mind taking a look into this?

Flags: needinfo?(tihuang)

After investigation and discussing with Tim, I think this is an issue in Storage Access/Permission. I am going to pass the ticket to Tim.

Assignee: ttung → tihuang
Component: Storage: localStorage & sessionStorage → Privacy: Anti-Tracking
Flags: needinfo?(tihuang)
Pushed by tihuang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0eef665a95cf
Part 1: Clean up the permissions for test 'test_cookieBlock.html'. r=ttung
https://hg.mozilla.org/integration/autoland/rev/dd9484ede5cf
Part 2: Fix the issue that is() doesn't work in frameLocalStorageCookieSettings.html. r=ttung
https://hg.mozilla.org/integration/autoland/rev/d0dee27c5597
Part 3: Enable test_localStorageCookieSettings.html in Fission. r=ttung
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.