488 Commits

Author SHA1 Message Date
Vasu Nori
e7dea4ec24 bug:3443154 fix database tests after disabling sqlite wal
sqlite wal is disabled in Change-Id: I283ad26ba7e1793772a372aa8e24df0cb96ce2ef

Change-Id: I2b370c65390a9293e4a82f650c9cee8023b861d7
2011-02-10 13:18:23 -08:00
Svetoslav Ganov
8bf7cace20 Added tests for WebView accessibility no JS
bug:3421690

This change is related to change:Idfec7e6a

1. Added tests for cases in which the previous
   implementation was not behaving as expected.

2. Refatered the tests to be intrumentation tests
   since the code under tests uses the DOM element
   dimensions to determine visibility and if the
   the WebView has no size i.e. not attached to
   ViewRoot the size of all DOM elements is zero
   forcing all tests to fail.

Change-Id: Ib4c01af8feb09f2b2a6b9d906e08bfaaa9e9bc74
2011-02-09 11:04:23 -08:00
Jesse Wilson
e2c1f4a0ee New LRU cache class.
Change-Id: I0e6ea1e489c684b876aebd5857c6f16a21048a8d
http://b/3184897
2011-02-07 16:39:35 -08:00
Dianne Hackborn
db569b4918 am 6cf32312: Merge "Do not check features in PackageManagerService" into honeycomb
* commit '6cf32312aaee6716ffd1df7098838b08d80054e4':
  Do not check features in PackageManagerService
2011-01-31 18:51:56 -08:00
Kenny Root
4c3915a0f7 Do not check features in PackageManagerService
PackageManagerService shouldn't check features that a package declares
that it uses because this will cause problems in the future when we add
more features that older phones didn't explicitly declare. We must rely
on markets to know about phones and filter them for us to avoid this
situation.

Bug: 3409434
Change-Id: I419a5b936be3572b83a485081a6c81b2f1c8741c
2011-01-31 16:59:12 -08:00
Vasu Nori
242fa0eb73 am ce3b35a7: Merge "bug:3398527 return List insttead of ArrayList from public API" into honeycomb
* commit 'ce3b35a7b0b80061692d9fa1977cee68b365728c':
  bug:3398527 return List insttead of ArrayList from public API
2011-01-27 15:00:38 -08:00
Vasu Nori
ce3b35a7b0 Merge "bug:3398527 return List insttead of ArrayList from public API" into honeycomb 2011-01-27 12:46:00 -08:00
Vasu Nori
a017edace7 bug:3398527 return List insttead of ArrayList from public API
Change-Id: Idbdcb59fe860a9168c9ef6c00eb128b05fce84ff
2011-01-27 11:47:28 -08:00
Svetoslav Ganov
54fc78072f am df467264: Merge "Final polish of WebView accessibility support for no JavaScript case." into honeycomb
* commit 'df4672643b92208b4ab7f9ab995dca8b69d3c458':
  Final polish of WebView accessibility support for no JavaScript case.
2011-01-26 14:41:33 -08:00
Svetoslav Ganov
9504f5753d Final polish of WebView accessibility support for no JavaScript case.
1. Added tests for the new code added by change:I5a796aef

2. WebCore thread now calls the UI thread to set the cursor to
   the current position enabling the user to interact with
   the content that is being selected on the page.

3. Removed the code that changes the selection on movement of the
   cursor ring. We are dropping the "default web view behavior"
   as granularity of reading the document since with this change
   a user can freely access inputs/buttons/links.

Change-Id: I7a3f6677eff0bc95e8127973d07cec78e3465c7b
2011-01-26 06:26:43 -08:00
Yu Shan Emily Lau
58fc2d39e8 am 588b1e45: Merge "Change the default ssid from GoogleGuest to the opennet for the power test." into honeycomb
* commit '588b1e4511d67f080449c3d49fd0d4bfc2bec79f':
  Change the default ssid from GoogleGuest to the opennet for the power test.
2011-01-21 14:28:52 -08:00
Yu Shan Emily Lau
3d273da8fa Change the default ssid from GoogleGuest to the opennet for the power test.
Change-Id: I63bae360d283dc5224790aaccbd879015402187d
2011-01-21 14:06:22 -08:00
Eric Rowe
85d5b532dd am f38bddbe: DO NOT MERGE Add connect HID/NAP BT stress test
* commit 'f38bddbeb42988c7960e20585aeee9ae64f4b985':
  DO NOT MERGE Add connect HID/NAP BT stress test
