Commit Graph

1001 Commits

Author SHA1 Message Date
Abodunrinwa Toki
8a5e1ae2f4 FloatingToolbarEspressoUtils + more TextView selection by touch tests
Bug: 24102650
Change-Id: Idd7d8b29ad8cfdf10d75137762bb1cb677bda6b7
2015-09-29 15:27:11 +01:00
Abodunrinwa Toki
ca4aaf3c17 Add more TextView selection (by touch) tests.
This change adds simple tests for:
 - longpress and drag to select
 - double-tap and drag to select

Bug: 24102650
Change-Id: I8614c8ec430dfc204159a03be409a2361cd7d844
2015-09-25 10:53:19 +01:00
Elliott Hughes
434a481b21 am ea1831d2: am b57dd722: resolved conflicts for a884d81e to stage-aosp-master
* commit 'ea1831d211ea0e6b2d161c714bb0786369ef2df5':
  constify JNINativeMethod function pointer tables
2015-09-24 17:23:00 +00:00
Elliott Hughes
b57dd722f1 resolved conflicts for a884d81e to stage-aosp-master
Change-Id: Ice485967fa96f13786024b6939b826638e906ff0
2015-09-24 10:01:32 -07:00
Erik Kline
02cc5a030a Refactor netlink and IpReachabilityMonitor into services/net
- netlink from core to services/net/netlink
    - IpReachabilityMonitor from core to services/net/ip

Change-Id: I45ac3f591bade45dd5ec441111b02b621234c0e4
2015-09-24 12:50:36 +09:00
Daniel Micay
76f6a86de2 constify JNINativeMethod function pointer tables
Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954
2015-09-22 17:10:35 -04:00
Seigo Nonaka
ead8501db2 Merge "Update SuggestionsPopupWindowTest for multiple words." 2015-09-18 03:39:06 +00:00
Jeff Sharkey
8452d94064 Fix some PackageManagerTests.
Change-Id: Iba9afc731fce69fe2f310661a0bfcf6bc7432e2c
2015-09-17 10:17:47 -07:00
Seigo Nonaka
90dc849f63 Update SuggestionsPopupWindowTest for multiple words.
Bug: 15347319
Change-Id: I9bdc1b202e8174c3bdbd038535d0075d9147ee89
2015-09-17 16:52:29 +00:00
Seigo Nonaka
70125f70dc Merge "Move buildInputMethodsAndSubtypesString to InputMethodUtils" 2015-09-17 06:01:13 +00:00
Seigo Nonaka
2a099bcd6f Move buildInputMethodsAndSubtypesString to InputMethodUtils
This CL is mechanical code moving and does not change any existing
behavior.

buildInputMethodsAndSubtypesString is introduced by
If0104151b3526da6ecc669adde3119a239ecafeb for addressing Bug 19822542.
This code moving is one of the TODOs in above change.

Bug: 22285167
Change-Id: Ie63cf593794c9062919887e04a64208a900b1b8b
2015-09-17 12:30:00 +09:00
Seigo Nonaka
f3b53ec795 Merge "Introduce getTextWidths test cases." 2015-09-17 03:17:27 +00:00
Abodunrinwa Toki
ff5d138c33 Merge "TextViewActions for Espresso-testing TextView." 2015-09-16 18:52:42 +00:00
Abodunrinwa Toki
90cdfe0514 TextViewActions for Espresso-testing TextView.
The plan is to add common TextView actions here so they can be used
in tests.
The locateTextAtIndex method is probably not the most efficient way
to locate a particular spot in the TextView but it works well enough
and doesn't use any private/hidden APIs. This might make it easy to
port this test as CTS.
Ideas on alternative implementations for this method are welcome.

Bug: 24102650
Change-Id: Ifb07cc86c58bd5833c37919fa9294a2374dba2a0
2015-09-16 15:58:55 +01:00
Keisuke Kuroyanagi
4968a219bf Remove TextViewWordLimitsTest and add WordIteratorTest.
TextViewWordLimitsTest tests TextView methods that no longer exists.
This removes the obsolete test class and add tests for WordIterator instead.

Bug: 24024480

Change-Id: Iffe16c2d7fa680089bc49d1384ce5e232330fb7c
2015-09-14 12:57:16 -07:00
Seigo Nonaka
5532c34613 Introduce getTextWidths test cases.
This CL includes HintedAdvanceWidthTest-Regular.{ttx|ttf} for fixing
test expectation, which has hinting information.

Bug: 11256006

Change-Id: Ia79a1d093e39cd47c914395e034cb90eda51c5c0
2015-09-10 13:59:07 +09:00
Doris Liu
3991985e12 Merge "A new test for AnimatorSet's clone" 2015-09-04 22:20:22 +00:00
Alan Viverette
0ac567bf7b Remove flaky ListManagedCursorTest tests, clean up lint warnings
Also removes trailing ws.

