diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 22:44:31 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 22:44:31 +0000 |
commit | 62b0b53d2faff1ff658359e00b9fe8c1c7137d25 (patch) | |
tree | b69dd47875f8837956f0af70ee65307c8d1412e3 /chrome/test/ui_test_utils.cc | |
parent | b931f02fb3474485bd69140c6710fb9a80f4e14d (diff) | |
download | chromium_src-62b0b53d2faff1ff658359e00b9fe8c1c7137d25.zip chromium_src-62b0b53d2faff1ff658359e00b9fe8c1c7137d25.tar.gz chromium_src-62b0b53d2faff1ff658359e00b9fe8c1c7137d25.tar.bz2 |
Fix the logic in extensions GetCurrentWindow:
- We try to find an associated window for the calling extension page.
- If there is none (bg pages), fallback to the topmost browser window.
- If the extension is enabled in incognito, include incognito windows in the
search for "topmost".
This fixes a bug where clicking a browser action in an incognito window might open a tab in a normal window, which is confusing.
BUG=39113
Review URL: http://codereview.chromium.org/1422001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui_test_utils.cc')
-rw-r--r-- | chrome/test/ui_test_utils.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc index 781c918..4dd4859 100644 --- a/chrome/test/ui_test_utils.cc +++ b/chrome/test/ui_test_utils.cc @@ -457,7 +457,7 @@ Browser* WaitForNewBrowser() { void OpenURLOffTheRecord(Profile* profile, const GURL& url) { Browser::OpenURLOffTheRecord(profile, url); Browser* browser = BrowserList::FindBrowserWithType( - profile->GetOffTheRecordProfile(), Browser::TYPE_NORMAL); + profile->GetOffTheRecordProfile(), Browser::TYPE_NORMAL, false); WaitForNavigations(&browser->GetSelectedTabContents()->controller(), 1); } |