2011-01-18 19:08:42 -08:00
Eric Rowe
993add8297 am a0d4d80f: DO NOT MERGE Cleaned up BT test utils
* commit 'a0d4d80fd2feaa04cb5f5242acd159cd783b25d4':
  DO NOT MERGE Cleaned up BT test utils
2011-01-18 19:06:34 -08:00
Eric Rowe
f38bddbeb4 DO NOT MERGE Add connect HID/NAP BT stress test
Change-Id: I1d8cd5cb45583d1c4c5e94e72abbd8a9f04f53cf
2011-01-18 18:33:29 -08:00
Eric Rowe
a0d4d80fd2 DO NOT MERGE Cleaned up BT test utils
Change-Id: I905a468a04b5730258a9e6525165e4c4013d30c8
2011-01-18 18:33:29 -08:00
Kenny Root
a33dd09b5c am d6c54d97: Merge "Revert "Add the {get,set}PackageObbPaths calls to API"" into honeycomb
* commit 'd6c54d97867edd566700c535f3edf57dd4396350':
  Revert "Add the {get,set}PackageObbPaths calls to API"
2011-01-17 13:05:22 -08:00
Kenny Root
a1cbb94dbc Revert "Add the {get,set}PackageObbPaths calls to API"
This reverts commit 5d40fe9c6846ba765072e50ed1254293cb9195e4.

Change-Id: Ie41010c92fb860b19a12bcf63f6fe95ffa68da81
2011-01-17 13:00:47 -08:00
Kenny Root
d9fa11b446 am 312206b9: Merge "Add the {get,set}PackageObbPaths calls to API" into honeycomb
* commit '312206b98749bbe395416634e6e82bd242b1d5f2':
  Add the {get,set}PackageObbPaths calls to API
2011-01-14 12:44:39 -08:00
Kenny Root
5d40fe9c68 Add the {get,set}PackageObbPaths calls to API
Add getPackageObbPaths() and setPackageObbPaths() to the public API.

Bug: 3214719
Change-Id: I8627b5f674a795d5780eb5c08911419110670a41
2011-01-14 12:18:48 -08:00
Svetoslav Ganov
575fbf612a am 06e32b43: Merge "Updating the WebView accessibility key bindings after discussion with the access-eng team" into honeycomb
* commit '06e32b434b62b22eeee900851ff56f2098ddc019':
  Updating the WebView accessibility key bindings after discussion with the access-eng team
2011-01-13 10:24:38 -08:00
Svetoslav Ganov
bfc3ce78f4 Updating the WebView accessibility key bindings after discussion with the access-eng team
Change-Id: I39a303864b94a8a11b6cded9b8bb23041ad91502
2011-01-13 01:20:39 -08:00
Xia Wang
3c5637a457 am 1aaae92f: Merge "Wait for Wi-Fi state change before set the state verification criteria. bug: 3336896" into honeycomb
* commit '1aaae92f990bad51d503fe692def01191fda4db7':
  Wait for Wi-Fi state change before set the state verification criteria. bug: 3336896
2011-01-12 15:03:41 -08:00
Kenny Root
c31e095e2b am e7b2310a: Merge "Make sure AppCacheTest casts to long" into honeycomb
* commit 'e7b2310a856889aa1e683104039033ada3f6b696':
  Make sure AppCacheTest casts to long
2011-01-12 15:03:24 -08:00
Xia Wang
1aaae92f99 Merge "Wait for Wi-Fi state change before set the state verification criteria. bug: 3336896" into honeycomb 2011-01-12 14:58:46 -08:00
Kenny Root
6c46760b72 Make sure AppCacheTest casts to long
AppCacheTest was multiplying two integers that were too large for
devices that had more free space than 32-bits could represent.

Hopefully no one releases devices with 1TB soon.

The testAppCacheClear test doesn't work currently because it has an
"imax" attribute that doesn't allow the disk to be filled up entirely.
It only writes a couple hundred MB before it gives up.

Bug: 3216419
Change-Id: Ie371f42211bab65f2c767b36d9837ce76922501e
2011-01-12 14:33:55 -08:00
Kenny Root
aee96e9773 am 5e9ba49f: Merge "Skip SD card tests on devices without SD cards" into honeycomb
* commit '5e9ba49f5efed4f0adc7ffcf5052668cdfd92a25':
  Skip SD card tests on devices without SD cards
