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

Issue 820902 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug-Regression



Sign in to add a comment

User is able to switch to incognito mode even when there are no incognito tabs

Reported by manish.m...@etouch.net, Mar 12 2018

Issue description

Application Version: 66.0.3359.28
Android Build Number: 5.1.1/LMY47X
Device: Samsung Galaxy J2

Precondition:
1. Atleast one History/Bookmarks should be present in History/Bookmarks

Steps to reproduce: 
1. Launch Chrome
2. Tap on New incognito tab from wrench menu
3. Tap on History/Bookmarks from wrench menu > Long tap on any History/Bookmarks > Tap on Open in incognito tab from Three dot menu
4. Tap on Tab switcher icon > Close all incognito tabs from Notifications > Try to switch to incognito tab by tapping on right side blank area > Observe 1
5. Tap on wrench menu > Observe 2
 
Observed behavior: 
1. User is able to switch to incognito mode even when there are no incognito tabs
2. Close incognito tabs option is enabled even when there are no incognito tabs

Expected behavior:
1. User should not be able to switch to incognito mode when there are no incognito tabs
2. Close incognito tabs option should be disabled when there are no incognito tabs

Frequency:  
<5/5>

Additional comments: 
1. Good build: 66.0.3355.0
   Bad build : 66.0.3356.0

2. This issue is reproducible on Samsung Galaxy J2 (5.1.1/LMY47X),Samsung Galaxy J7 (6.0.1/MMB29K),Google Pixel (7.1.2/NJH47F),Oppo A37fw(5.1.1/LMY47V),Samsung Galaxy Grand 2 (4.3.0/JLS36C),Samsung Galaxy S4 (5.0.1/LRX22C),Samsung Galaxy S3 (4.3/JSS15J),Google Pixel XL(8.1.0/OPR3.171019.011)

Bisect Range : https://chromium.googlesource.com/chromium/src/+log/66.0.3355.0..66.0.3356.0?pretty=fuller&n=10000
 
Please find logs and Video @ http://go/chrome-androidlogs1/8/820902
Labels: -Pri-3 hasbisect-per-revision ReleaseBlock-Stable RegressedIn-66 M-66 FoundIn-66 Target-66 Pri-2 Type-Bug-Regression
Owner: mdjones@chromium.org
Status: Assigned (was: Unconfirmed)
unable to narrow down the bisect using per-cl bisect tool, as it shows all the good builds when we are trying to bisect. 

There are two changes related to tab switcher which may cause this issue. 

Suspected CL 1 :
https://chromium.googlesource.com/chromium/src/+/99c1a2c3394f7bfab9e11f846aaa708853fb8095

Suspected CL 2:
https://chromium.googlesource.com/chromium/src/+/d85bbd7db50773c927c3ed9892b73fc70d9ed296

mdjones@ above both the CL's are related to you, could you please look into once, if its not related to your change can you assist me to assign to respective dev. Thanks 
Cc: mdjones@chromium.org
Components: UI>Browser>Mobile>TabSwitcher
Owner: rlanday@chromium.org
Suspect change reverted here: https://chromium-review.googlesource.com/c/chromium/src/+/956937

but that was likely not the culprit. It was more likely one of:

https://chromium.googlesource.com/chromium/src/+/7edc13a56b405ab50080aaa01a9b89cc51ea449e

https://chromium.googlesource.com/chromium/src/+/c9385c03c2bc3bb9bbc243b573942d2c9b5ea483

Assigning to rlanday@ to take a look.
The immediate cause is:

https://chromium-review.googlesource.com/c/chromium/src/+/933061
Remove StackLayout#canScrollLinearly()

I think really the root issue here is that this sequence of operations puts the tab switcher in an inconsistent state where it's showing the margin for the second stack, even though the stack is not considered displayable. Should be a pretty simple fix.
The underlying issue is that when the notification causes the stack to be changed by closing all the tabs:

