New issue
Advanced search Search tips

Issue 819078 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Extension APIs behave differently when run in the developer console

Reported by k...@luminance.org, Mar 6 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0

Steps to reproduce the problem:
1. Create a function in an extension's background page that uses an extension API
2. Run the extension at startup (in the page's JS)
3. Run the extension manually from the developer console (After inspecting the background page)

What is the expected behavior?
The APIs should behave the same

What went wrong?
The APIs behave differently (wrong) in the developer console

WebStore page: 

Did this work before? N/A 

Chrome version: Version 64.0.3282.186 (Official Build) (64-bit)  Channel: stable
OS Version: 10.0
Flash Version: 

Here is a simple test case.

    var theUrl = "chrome://extensions";

    function test () {
        // Opens an active, foregrounded tab
        chrome.tabs.create(
            { url: theUrl, active: false, selected: false }
        );
    };

    test();

If you put that in an extension's background page it will behave correctly. If you call test() from the developer console (in the background page) it will silently ignore active/selected.

FWIW, tabs.query also acts really weird, but I can't figure out what's going on with it. It's very unpredictable to the point that I can't come up with a test case.
 

Comment 1 by ajha@chromium.org, Mar 6 2018

Labels: Needs-Triage-M64

Comment 2 by woxxom@gmail.com, Mar 6 2018

Anything focus-related will fail in this scenario, including tabs.query. I think this is working as expected unless you remember it was different in older versions or elsewhere. You need to set breakpoints that activate the debugger after the affected API is invoked normally i.e. when devtools is not the active window. If you want to test something from the console, you can use a wrapper that focuses a normal browser window and then runs the specified function. 
Cc: susan.boorgula@chromium.org
Labels: Triaged-ET Needs-Feedback
kg@ Thanks for the issue.

Request you to provide a sample extension where this issue can reproduced which will help in further triaging.

Thanks..
Cc: phanindra.mandapaka@chromium.org
Status: WontFix (was: Unconfirmed)
As there is no response from the reporter from so long, closing this issue as Won't fix.

@Reporter: Please feel to raise a new issue if issue is still seen.

Thanks!

Sign in to add a comment