2011-01-12 12:30:17 -08:00
Kenny Root
3c67689584 Skip SD card tests on devices without SD cards
Tests were giving false failures when they should instead be skipped.
Forcing an install to an SD card on a device without one shouldn't count
as a failure. It's expected behavior.

Bug: 3216422
Change-Id: Ia523861d1331e74c76b434f7ba73b642d474a9cc
2011-01-12 12:26:26 -08:00
Brad Fitzpatrick
43194ce05e am 52d70722: am cb842753: Merge "Closing cursor in finalizer to avoid GREF and fd leak in acore"
* commit '52d70722654548d156bd7a1cb8c1f05b94b09f06':
  Closing cursor in finalizer to avoid GREF and fd leak in acore
2011-01-12 00:04:27 -08:00
Xia Wang
2dc2991f58 Wait for Wi-Fi state change before set the state verification criteria.
bug: 3336896

Change-Id: If4faf55d1c9a326a0cbd95013b8a5edce562230e
2011-01-11 17:35:56 -08:00
Jesse Wilson
eb97c0ddc0 Patch new JSON APIs with changes informed by GSON.
Change-Id: I86c12a123080cc06ab23d11d1563bb52c5902517
2011-01-10 12:56:31 -08:00
Brad Fitzpatrick
52d7072265 am cb842753: Merge "Closing cursor in finalizer to avoid GREF and fd leak in acore"
* commit 'cb8427538dfdc5eae941e377b11bfd11a95fc5a5':
  Closing cursor in finalizer to avoid GREF and fd leak in acore
2011-01-10 08:32:35 -08:00
Johannes Carlsson
872a52c6b6 Closing cursor in finalizer to avoid GREF and fd leak in acore
The finalize() call did not clean up completely, this eventually
caused the android.process.acore to crash since it ran out of fds
and GREF to increased above 2000 if an application forgot to close
its cursor objects. A warning was also added when this happens so
that application developers can correct their mistake. The
included test case tries to verify that the finalizer works as
expected by creating a bunch of Cursor objects without closing
them (without this fix the acore process crashes after about 400
iterations and the test case ends with "Process crashed").

Change-Id: I11e485cef1ac02e718b2742108aa88793666c31d
2011-01-10 12:46:21 +01:00
Kenny Root
b0512c3725 Merge "Fix check for required features" into honeycomb 2011-01-09 07:15:26 -08:00
Kenny Root
1683afac14 Fix check for required features
The required features check was in an null check for usesLibraries, so
it wasn't checking for required features when an application did not use
a library.

Bug: 3331713
Change-Id: I96d366ba00d4962b84f3796be97e2b622eb331a5
2011-01-07 15:43:05 -08:00
Gilles Debunne
79ff914f21 Added support for Unicode surrogate characters in word selection
Inspired by https://review.source.android.com/#change,16606

Change-Id: I896354f5aba83c1919c008f07b6d0b2abf0b8e01
2011-01-07 11:59:26 -08:00
Gilles Debunne
87380bcaeb Added support for asian characters in text selection.
Inspired by https://review.source.android.com/#change,16606

Test class has been revamped to mimic new behavior: selectCurrentWord
is no longer used to add words to the dictionary. We rely on the suggestion
bar in the IME for that.

Change-Id: I1cb88df54dffb166c75f75fefb743ff55a33519b
2011-01-04 14:18:13 -08:00
Vasu Nori
6141e13f6e when cursorwindow allocation fails, print the number of cursors left open
the reason for bug:3281533, bug:3127159 is probably too many cursors are left
un-closed in the process.
print the info on the number of cursors left open when the exception
"cursorwindow allocation failed" occurs.
This should help us figure out if that indeed is the reason
and which process is leaving the cursors open.

Change-Id: I4b46be63f5dfbe9b102ad7a9cf9dd21e70f71e14
2011-01-04 10:40:15 -08:00
Alon Albert
2967aa3e60 am 672ebb61: Merge "Improved ignore-backoff handling Allow a non-epidited ignore-backoff op to pass through an expidited backed off op." into gingerbread
* commit '672ebb61a755e4bbe60e4e884b1adadf186733b6':
  Improved ignore-backoff handling Allow a non-epidited ignore-backoff op to pass through an expidited backed off op.
