Chromium Code Reviews| Index: chrome/browser/resources/settings/android_apps_page/android_apps_page.js |
| diff --git a/chrome/browser/resources/settings/android_apps_page/android_apps_page.js b/chrome/browser/resources/settings/android_apps_page/android_apps_page.js |
| index 861731780652ab51607d5907c609012ddb6e61da..0f8c4aca707da19b828dbb3c52d0ed370bf63689 100644 |
| --- a/chrome/browser/resources/settings/android_apps_page/android_apps_page.js |
| +++ b/chrome/browser/resources/settings/android_apps_page/android_apps_page.js |
| @@ -54,7 +54,14 @@ Polymer({ |
| * @private |
| */ |
| androidAppsInfoUpdate_: function(info) { |
| + if (!this.parentElement) |
|
khmel
2017/05/10 21:48:13
in test this causes multiple listener invocation a
stevenjb
2017/05/10 22:35:44
This is weird, we should avoid it. The test to set
khmel
2017/05/11 00:10:30
settings.navigateToPreviousRoute() is async (windo
stevenjb
2017/05/11 16:58:14
When would that ever happen in practice?
Again, t
khmel
2017/05/11 17:32:22
I described when this happens above. For example o
|
| + return; |
| + |
| this.androidAppsInfo_ = info; |
| + if (!this.androidAppsInfo_.playStoreEnabled && |
| + settings.getCurrentRoute() == settings.Route.ANDROID_APPS_DETAILS) { |
| + settings.navigateToPreviousRoute(); |
| + } |
| }, |
| /** |
| @@ -68,7 +75,7 @@ Polymer({ |
| /** @private */ |
| onSubpageTap_: function() { |
| - if (this.androidAppsInfo_.appReady) |
| + if (this.androidAppsInfo_.playStoreEnabled) |
| settings.navigateTo(settings.Route.ANDROID_APPS_DETAILS); |
| }, |
| }); |