New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 661353 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

chrome.browserAction documentation is incorrect/unclear

Reported by jjdsamp...@gmail.com, Nov 1 2016

Issue description

Chrome Version: 54.0.2840.71
OS Version: 10.0
URLs: https://developer.chrome.com/extensions/browserAction

What is the expected result:
Documentation describes how Chrome extensions behave.

What happens instead of that:
Documentation often gives a misleading description of how extensions behave.

Please provide any additional information below:
Many APIs accept an optional `tabId`. When provided, this limits the effect to the corresponding tab. The documentation says this change "Automatically resets when the tab is closed." This is incorrect; the reset appears to occur on navigation and/or closing.

This should be more-exhaustively documented to understand what events influence the state.
 

Comment 1 by woxxom@gmail.com, Nov 2 2016

If an URL you navigate to was prerendered, what actually happens is that the old tab is swapped to that prerendered hidden tab, which of course has a different tabId.

Comment 2 Deleted

That's helpful, but the current language suggests the _physical tab_ is the control. To the end-user, the tab itself doesn't get replaced. The end-user sees only the viewport navigate elsewhere.

Information about when, and how, Chrome chooses to pre-render a page (is an explicit <meta> tag required in all cases?) would be helpful too.

Comment 4 Deleted

I'm not attempting to work-around this; only looking to reconcile expectations with actualities :)

Comment 6 by bjohn...@brave.com, Nov 3 2016

"If an URL you navigate to was prerendered, what actually happens is that the old tab is swapped to that prerendered hidden tab, which of course has a different tabId." - while that may be correct, that isn't what is happening here. There is an explicit clearing of the per-tab extension action properties in `TabHelper::DidNavigateMainFrame`

```
if (!details.is_in_page)
    ExtensionActionAPI::Get(context)->ClearAllValuesForTab(web_contents());
```

Comment 7 by woxxom@gmail.com, Nov 4 2016

#6 is correct, the icon is reset on each navigation, test case extension is attached if needed:

1. install the attached extension
2. click its toolbar icon
3. observe the changed icon
4. the extension navigates to example.com
5. observe the icon is reset to the default one and the displayed tab id is the same

test-setIcon.zip
7.8 KB Download
Cc: krajshree@chromium.org
Components: Platform>Extensions
Labels: Needs-Feedback
Tested the issue on Windows-10 on chrome reported version #54.0.2840.71 and latest canary #56.0.2913.0 

Following are the steps followed to reproduce the issue.
------------
1. Installed the test-setIcon extension.
2. Clicked its toolbar icon.
3. Observed that the icon got changed.
4. The extension navigated to example.com
5. Observed that the icon got reset to the default one, but the displayed tab id is not same.

Attached a screen cast for reference.

jjdsampson@ - Could you please verify the screen cast and please let us know if it is the expected behavior.

Thanks...!!
661353.mp4
1.0 MB View Download

Comment 9 by woxxom@gmail.com, Nov 8 2016

#8, er, your screencast confirms the bug.

My description is apparently awkward/misleading. The displayed message "the original tabId ## is navigated to http://example.com" means that the tab id didn't change, it means that the original tab now has a different URL.

In case the tab id changes, the test-setIcon wouldn't display a message and an error would occur in background.js when trying to read info for the non-existent original tab id.
Project Member

Comment 10 by sheriffbot@chromium.org, Nov 8 2017

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment