Chromium Code Reviews
DescriptionApp Info: `View in Webstore` closes the dialog before navigating (not after)
Currently, when clicking the 'View in Webstore' link in the App Info
dialog, a new tab is created first then the dialog is closed. This isn't
a problem on most platforms because the dialog is still window-modal, so
it fades out regardless of which tab is focused.
However, On Mac (and eventually perhaps elsewhere) the dialog is tab-
modal. This means that opening a new tab for the navigation will first
hide the dialog. Then, the fade-out occurs, which will show it again.
A simple fix is to swap the lines to Close() the dialog and the
navigation. This starts the dialog fading out before the tab switch
hides it to show the webstore. Close() is asynchronous, so this is fine,
but it looks a bit scary. AppInfo could do with more test coverage
anyway, so add a test.
Use BrowserWithTestWindowTest to avoid creating a browser_test. It needs
a bit of a spruce-up to work on Mac, and can benefit from more code
reuse by using ScopedViewsTestHelper.
Tweaks TestExtensionEnvironment so it plays nice with a wider range of
test harnesses, and adds the FROM_WEBSTORE manifest property by
default (otherwise AppInfo omits the `Show in Webstore` link).
BUG=485854
Committed: https://crrev.com/dfd8edaae421cf5533c2033acde474498c2ee469
Cr-Commit-Position: refs/heads/master@{#341702}
Patch Set 1 #Patch Set 2 : Check created tab #Patch Set 3 : Fix tests, CrOS #Patch Set 4 : Keep the OLE thing #Patch Set 5 : Fix #ifdefs #Patch Set 6 : Likely fix for CrOS #
Messages
Total messages: 17 (7 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||