Closed
Bug 1245353
Opened 10 years ago
Closed 9 years ago
tabs.reload has no unit tests
Categories
(WebExtensions :: Untriaged, defect)
WebExtensions
Untriaged
Tracking
(firefox48 fixed)
| Tracking | Status | |
|---|---|---|
| firefox48 | --- | fixed |
People
(Reporter: mattw, Assigned: mattw)
References
Details
Attachments
(1 file)
No description provided.
Updated•10 years ago
|
Flags: blocking-webextensions-
Updated•10 years ago
|
Flags: blocking-webextensions- → blocking-webextensions+
| Assignee | ||
Updated•10 years ago
|
Iteration: --- → 47.2 - Feb 22
| Assignee | ||
Updated•10 years ago
|
Iteration: 47.2 - Feb 22 → 47.3 - Mar 7
Comment 1•10 years ago
|
||
:mattw you moved it into the iteration, so assume you are working on it.
Assignee: nobody → mwein
| Assignee | ||
Updated•10 years ago
|
Iteration: 47.3 - Mar 7 → 48.1 - Mar 21
| Assignee | ||
Comment 2•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/40081/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/40081/
Attachment #8730684 -
Flags: review?(kmaglione+bmo)
| Assignee | ||
Comment 3•9 years ago
|
||
Do you think this is an adequate test or should we also confirm that the page actually reloads? Do you know if we can do that?
Comment 4•9 years ago
|
||
Comment on attachment 8730684 [details]
MozReview Request: Bug 1245353 Add tests for tabs.reload r?kmag
https://reviewboard.mozilla.org/r/40081/#review36637
It's a start, but we need to do something to check that the tabs actually reload. Loading a page from the extension and having it send a message via `browser.runtime` should work for a start.
We should really try to test `bypassCache` somehow, though. Maybe file a follow-up bug?
::: browser/components/extensions/test/browser/browser_ext_tabs_reload.js:18
(Diff revision 1)
> + browser.tabs.query({currentWindow: true, active: true}).then(tabs => {
> + browser.tabs.reload(tabs[0].id, {bypassCache: true}).then(() => {
> + browser.test.notifyPass("tabs.reload");
> + });
> + });
> + });
Generally you'd phrase this as a promise chain, e.g.,
browser.tabs.reload().then(() => {
return browser.tabs.query({currentWindow: true, active: true});
}).then(tabs => {
return browser.tabs.reload(tabs[0].id, {bypassCache: true});
}).then(() => {
browser.test.notifyPass("tabs.reload");
});
Attachment #8730684 -
Flags: review?(kmaglione+bmo)
| Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8730684 [details]
MozReview Request: Bug 1245353 Add tests for tabs.reload r?kmag
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/40081/diff/1-2/
Attachment #8730684 -
Flags: review?(kmaglione+bmo)
| Assignee | ||
Comment 6•9 years ago
|
||
Follow up bug created for testing `bypassCache`: https://bugzilla.mozilla.org/show_bug.cgi?id=1257583.
Updated•9 years ago
|
Attachment #8730684 -
Flags: review?(kmaglione+bmo) → review+
Comment 7•9 years ago
|
||
Comment on attachment 8730684 [details]
MozReview Request: Bug 1245353 Add tests for tabs.reload r?kmag
https://reviewboard.mozilla.org/r/40081/#review37655
| Assignee | ||
Updated•9 years ago
|
Iteration: 48.1 - Mar 21 → ---
| Assignee | ||
Updated•9 years ago
|
Iteration: --- → 48.2 - Apr 4
| Assignee | ||
Comment 8•9 years ago
|
||
https://reviewboard.mozilla.org/r/40081/#review37655
I created the follow-up Bug 1257583 for testing `bypassCache`.
| Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8730684 [details]
MozReview Request: Bug 1245353 Add tests for tabs.reload r?kmag
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/40081/diff/2-3/
| Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 10•9 years ago
|
||
Keywords: checkin-needed
Comment 11•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•