Bug: 23811652
Change-Id: I2ae5c954606e95bcb4cfe52297717d4caf444cd0
2015-09-04 10:39:40 -04:00
Abodunrinwa Toki
cbfbf0f2bf Merge "Suppress tests in ListManagedCursorTest." 2015-09-04 14:37:09 +00:00
Abodunrinwa Toki
43d5ccca03 Suppress tests in ListManagedCursorTest.
These tests are flaky.

Bug: 23811652
Change-Id: Ic2aac3e852fbdaf3cfae54997212b976e830d121
2015-09-04 15:33:57 +01:00
Abodunrinwa Toki
396d3ca719 Merge "Suppress tests in ListManagedCursorTest." 2015-09-04 13:31:51 +00:00
Abodunrinwa Toki
191f2114ff Suppress tests in ListManagedCursorTest.
These tests are flaky.

Bug: 23811652
Change-Id: I6b61cebab9517393b6dc0a315e1589739ea50fb8
2015-09-04 14:16:40 +01:00
Abodunrinwa Toki
6ef116b168 Merge "Suppress AutoCancelTest." 2015-09-04 10:52:13 +00:00
Abodunrinwa Toki
1ef080116e Suppress AutoCancelTest.
These tests are failing consistently.

Bug: 23807249
Change-Id: I1275747462b20e37ff0f631dbd9e7acfadece5a2
2015-09-04 11:42:16 +01:00
Xiaohui Chen
43765b77a0 Cleanup USER_OWNER in SettingsProvider[Test]
Fixed up the tests and re-enabled it.
Still suppressed one test because what it relies on Settings.Bookmarks
is broken because Settings query format changed.
Fixed a bug in SettingsProvider that the package query is using the
wrong user id.

Bug: 19913735
Change-Id: Ied86a261defba2706f726a13bc32f385f7d93787
2015-09-02 09:52:02 -07:00
Alan Viverette
bea0c7daa6 Keep local run queue in View to avoid posting to wrong thread
Previously any call to post() while a view was detached would stash the
runnable on a thread-local RunQueue. If the post() call happened off the
UI thread to which the view would later be attached, this would result
in the runnable either failing to run or running on some other UI thread.

Bug: 22828132
Change-Id: I5289ee91ea4b56c45f003a387a9f7f0e6dc050f9
2015-09-01 16:00:20 -04:00
Doris Liu
7a1534c139 A new test for AnimatorSet's clone
Set up an AnimatorSet, and make the first clone during the animation run, and
the second after the run. Add one listener to each animator. When the clones
animate, listeners of both the clones and the animator being cloned should
receive animation lifecycle events.

Change-Id: I197440e2cd404592eb29be76864a66a0d110a9a5
2015-08-31 17:00:11 -07:00
Doris Liu
2822a426ab Test ValueAnimator with custom timing pulse provider
This CL depends on ag/749611

With the custom timing pulse provider, we are free from the chaos that could
happen on UI thread and any delay that comes as a result. Therefore we can
count on more accurate timing for each frame, which enables us to test things
such as AnimatorUpdateListener, among other things.

Note that there will still be ~2ms delays in addition to the frame interval
in between frames, due to the MessageQueue processing time.

Change-Id: I6de0aa06125d1ecfae788f5dd22536a5fa52e651
2015-08-27 18:12:47 -07:00
Doris Liu
169cc4c824 Add test that calls cancel() from onAnimationEnd(Animator)
and end() from onAnimationCancel(Animator). No recursive calling
should happen.

Bug: 23596652
Change-Id: I50e223a3de6d31697bee6515668b9732195a261f
2015-08-27 16:12:00 -07:00
Fyodor Kupolov
2170ee43a1 Merge "Limit the number of apps running as system user" 2015-08-26 22:14:36 +00:00
Seigo Nonaka
2041ffb8b5 Merge "Introduce simple SuggestionsPopupWindowTest." 2015-08-26 21:06:58 +00:00
Fyodor Kupolov
7db5af124e Limit the number of apps running as system user
For the system user, enable apps based on the following conditions:
- app has no launcher icons or has INTERACT_ACROSS_USER_FULL permission
- app is whitelisted
- app is not in the blacklist

Bug: 23283899
Change-Id: I90fa266e8cfb28d002e5f792998fdddb6a1e6969
2015-08-26 10:18:10 -07:00
Dmitry Polukhin
91b3d8bf24 Merge "[Backup] Special handling for sharedpref files in backup config" 2015-08-25 18:06:15 +00:00
Roozbeh Pournader
999da7464a Merge "Update tests and support negative values in formatBytes()." 2015-08-21 17:21:11 +00:00
Clara Bayarri
d7e48e1e21 Fix TextViewTest#testProcessTextActivityResultNonEditable
BUG: 23404902
Change-Id: I0b70d3895d0dbfb66fa64a0f7a5cc6c21ace122f
2015-08-21 15:23:24 +01:00
Dmitry Polukhin
80e8db3d9c [Backup] Special handling for sharedpref files in backup config
Allow specifying sharedpref without .xml suffix as it is for
getSharedPreferences Android API. If .xml extension is missing for
sharedpref file name, it is added in include/exclude filters.

BUG: 20923818
Change-Id: I8bf3d43654b69d847e57c94f23aa3799e01948e6
2015-08-21 10:28:02 +02:00
Roozbeh Pournader
4059d7dbfa Update tests and support negative values in formatBytes().
This updates the tests to match the older commit
f723017481 and also adds support for
negative values.

Bug: 23191381
Bug: 11237727
Change-Id: Ib9a1f10031b730ee460658949b388c779cefa041
2015-08-20 17:59:30 -07:00
Doris Liu
eca905c466 Merge "Test for end value when ValueAnimators end" 2015-08-21 00:54:14 +00:00
Doris Liu
435d2f72b3 Test for end value when ValueAnimators end
Change-Id: Iaec25a3e2379fd32ee003bff9670f8fde8b4038f
2015-08-20 17:49:23 -07:00
Yohei Yukawa
e6163081c9 Merge "Add missing test annotations for Ibdafe89474dd69c5b70c67ec98fed4." 2015-08-20 23:33:35 +00:00
Seigo Nonaka
a60160b30b Introduce simple SuggestionsPopupWindowTest.
This CL introduces very simple test case for SuggestionPopupWindow.
I'm going to introduce more test cases for complex scenario once this
approach is accepted, e.g. multiple suggestion span and misspelled flag.

This CL is a part of groundwork for Bug 15347319 and no user visible
change is intended with this CL.

Bug: 15347319
Change-Id: Idf166cbecb3e33be213e4104cf1afd827906f2ad
2015-08-20 12:03:20 -07:00
Doris Liu
e4a6f92562 Merge "Add tests for ValueAnimator" 2015-08-20 17:19:50 +00:00
Doris Liu
be5a8ac55d Add tests for ValueAnimator
This CL contains a few tests for ValueAnimator around start/resume, listener
callbacks, state checks, and start delay.

Change-Id: Ib67f36c1b266faff69f66f945ed846f9f7eb1193
2015-08-19 15:05:19 -07:00
Yohei Yukawa
48d64279d7 Add missing test annotations for Ibdafe89474dd69c5b70c67ec98fed4.
This is a follow up CL for Ibdafe89474dd69c5b70c67ec98fed46656f9f,
which introduced several unit tests with the fix of Bug 21183019
but forgot to add test annotations for new test cases.

This CL makes sure that those newly added tests are annotated with
standard annotations.  Here we use @SmallTest since those test
cases basically checking the behavior only of TextView.

Bug: 21183019
Change-Id: Id6c5950cf8cfc8706e90669c7517f62b1e54f057
2015-08-18 16:00:54 -07:00
Seigo Nonaka
290e4e471b Add @SmallTest for continuous tests.
The target unit test is introduced by
I01f5fafbbcfe3e3f5313829162ec011eaf2ad991 but it lacks @SmallTest
annotation which is necessary for continuous unit tests.

Bug: 22285167
Change-Id: I75235f26fe7a3baffbc60222bd9485ade85e13e8
2015-08-18 10:11:07 -07:00
Seigo Nonaka
2028ddaa50 Move parseInputMethodsAndSubtypesString to InputMethodUtils.
This CL is mechanical code moving and does not change any existing
semantics.

parseInputMethodsAndSubtypesString is introduced by
If0104151b3526da6ecc669adde3119a239ecafeb for addressing Bug 19822542.
This code moving is one of the TODOs in above change.

Bug: 22285167
Change-Id: I01f5fafbbcfe3e3f5313829162ec011eaf2ad991
2015-08-14 21:03:15 +00:00
Yohei Yukawa
35f743713d Move IME related unit tests under core/tests/coretests/.
This CL moves existing (non-CTS) unit tests used for input
method under core/tests/coretests/ to reduce the maintenance
cost.

Although some package names and import lines are updated
to be consistent with new file locations, test cases are
are kept to be the same.

Change-Id: I4efce90b232458212ac48292dc01b812a9e851e5
2015-08-12 20:14:08 -07:00
Doris Liu
2bdc0b0517 More tests for AnimatorSet
This CL contains more test coverage of functionalities in AnimatorSet.
Specifically, set/get duration, add/remove listeners, start/cancel/end
and pause/resume AnimatorSet and some state check are included here.

Change-Id: Ic8a17f3733ab0d8d4453b0c1f1e8650a331c016f
2015-08-11 16:55:07 -07:00
Doris Liu
b5d4c297c4 Merge "Add tests for AnimatorSet" 2015-08-10 22:08:35 +00:00
Doris Liu
02f90c57f6 Add tests for AnimatorSet
This CL includes tests for getChildAnimations() and getTotalDuration()

Change-Id: I65c434344bd50474556dac179cb3e07e92d8134a
2015-08-10 14:49:08 -07:00