A basic check that the listener is indeed operational.
MozReview-Commit-ID: 6KijcsRaScI
--HG--
extra : rebase_source : c999d7bd78101f16efffedbfddbce89c83b39f9c
We can use this function for our upcoming test as well, so we should move it into the common header.
MozReview-Commit-ID: H5ANDAlnpmm
--HG--
extra : rebase_source : 9d873d45ec7f701bc993e3b5f676c0638d58656d
If 3-rd party app specify to use tint for Action Button, use primary
text color as the tint color for Action Button.
MozReview-Commit-ID: 3sX0MH8P0dM
--HG--
extra : rebase_source : a50256dd16675f2a329eb182c6aed9e564386315
SessionTest was the last one using that method. Since all new tests should be UITest-based, we can therefore remove it from BaseTest.
MozReview-Commit-ID: EfzlFeu3CDh
--HG--
extra : rebase_source : 2c26f6756bb2491bb2848bcb77d37a811236f149
UITest is our more modern framework for Robocop tests, so using that will hopefully make these tests more reliable and cut down on the intermittent failures which led to them being deactivated.
MozReview-Commit-ID: 6iZCS75FUvT
--HG--
extra : rebase_source : 1b4c89051352c3c6c1d58bfd3519646c152dfe3d
Necessary if we already have an absolute URL and want to pass that to ToolbarComponent.assertTitle().
MozReview-Commit-ID: adXLYGyAZ1
--HG--
extra : rebase_source : d2d29b9605b7c7b69c54ec8b70b8adebffe402d1
As long as the tabs are opened in the same Gecko browser window, splitting the Java UI tabs list into multiple parts breaks too many assumptions, so the easier solution is to allow setting a type attribute on each tab object, which will allow filtering of them later on.
MozReview-Commit-ID: 1PbxMkWTK47
--HG--
extra : rebase_source : ea7b82271b681e04590046a1d5cf9c2230729781
We upload meta/global in three scenarios:
- fresh start
- when it was modified after a successful sync
- when it was modified after an aborted sync
Use X-I-U-S header to assert what we believe about meta/global's presence (during freshStart)
and last-modified timestamp (in all other cases).
We might encounter a concurrent modification condition, manifesting as a 412 error. If we see such an error:
- on fresh start, we restart globalSession
- on regular upload, we request a re-sync of all stages
MozReview-Commit-ID: 3qyb6rUSOeY
--HG--
extra : rebase_source : 166be44aceb634b4e9fa3a8e20f7047cfec2af54
3rd-party app could ask to add default share item to menu, and share
the data url to other activities if user click the share-menu-item.
MozReview-Commit-ID: HkDyENJtFn9
--HG--
extra : rebase_source : 2312d7d0fcab7a7c45933bded7f173aface9912c
If 3rd-party app provides any custom menu items, add them to PopupMenu
and handle corresponding pending intent.
MozReview-Commit-ID: 5STg49hsCWF
--HG--
extra : rebase_source : 34240988a8b89bacb8baef206cf9bf9f93dbf8ef
TabsPanelComponent and TabStripComponent share a lot of functionality, so factor
out TabsPresenterComponent.
MozReview-Commit-ID: Gnbo8gvowj6
--HG--
extra : rebase_source : 5f6738723893ac055354aafd7e872686598c0a8b
It's easy to get a tab's browser, but going the other way round requires always calling getTabForBrowser(), which then additionally has to search each open tab in turn to find the tab with the matching browser.
Also, the browser won't survive tab zombification, so for Part 3 we'll have to start keeping a reference to the tab object anyway.
MozReview-Commit-ID: B2aC7vB0cuj
--HG--
extra : rebase_source : 233b6deec58c0c47640e8a0b597d77324ce66963
This patch has multiple changes folded into:
* Remove old highlights query
* Add new query for retrieving recent history to consider for highlights
* First version of highlights ranking implementation
* Add new loader implementation that will return a list of Highlight objects instead of a Cursor
* Modify UI code to work with Highlight objects instead of a Cursor.
MozReview-Commit-ID: Pdx2YxrZKA
--HG--
extra : rebase_source : 495bd97e40270fb15c05d5b5f511d5dcf89fbd1b
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
We need this for more than one test, let's have one copy we can call
from wherever it's needed.
MozReview-Commit-ID: Bd0o38KcqQc
--HG--
extra : rebase_source : 3421bc7bf5bd24ce3cec38c9ba198f01e4978575
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;
MozReview-Commit-ID: AzhtdwJwVNg
--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
BatchingDownloader uses provided RepositoryStateProvider instance in order to track
offset and high water mark as it performs batching.
The state holder objects are initialized by individual ServerSyncStages, and prefixes are used to ensure keys
won't clash.
Two RepositoryStateProvider implementations are used: persistent and non-persistent. Non-persistent
state provider does not allow for resuming after a sync restart, while persistent one does.
Persistent state provider is used by the history stage. It is fetched oldest-first, and records are applied
to live storage as they're downloaded. These conditions let use resume downloads. It's also possible to
resume downloads for stages which use a persistent buffer, but currently we do not have any.
Offset value and its context is reset if we hit a 412 error; it is maintained if we hit a sync deadline, allowing us to
minimize number of records we'll redownload. BatchingDownloaderController owns resuming and context checking logic.
High water mark (h.w.m.) is maintained across syncs and used instead of stage's "last-synced" timestamp if said stage is
set to fetch oldest-first and explicitely allows use of a h.w.m. Server15RepositorySession provides correct timestamp
to RecordsChannel, decoupling BatchingDownloader from this logic.
MozReview-Commit-ID: IH28YrDU4vW
--HG--
extra : rebase_source : 63bd7daaa1fd2a63e10289d6d4cd198aaf81498b
Stage re-sync is requested if:
- We hit a 412 either during batching download or batching upload
- We hit a sync deadline either during batching download or when merging records from the buffer
SessionStoreDelegate interface was expanded with onStoreFailed,
indicating that not just a particular record failed, but the whole operation did.
onFetchFailed is used to inform delegates of 412/deadline failures during downloads.
Three new exception types were added, to facilitated messaging between different layers.
MozReview-Commit-ID: Ltdi5noEvdV
--HG--
extra : rebase_source : 9d4af039198b9bc92fbbf25cf8e3d32375a2ab26
This commit does two things:
1) It simplifies history insertion logic, which wrongly assumed that history which was
being inserted might be not new. As such, it was necessary to check for collisions of
visit inserts, record number of visits actually inserted, and update remote visit counts
correspondingly in a separate step, making history insert a three step operation (insert
history record, insert its visits, update history record with a count). However, bulkInsert
runs only for records which were determined to be entirely new, so it's possible to drop
the third step.
2) Makes all of the insertions (history records and their visits) run in one transaction.
Prepared statements for both history and visit inserts are used are used as a
performance optimization measure.
MozReview-Commit-ID: 48T4G5IsQNS
--HG--
extra : rebase_source : 280d468ef9b57163a178e42707aee610977625c4
We're at Sync 1.5 now, so might as well rename the files.
Also, renamed the ConstrainedRepository... to a name that's more reflective
of that session's role after the changes.
MozReview-Commit-ID: 96XCzoBzD5D
--HG--
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/Server11PreviousPostFailedException.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/Server15PreviousPostFailedException.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/Server11RecordPostFailedException.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/Server15RecordPostFailedException.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/ConstrainedServer11Repository.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/ConfigurableServer15Repository.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/Server11Repository.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/Server15Repository.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/Server11RepositorySession.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/Server15RepositorySession.java
rename : mobile/android/tests/background/junit4/src/org/mozilla/android/sync/net/test/TestServer11Repository.java => mobile/android/tests/background/junit4/src/org/mozilla/android/sync/net/test/TestServer15Repository.java
rename : mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/TestServer11RepositorySession.java => mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/TestServer15RepositorySession.java
extra : rebase_source : 96f7211951611ce7785edbef9dce412accb2878d
Recent history stage will only run if full history stage did not complete yet.
Bug 1316110 tracks follow up work to make this more efficient.
MozReview-Commit-ID: 7dtbfEFUMGB
--HG--
extra : rebase_source : 94a3e652d9dcf7996e14b96aee28810baee078ea
Intended to signal that a group of records have been fetched, and more are
to come after a pause.
MozReview-Commit-ID: 8ozZTc6aNdA
--HG--
extra : rebase_source : e2fdf70d6db6e242e65b788dcb6a09f975b5124b
Otherwise we often end up with delegate meaning both fetch delegate and store delegate
in extending classes, which gets a little confusing.
MozReview-Commit-ID: L4Sd79jLr88
--HG--
extra : rebase_source : c8df4e2ea373dd415e1c113ccf37c09e392a5302