1457 Commits

Author SHA1 Message Date
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
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
3a4ad6bc55 Merge "Cleanup USER_OWNER in SettingsProvider[Test]" 2015-09-03 17:21:22 +00:00
Joshua Schwarz
b3b72c9700 am 78daa6d3: am bade9522: am 258a7cd9: Merge "Use LOCAL_MAC_ADDRESS permission in bluetoothtests." into cw-e-dev
* commit '78daa6d32d991c7a84bd0b9eb6f26ef6986c13ae':
  Use LOCAL_MAC_ADDRESS permission in bluetoothtests.
2015-09-03 06:38:59 +00:00
Joshua Schwarz
78daa6d32d am bade9522: am 258a7cd9: Merge "Use LOCAL_MAC_ADDRESS permission in bluetoothtests." into cw-e-dev
* commit 'bade9522cf11141d3bd31ab9d56976a33d05fc64':
  Use LOCAL_MAC_ADDRESS permission in bluetoothtests.
2015-09-03 06:21:11 +00: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
Joshua Schwarz
12fa3d1909 Use LOCAL_MAC_ADDRESS permission in bluetoothtests.
Change-Id: If2b0797a4bc526e1fdb058d83d4d2bc676875cee
2015-09-01 18:03:18 -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
f723017481a247b4aa842937c3983b7d7d8f75fd 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
Shirish Kalele
822b4f3a8d am 4ecee3f8: am 558f1030: am 74f93f9a: am d7408469: am 027e3b7f: Merge "Fix check for caller being the active network scorer" into mnc-dev
* commit '4ecee3f88e067ed0339a4e004996a3c69ce5480e':
  Fix check for caller being the active network scorer
2015-08-08 02:48:37 +00:00
Roozbeh Pournader
463b48203a Support all RTL scripts in getLayoutDirectionFromLocale().
Previously, only the languages written in Arabic and Hebrew were
considered right-to-left. Now, ICU is used to return the direction
of the language, which not only support other right-to-left scripts
(such as Thaana), but also has better logic to determine the
direction of the locale and uses caching to improve the speed.

Bug: 22559274
Change-Id: I760be7984a9b35ea77d59ca84a220798e205af36
2015-08-07 13:56:54 -07:00
Shirish Kalele
4ecee3f88e am 558f1030: am 74f93f9a: am d7408469: am 027e3b7f: Merge "Fix check for caller being the active network scorer" into mnc-dev
* commit '558f10307c65e5c0a3e0e11a4abca4a083f751dc':
  Fix check for caller being the active network scorer
2015-08-07 20:55:42 +00:00
Shirish Kalele
4cab12d91d Fix check for caller being the active network scorer
Compare caller and scorer uids to decide if caller is the
active scorer instead of calling AppOps.checkPackage().

Bug: 23000690
Change-Id: I64285f965716f3aceb24f193d86ab9d6be7202c5
2015-08-06 12:53:59 -07:00
Abodunrinwa Toki
7bee548aa6 Suppress flaky framework core tests.
Change-Id: I61f8f5ec7cd73cff1bebe5f606cb41681881d1de
2015-08-04 20:12:52 -07:00
Abodunrinwa Toki
f90177629a Turn off failing tests in FrameworksCoreTests.
We want a green state so we can confidence in tests we write
going forward.

Change-Id: I2c8db848897b56d0c64202ad28861eb4a7572e07
2015-07-31 18:13:30 -07:00
Abodunrinwa Toki
fc828febf7 Enable PhoneWindowActionModeTest in continuous testing.
Instrumentation tests running in continuous testing should be
annotated with one of @SmallTest, @MediumTest, @LargeTest.

Change-Id: Ib9c450287b170683f40cfce3ba8d049023ddc357
2015-07-31 15:20:06 -07:00
Abodunrinwa Toki
223c8392f0 Demo functional test for frameworks/core with Espresso
- Integrates Espresso
- Changes the Instrumentation Test runner to AndroidJUnitRunner
- Adds a demo test

This will serve as a template for other tests.

Change-Id: I10592f5adb404c2aba9dd8676ae2aa5a191ad336
2015-07-28 21:46:51 +00:00
Erik Kline
f2a08d054c am 49aeed9f: am 5f950417: Merge "Fix use of reachable DNS server logic" into mnc-dev
* commit '49aeed9f3fe7d8e7af2fff549587546dfe4361d1':
  Fix use of reachable DNS server logic
2015-06-30 06:55:42 +00:00
Erik Kline
b36a3131d1 Fix use of reachable DNS server logic
Move reachable DNS server computation out of ConnectivityService
and split it into LinkProperties#isReachable() and a companion
change in WifiStateMachine's makeLinkProperties().

Restore previous ConnectivityService#updateDnses() behaviour, as
the pruning is done in WifiStateMachine now.

Bug: 19470192
Bug: 20733156
Bug: 22098233
Change-Id: I810ef74d504e5dc1ca2017d435cdadd6b82171e6
2015-06-30 12:12:37 +09:00
Yohei Yukawa
c8deda50fe am e564feba: am 4daf600e: Merge "Check system locale when picking up an initial SpellChecker." into mnc-dev
* commit 'e564feba53f71610afb3bc995497e853654fb2d6':
  Check system locale when picking up an initial SpellChecker.
2015-06-29 21:23:24 +00:00