mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 13:45:27 +00:00
ce402fbf10
We used to scroll in addTab to make sure a new tab created by a close-tab-undo at the start or the end of the list was made visible instead of staying where it was created off the edge. We're now taking care of that in selectTab (where it should have stayed in the first place), where the select in that case occurs between the time when the new tab is added to the adapter and when the layout gets updated. In the case where the new tab is at the start, that means the check 'position < layoutManager.findFirstCompletelyVisibleItemPosition()' in selectTab reads '0 < 0', which fails (which is why we need the new check for 'position == 0'), but the check 'position > layoutManager.findLastCompletelyVisibleItemPosition()' for a tab added at the end reads 'new_lengh -1 > old_length - 1' which already passes, so we don't need a special case for undo-tab-close adds at the end in selectTab. Tabs added at the end by a normal "create new tab" still scroll for the same reason. Robotium was confused by the duplicate 'add_tab' ids from the tab strip and the tabs panel, so I renamed one of them. Also note that the 'getTabId' added to TabStripItemView for testing already exists on TabLayoutItemView, but the two classes don't share a common base. MozReview-Commit-ID: BzG2r8BSs90 --HG-- rename : mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testTabStripPrivacyMode.java => mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testTabStrip.java extra : rebase_source : b2859647d9e26cdca24e1b03065d3c62e20f7b1b extra : source : 119ee2655404e277c13d0e436fba1cad1272797e |
||
---|---|---|
.. | ||
aidl/org/mozilla/gecko/media | ||
crashreporter/res | ||
java/org/mozilla/gecko | ||
locales | ||
resources | ||
adjust-sdk-sandbox.token | ||
AdjustConstants.java.in | ||
android-services.mozbuild | ||
AndroidManifest.xml.in | ||
AppConstants.java.in | ||
FennecManifest_permissions.xml.in | ||
GcmAndroidManifest_permissions.xml.in | ||
GcmAndroidManifest_services.xml.in | ||
geckoview.ddf | ||
generate_build_config.py | ||
Makefile.in | ||
moz.build | ||
package-name.txt.in | ||
strings.xml.in |