Closed
Bug 1248251
Opened 9 years ago
Closed 9 years ago
We should not send the referrer when a link is open in a different container.
Categories
(Firefox :: Menus, defect)
Firefox
Menus
Tracking
()
RESOLVED
FIXED
Firefox 47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: baku, Assigned: baku)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 2 obsolete files)
2.77 KB,
patch
|
ttaubert
:
review+
|
Details | Diff | Splinter Review |
1.28 KB,
patch
|
ttaubert
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #8719282 -
Flags: review?(ttaubert)
Comment 1•9 years ago
|
||
Comment on attachment 8719282 [details] [diff] [review]
aa.patch
Review of attachment 8719282 [details] [diff] [review]:
-----------------------------------------------------------------
This is good but I think it needs a test.
Attachment #8719282 -
Flags: review?(ttaubert) → feedback+
Assignee | ||
Comment 3•9 years ago
|
||
Here a test.
Flags: needinfo?(ttaubert)
Attachment #8719424 -
Flags: review?(ttaubert)
Comment 4•9 years ago
|
||
Comment on attachment 8719424 [details] [diff] [review]
test
Review of attachment 8719424 [details] [diff] [review]:
-----------------------------------------------------------------
I think instead of extending checkReferrerAndStartNextTest() it would be better to override |getReferrerTest| (simply by defining it in the test file) and provide your own test cases, even if they end up the same with just the expected |result| changed.
::: browser/base/content/browser-context.inc
@@ +65,5 @@
> accesskey="&openLinkCmdInContainerTab.accesskey;"
> hidden="true">
> <menupopup oncommand="gContextMenu.openLinkInTab(event);">
> <menuitem label="&userContextPersonal.label;"
> + id="context-openlinkinusercontext-personal"
Shouldn't those contexts be flexible? It seems rather wrong to give them specific IDs. Maybe just pick the first in the list?
::: browser/base/content/test/referrer/browser_referrer_open_link_in_container_tab.js
@@ +1,2 @@
> +// Tests referrer on context menu navigation - open link in new tab.
> +// Selects "open link in new tab" from the context menu.
This comment should be updated.
::: browser/base/content/test/referrer/head.js
@@ +212,5 @@
> * Checks the result of the referrer test, and moves on to the next test.
> * @param aTestNumber The test number - 0, 1, 2, ...
> * @param aNewWindow The new window where the referrer target opened, or null.
> * @param aNewTab The new tab where the referrer target opened, or null.
> * @param aStartTestCase The callback to start the next test, aTestNumber + 1.
Please document the new parameter.
@@ +215,5 @@
> * @param aNewTab The new tab where the referrer target opened, or null.
> * @param aStartTestCase The callback to start the next test, aTestNumber + 1.
> */
> function checkReferrerAndStartNextTest(aTestNumber, aNewWindow, aNewTab,
> + aStartTestCase, resultOverwritten = undefined) {
Isn't that just undefined if not given? The default value seems unnecessary. Also wouldn't |resultOverride| be a better name? It currently sounds like I'd have to pass a boolean instead of a value to overwrite the result with.
@@ +222,5 @@
> let test = getReferrerTest(aTestNumber);
> let desc = getReferrerTestDescription(aTestNumber);
> +
> + let testResult = resultOverwritten != undefined ? resultOverwritten : test.result;
> + is(result, testResult, desc);
We can reduce this to:
is(result, resultOverride || test.result, desc);
Attachment #8719424 -
Flags: review?(ttaubert)
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8719424 -
Attachment is obsolete: true
Attachment #8719479 -
Flags: review?(ttaubert)
Assignee | ||
Comment 6•9 years ago
|
||
Attachment #8719282 -
Attachment is obsolete: true
Attachment #8721622 -
Flags: review?(ttaubert)
Updated•9 years ago
|
Attachment #8721622 -
Flags: review?(ttaubert) → review+
Updated•9 years ago
|
Attachment #8719479 -
Flags: review?(ttaubert) → review+
Comment 8•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/10ea38335439
https://hg.mozilla.org/mozilla-central/rev/b00f72a9e515
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
You need to log in
before you can comment on or make changes to this bug.
Description
•