org.chromium.chrome.browser.compositor.layouts.phone.StackLayout.flingStacks(StackLayout.java:1084)
org.chromium.chrome.browser.compositor.layouts.phone.StackLayout.onTabModelSwitched(StackLayout.java:577)
org.chromium.chrome.browser.compositor.layouts.LayoutManager.tabModelSwitched(LayoutManager.java:613)
org.chromium.chrome.browser.compositor.layouts.LayoutManager$2.onTabModelSelected(LayoutManager.java:444)
org.chromium.chrome.browser.tabmodel.TabModelSelectorBase.selectModel(TabModelSelectorBase.java:86)
org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl.selectModel(TabModelSelectorImpl.java:230)
org.chromium.chrome.browser.tabmodel.TabModelImpl.setIndex(TabModelImpl.java:480)
org.chromium.chrome.browser.tabmodel.TabModelImpl.removeTabAndSelectNext(TabModelImpl.java:571)
org.chromium.chrome.browser.tabmodel.TabModelImpl.startTabClosure(TabModelImpl.java:530)
org.chromium.chrome.browser.tabmodel.TabModelImpl.closeTab(TabModelImpl.java:365)
org.chromium.chrome.browser.tabmodel.TabModelImpl.closeAllTabs(TabModelImpl.java:423)
org.chromium.chrome.browser.tabmodel.TabModelImpl.closeAllTabs(TabModelImpl.java:401)
org.chromium.chrome.browser.tabmodel.IncognitoTabModel.closeAllTabs(IncognitoTabModel.java:138)
org.chromium.chrome.browser.incognito.IncognitoNotificationService$3.run(IncognitoNotificationService.java:208)


it never calls startMarginAnimation() to make the first stack fill the whole screen again. The tricky thing with just adding this call is that it seems that, at this point, the incognito Stack has not been fully updated with the tab closure, so stack.isDisplayabe() is still returning true. I'm not super interested in messing with TabModelImpl right now to figure out how to fix or work around this, so I'm just going to upload a targeted fix for the regression. 
Labels: -Restrict-View-Google
Labels: -Pri-2 -ReleaseBlock-Stable Pri-3
Project Member

Comment 8 by bugdroid1@chromium.org, Mar 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/44f923b213a284825b87fd7a8b9dea048c964653

commit 44f923b213a284825b87fd7a8b9dea048c964653
Author: Ryan Landay <rlanday@chromium.org>
Date: Thu Mar 15 19:09:35 2018

Fix regression in StackLayout when closing all incognito tabs from notification

There's a sequence of steps (see  crbug.com/820902 ) that can cause the Android
tab switcher to enter a state where it's showing a margin for the incognito tab
stack, even though the stack is empty and we normally wouldn't allow switching
to it.

This CL fixes a regression when performing this sequence of operations that
allows switching back and forth to the empty tab stack. The regression was
introduced in https://chromium-review.googlesource.com/c/chromium/src/+/933061.
This CL does not fix the margin issue, which would be more involved to debug.

Bug:  820902 
Change-Id: I7255f430637d7f13d2dd63ce42f2e147f6a51e9c
Reviewed-on: https://chromium-review.googlesource.com/959569
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543466}
[modify] https://crrev.com/44f923b213a284825b87fd7a8b9dea048c964653/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/StackLayoutBase.java

Labels: Merge-Request-66
Project Member

Comment 10 by sheriffbot@chromium.org, Mar 15 2018

Labels: -Merge-Request-66 Merge-Reject-66 Hotlist-Merge-Reject
The bug is marked as P3 or Feature. It should not be merged as M66 is in beta. 
Please contact the approriate milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Fixed (was: Assigned)
I guess this will go out in 66 but be fixed in 67
Labels: cannot-perCL-bisect
Issue doesn't repro on latest M67 - 67.0.3376.0 as per the steps mentioned in the comment 0. Still repro on latest M66 - 66.0.3359.43. 

Sign in to add a comment