2010-12-28 14:57:09 -08:00
Alon Albert
672ebb61a7 Merge "Improved ignore-backoff handling Allow a non-epidited ignore-backoff op to pass through an expidited backed off op." into gingerbread 2010-12-28 14:44:51 -08:00
Vasu Nori
3079d44a9d Merge "fix all flaky tests to make them work consistently." 2010-12-23 16:48:18 -08:00
Irfan Sheriff
b45e726bf5 Fix wifi broadcasts
Add the missing wifi disable broadcast and also send out
supplicant disconnect on shutdown.

Added unit test cases.

Bug: 3294055

Change-Id: Ia56a8ec9d17784c5aac5b8b369c04837f9057c54
2010-12-22 14:43:13 -08:00
Alon Albert
d41fe75f09 Improved ignore-backoff handling
Allow a non-epidited ignore-backoff op to pass through
an expidited backed off op.

To do this, I first refactored the complicated if statement:

            if (best == null
                    || ((bestSyncableIsUnknownAndNotARetry == syncableIsUnknownAndNotARetry)
                        ? (best.expedited == op.expedited
                           ? opRunTime < bestRunTime
                           : op.expedited)
                        : syncableIsUnknownAndNotARetry)) {
                best = op;
                bestSyncableIsUnknownAndNotARetry = syncableIsUnknownAndNotARetry;
                bestRunTime = opRunTime;
            }

Into a more readable:
            boolean setBest = false;
            if (best == null) {
                setBest = true;
            } else if (bestSyncableIsUnknownAndNotARetry == syncableIsUnknownAndNotARetry) {
                if (best.expedited == op.expedited) {
                    if (opRunTime < bestRunTime) {
                        //  if both have same level, earlier time wins
                        setBest = true;
                    }
                } else {
                    if (op.expedited) {
                        setBest = true;
                    }
                }
            } else {
                if (syncableIsUnknownAndNotARetry) {
                    setBest = true;
                }
            }
            if (setBest) {
                best = op;
                bestSyncableIsUnknownAndNotARetry = syncableIsUnknownAndNotARetry;
                bestRunTime = opRunTime;
            }

The refactoring was all done automatically with IntelliJ to avoid human error
in the conversion.

After verifying this code still behaved as expected including the error
condition in the bug, I added handling for the cases when a non-expidited op
may override an expedited op if certain conditions occur, specificaly, if the
expidited op is backed off and the non-expidited op is not.

Finally, refactored to make it testable and added tests and logging.

Bug: 3128963

Change-Id: I131cbcec6073ea5fe425f6b5aa88ca56c02b6598
2010-12-22 14:40:43 -08:00
Vasu Nori
6f35c0ecba fix all flaky tests to make them work consistently.
Change-Id: I688f7e058511089bec7fa21e972e23780604d98a
2010-12-22 14:35:56 -08:00
Dianne Hackborn
20c915d803 am 5261cea2: Merge "Fix issue #3224616: TimeUtils.formatDuration() can drop 0s." into gingerbread
* commit '5261cea2e0cd61801e102114039a19ab449b53fe':
  Fix issue #3224616: TimeUtils.formatDuration() can drop 0s.
2010-12-21 13:33:06 -08:00
Xia Wang
b057c3dbe6 Merge "Few changes for Wi-Fi Stress Test" 2010-12-21 13:13:42 -08:00
Xia Wang
73055f12d7 Few changes for Wi-Fi Stress Test
Add WIFI_IDLE_MS to 1min in Wi-Fi stress test. bug#3284797
Wake up device using PowerManagerService.userActivityWithForce instead
of full wake lock.
Turn screen on when running Wi-Fi tests.

Change-Id: Ib763136cef515eec8b1d25183cf7a84ae1038ef2
2010-12-21 11:31:06 -08:00
Jesse Wilson
bd1c5da28d Remove unused performance tests.
Change-Id: I5a252e314831716f99ce5fbb32d983c7473ee787
2010-12-21 10:23:28 -08:00
Bjorn Bringert
f5f7510486 Fix issue #3224616: TimeUtils.formatDuration() can drop 0s.
Integrated from master.

Change-Id: Ie12dd25cce03c06fafb7df1335266322df43b038
2010-12-20 15:23:02 -08:00
Jesse Wilson
43c0db48d2 Merge "Test that DefaultHttpClient responds gracefully when the server closes a socket. http://b/2612240" 2010-12-17 10:59:30 -08:00