Closed Bug 1263324 Opened 6 years ago Closed 5 years ago

Add a test case to test context id for devtools storage inspector

Categories

(Core :: DOM: Security, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: timhuang, Assigned: timhuang)

References

(Blocks 1 open bug)

Details

(Whiteboard: [OA-testing][domsecurity-backlog2])

Attachments

(2 files)

We had made storage inspector contextual id aware in Bug 1237915. Now, we need a test case to test that the contextual id works correctly in the storage inspector.
Depends on: 1237915
Component: Developer Tools: Storage Inspector → DOM: Security
Product: Firefox → Core
Whiteboard: [OA]
Whiteboard: [OA] → [OA][domsecurity-backlog]
Depends on: 1195930
No longer depends on: 1237915
Assignee: nobody → tihuang
Status: NEW → ASSIGNED
Whiteboard: [OA][domsecurity-backlog] → [OA-testing][domsecurity-backlog]
Depends on: 1267910
*** Explanation for why this bug depends on bug 1195930 (Use origin in QuotaManager) ***

Devtools storage inspector indirectly uses QuotaManager functions through indexedDB.
devtools/server/actors/storage.js calls indexedDB functions, which end up with calling QuotaManager::GetStorageId() when indexedDB opens a database.

If QuotaManager is not OriginAttributes-aware, we cannot add test cases for the purpose of this bug,
which is aimed at verifying the correctness of using userContextId in devtools storage inspector.

p.s. Test case shall be added in: devtools/client/storage/test
It would be nice if we can have this bug resolved in FF 50, but we can wait until 51.
Priority: -- → P2
Whiteboard: [OA-testing][domsecurity-backlog] → [OA-testing][domsecurity-active]
Status: ASSIGNED → NEW
Assignee: tihuang → nobody
Whiteboard: [OA-testing][domsecurity-active] → [OA-testing][domsecurity-backlog]
Priority: P2 → P3
Whiteboard: [OA-testing][domsecurity-backlog] → [OA-testing][domsecurity-backlog2]
Priority: P3 → P2
Assignee: nobody → tihuang
Status: NEW → ASSIGNED
Comment on attachment 8833225 [details]
Bug 1263324 - Part 1: Fixing the cache storage inspector to obey originAttributes and indexedDB storage inspector to use correct database file name with originAttributes.

https://reviewboard.mozilla.org/r/109458/#review110616
Attachment #8833225 - Flags: review?(mratcliffe) → review+
Comment on attachment 8833226 [details]
Bug 1263324 - Part 2: Add test cases to test context id for devtools storage inspector.

https://reviewboard.mozilla.org/r/109460/#review110624

Looks fine but storage inspector tests used to time out regularly we need to make sure multiple try runs are successful before we land this:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7abcf2784256
Attachment #8833226 - Flags: review?(mratcliffe) → review+
Okay, you just need to make 3 linting changes before we can land this:

- TEST-UNEXPECTED-ERROR | /home/worker/checkouts/gecko/devtools/client/storage/test/browser_storage_basic_usercontextid.js:84:1 | Line 84 exceeds the maximum line length of 90. (max-len)

- TEST-UNEXPECTED-ERROR | /home/worker/checkouts/gecko/devtools/client/storage/test/browser_storage_basic_usercontextid.js:176:1 | Line 176 exceeds the maximum line length of 90. (max-len)

- TEST-UNEXPECTED-ERROR | /home/worker/checkouts/gecko/devtools/client/storage/test/browser_storage_delete_usercontextid.js:174:4 | Newline required at end of file but not found. (eol-last)
Flags: needinfo?(tihuang)
Thanks, mratcliffe. I will update these lines.
Flags: needinfo?(tihuang)
Try looks good.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/3f25a442f75b
Part 1: Fixing the cache storage inspector to obey originAttributes and indexedDB storage inspector to use correct database file name with originAttributes. r=miker
https://hg.mozilla.org/integration/autoland/rev/2c9ed54ef2e1
Part 2: Add test cases to test context id for devtools storage inspector. r=miker
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3f25a442f75b
https://hg.mozilla.org/mozilla-central/rev/2c9ed54ef2e1
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.