gecko-dev/mobile/android/base
Tom Klein ce402fbf10 Bug 1340929 - Don't scroll to a new tab opened from a link. r=sebastian
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
2017-02-22 21:54:11 -06:00
..
aidl/org/mozilla/gecko/media Bug 1324530 - part 3: make codec methods that change state(start, stop, flush, release) synchronous. r=snorp 2016-12-23 16:25:43 +08:00
crashreporter/res
java/org/mozilla/gecko Bug 1340929 - Don't scroll to a new tab opened from a link. r=sebastian 2017-02-22 21:54:11 -06:00
locales Bug 1325264 - Update wording of 'disconnect from sync' dialog. r=Grisha 2017-01-27 18:11:44 +01:00
resources Bug 1340929 - Don't scroll to a new tab opened from a link. r=sebastian 2017-02-22 21:54:11 -06:00
adjust-sdk-sandbox.token Bug 1277407 - Add Adjust sandbox keyfile to tree. r=sebastian 2016-06-03 16:55:51 -07:00
AdjustConstants.java.in Bug 1291366 - Part 1: Use GENERATED_FILES to produce AppConstants.java. r=gps 2016-11-14 20:06:31 -08:00
android-services.mozbuild Bug 1291821 - Allow BatchingDownloader to resume downloads using offset r=rnewman 2017-01-19 13:11:18 -08:00
AndroidManifest.xml.in Bug 1314466 - part 6, Add new files to build r=nalexander 2016-11-14 16:45:23 -08:00
AppConstants.java.in Bug 1312686 - Link "default browser" setting to app info screen on Android 7+; r=sebastian 2017-02-15 02:27:26 +05:30
FennecManifest_permissions.xml.in Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
GcmAndroidManifest_permissions.xml.in
GcmAndroidManifest_services.xml.in
geckoview.ddf Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
generate_build_config.py Bug 1291366 - Part 1: Use GENERATED_FILES to produce AppConstants.java. r=gps 2016-11-14 20:06:31 -08:00
Makefile.in Bug 1291366 - Part 1: Use GENERATED_FILES to produce AppConstants.java. r=gps 2016-11-14 20:06:31 -08:00
moz.build Bug 1322576 - [2.4] Add GeckoView settings management. r=snorp,jchen 2017-02-22 14:57:38 +01:00
package-name.txt.in
strings.xml.in Bug 1333589 - 1. Use GeckoBundle for DoorHanger.OnButtonClickListener; r=sebastian 2017-01-25 18:57:31 -05:00