565 Commits

Author SHA1 Message Date
Daisuke Miyakawa
f2ad61c83d Make vCard exporter check invalid phone numbers and re-format them if needed.
Also add a unit test for the case.

Internal issue number: 2246410
2009-11-10 09:29:04 +09:00
Derek Sollenberger
9e28c4ce66 Allow plugins to load java classes from their apk.
Provide the functions to be called from native code that take
the plugin's location and desired class name and then load that
class from the plugin's apk if it is available.

see http://b/2215696
2009-11-09 14:45:58 -05:00
Daisuke Miyakawa
0e983864fc Support vCard format emitted by Windows Mobile 6.5, which contains invalid "VALUE" params and
"AGENT" line.

Internal Issue number: 2247192
2009-11-09 15:34:55 +09:00
jsh
91abf10520 am b90a187d: Merge change Ie994c0e8 into eclair
Merge commit 'b90a187d2cbbedcec87b479c9df7fd45804ad595' into eclair-mr2

* commit 'b90a187d2cbbedcec87b479c9df7fd45804ad595':
  Update CdmaSmsTest unit test.
2009-11-06 13:23:15 -08:00
jsh
1e1c24bed2 Update CdmaSmsTest unit test.
Forgot to do this with previous check in.  Now that calculateLength() has
been fixed to match the actual encoding (ie, doesn't support single-segment
EMS), test case needs to be updated.

Fixes b/2244483
2009-11-06 11:55:19 -08:00
Joe Onorato
c92196f693 am c3f3f9a9: Merge change Ie71d9e42 into eclair
Merge commit 'c3f3f9a90b7d7f8a9665df9c194cff81d0d1782c' into eclair-mr2

* commit 'c3f3f9a90b7d7f8a9665df9c194cff81d0d1782c':
  Another test for StatusBar test.
2009-11-05 20:28:10 -08:00
Android (Google) Code Review
c3f3f9a90b Merge change Ie71d9e42 into eclair
* changes:
  Another test for StatusBar test.
2009-11-05 22:20:02 -05:00
Guang Zhu
1c7be08f6b am bfa68abc: layout test rebase, bug fix
Merge commit 'bfa68abc955ed1fe6cf6d98e42f344a8d623fab7' into eclair-mr2

* commit 'bfa68abc955ed1fe6cf6d98e42f344a8d623fab7':
  layout test rebase, bug fix
2009-11-05 15:47:32 -08:00
Guang Zhu
bfa68abc95 layout test rebase, bug fix
* rebase layout test based on newly enabled http tests
* fix a bug in initializing parameters (should happen before super.onCreate)
2009-11-05 15:28:15 -08:00
Joe Onorato
e71d9e421d Another test for StatusBar test. 2009-11-05 17:12:18 -05:00
Daisuke Miyakawa
4fe2c57c3c Add tests for Japanization part of vCard.
Fix several bugs around name construction.

Internal issue number: 2195990
2009-11-05 13:47:48 +09:00
Daisuke Miyakawa
26ee0ae9de Make vCard importer handle "PAGER" phone number correctly.
Add tests for it.

Internal issue number: 2239492
2009-11-05 09:44:42 +09:00
Brett Chabot
8742696b0d am c20fc77c: Merge change Iefd4a388 into eclair
Merge commit 'c20fc77c5a2bb8483f2e6e8b4064853804502365' into eclair-mr2

* commit 'c20fc77c5a2bb8483f2e6e8b4064853804502365':
  Suppress flaky test AppCacheTest#testFreeApplicationCacheSomeFiles
2009-11-04 12:05:45 -08:00
Android (Google) Code Review
c20fc77c5a Merge change Iefd4a388 into eclair
* changes:
  Suppress flaky test AppCacheTest#testFreeApplicationCacheSomeFiles
2009-11-04 14:56:14 -05:00
Daisuke Miyakawa
f035b47774 Make test compontent support multiple vCard input.
Internal issue number: 2195990
2009-11-04 21:51:54 +09:00
Daisuke Miyakawa
9db07dd6b5 Make ContentValuesBuilder a separate file.
Internal issue number: 2195990
2009-11-04 09:10:31 +09:00
Daisuke Miyakawa
ed2d7c42fc Introduce ContentValuesBuilder and make tests easier to read.
Internal Issue number: 2195990
2009-11-04 08:35:41 +09:00
Daisuke Miyakawa
66da163d41 Move some useful logic to VCardTestsBase.java
Internal issue number: 2195990
2009-11-03 16:53:58 +09:00
Daisuke Miyakawa
3f16be2061 Enable vCard tests connect both importer/exporter tests.
Fix a bug in ContactStruct.

Internal issue number: 2195990
2009-11-02 15:25:23 +09:00
Brett Chabot
efd4a388d6 Suppress flaky test AppCacheTest#testFreeApplicationCacheSomeFiles
Bug 1840944
2009-10-30 17:45:09 -07:00
Jack Wang
227ba2072d am e8228afb: Merge change I92cdc5ed into eclair
Merge commit 'e8228afb2bd005ae25ce58719f9d678389b26a16' into eclair-mr2

* commit 'e8228afb2bd005ae25ce58719f9d678389b26a16':
  PerformanceCollector: Collect & report perf measurements in key/value form
2009-10-30 17:07:56 -07:00
Android (Google) Code Review
e8228afb2b Merge change I92cdc5ed into eclair
* changes:
  PerformanceCollector: Collect & report perf measurements in key/value form
2009-10-30 20:02:13 -04:00
Guang Zhu
0b12dc3aca am aebcaec3: Merge change I2e90d640 into eclair
Merge commit 'aebcaec3c171f636a24051ce85ded2f86b09461b' into eclair-mr2

* commit 'aebcaec3c171f636a24051ce85ded2f86b09461b':
  Remove the activity restart between urls.
2009-10-29 01:23:33 -07:00
Daisuke Miyakawa
f5633bc7e2 Fix test breakage in testNickNameV21().
Internal issue number: 2079082
2009-10-29 12:24:26 +09:00
Android (Google) Code Review
3c828e24a9 Merge change I9195a354 into eclair-mr2
* changes:
  Add partial support of Android-specific properties.
2009-10-28 21:54:29 -04:00
Daisuke Miyakawa
837cba33c5 Add partial support of Android-specific properties.
In the near future, all the values which cannot be converted to
vCard property is expressed as "X-ANDROID-CUSTOM" property + MIME_TYPE.

Example (Nick name):
X-ANDROID-CUSTOM:vnd.android.cursor.item/nickname;Nicky;;;;;;;;;;;;;

All the data are stored ordered by its column name ("data1" - "data15").
Currently the code assumes the max num is 15.

Internal Issue number: 2079082
2009-10-29 09:16:31 +09:00
Dan Egnor
952402704a Instead of a raw AIDL interface, give DropBox a Java
interface (android.os.DropBox); move the Binder interface
behind the scenes.  Make DropBoxEntry into DropBox.Entry.
Make it possible to get a dropbox from an (Application)Context
with the usual getSystemService(DROPBOX_SERVICE) type thing.
Update the tests accordingly.
2009-10-28 15:49:11 -07:00
Jack Wang
075997f12e PerformanceCollector: Collect & report perf measurements in key/value form
- Added new functions to PerformanceCollector and PerformanceResultsWriter
- Modified unit tests to test new functionality and fix flakiness reported in
  2218327 and 2118268
- Added PerformanceCollectorTest to small suite
2009-10-28 14:32:05 -07:00
Brett Chabot
622b190c87 am b81df8e3: Merge change I5535bbdf into eclair
Merge commit 'b81df8e3a2f72546508fcdf92adc39cfa2985c56' into eclair-mr2

* commit 'b81df8e3a2f72546508fcdf92adc39cfa2985c56':
  Disable flaky and failing tests.
2009-10-28 11:37:42 -07:00
Guang Zhu
2e90d6404a Remove the activity restart between urls. 2009-10-27 15:21:51 -07:00
Daisuke Miyakawa
bb88e3ad56 Move verification code to VCardTestsBase.
Internal Issue number: 2195990, 2079082
2009-10-27 12:52:23 +09:00
Brett Chabot
5535bbdfc8 Disable flaky and failing tests.
Bugs 2118268, 2176089
2009-10-26 17:44:38 -07:00
Daisuke Miyakawa
d263a064f7 Add a test for vCard composer.
Also modify the behavior of vCard composer so that it honer FN than N toward
DISPLAY_NAME.

Internal issuen number: 2195990
2009-10-27 08:10:35 +09:00
Wei Huang
fd7b4f1d12 bug #2180646: make comparing "404-04" and "40404" return true in PhoneNumberUtils.compare().
- when comparing two numbers whose dialable char length is less than the MIN_MATCH (7), treat them as equal if the dialable portion of the numbers match.
- update unit test.
2009-10-23 01:17:17 -07:00
Brett Chabot
5f2ae667e8 am 76bb9a36: Merge change I1932e8f8 into eclair
Merge commit '76bb9a363633b5741937ebe58b01a8b2024753b0' into eclair-mr2

* commit '76bb9a363633b5741937ebe58b01a8b2024753b0':
  Disable com.android.unit_tests.HeapTest:testExternalOomeLarge.
2009-10-21 22:21:40 -07:00
Daisuke Miyakawa
54616f3435 Make MockCursor class a part of public SDK.
With this class, external developers will be able to reduce their
redundant work related to testing around ContentProvider/ContentResolver.

Internal Issue number: 2181010
2009-10-22 07:25:02 +09:00
Android (Google) Code Review
8785c064fa Merge change Ie5df08ef into eclair-mr2
* changes:
  Let PLUS occur once anywhere in dial-str network portion.
2009-10-21 03:27:14 -04:00
Tammo Spalink
9e53415326 Let PLUS occur once anywhere in dial-str network portion.
Create a new extractNetworkPortion() function, since the old one is
public, that does effectively the same thing but is more flexible as
just mentioned.

Addresses issue:
http://buganizer/issue?id=2013998

Change-Id: Ie5df08ef9c871881e8728a44abf0385908000823
2009-10-21 10:30:58 +08:00
Brett Chabot
efc6bef141 Disable known failure math tanhd tests (DO NOT MERGE)
BUG 2139334
2009-10-20 14:12:59 -07:00
Android (Google) Code Review
2a2805b7fb Merge change Ib3b06fc3 into eclair-mr2
* changes:
  It turns out to be useful to allow enumeration on a per-tag basis, and it's easy to support based on the data structures we have, so add a tag parameter to getNextEvent().
2009-10-20 16:23:01 -04:00
Dan Egnor
b3b06fc39b It turns out to be useful to allow enumeration on a per-tag basis,
and it's easy to support based on the data structures we have, so
add a tag parameter to getNextEvent().
2009-10-20 13:05:17 -07:00
Brett Chabot
1932e8f811 Disable com.android.unit_tests.HeapTest:testExternalOomeLarge.
BUG 2170975
2009-10-19 17:34:33 -07:00
Guang Zhu
d1a720d06f am 9e58e642: Enable some tests that requires local http server
Merge commit '9e58e6427c8e5fefb65432ea4b56c6cb31e80bbd' into eclair-mr2

* commit '9e58e6427c8e5fefb65432ea4b56c6cb31e80bbd':
  Enable some tests that requires local http server
2009-10-15 11:59:05 -07:00
Guang Zhu
9e58e6427c Enable some tests that requires local http server 2009-10-15 11:01:30 -07:00
Daisuke Miyakawa
99a0a2cd73 Add tests and fix vCard code.
Now, basic tests are almost ready.

TODO:
- importer test toward multiple vCard input (though it was tested with real usage)
- exporter tests for multiple composition
- tests with non-Ascii
- tests with special types like TYPE_DOCOMO

ISSUE:
In order to fully check the validity of exporter, we may have to develop
some vCard importer which rejects vCard which is valid but a kind of dubious.

Internal Issue Number: 2160039
2009-10-14 16:07:40 -07:00
Dan Egnor
4410ec8f7c Framework-side DropBox service that maintains a size-bounded
queue of data chunks (sort of a blob-oriented logcat).

In the future, this will be coupled with a revised checkin service that
would actually upload this data.
2009-10-13 17:36:19 -07:00
Daisuke Miyakawa
221bc127c4 Add a new TestSuites: VCardTests
Now, the following command is available.
adb shell am instrument -w -e class com.android.unit_tests.vcard.VCardTests com.android.unit_tests/android.test.InstrumentationTestRunner

Internal Issuer number: 2160039
2009-10-12 14:43:30 -07:00
Daisuke Miyakawa
ba2b21bee8 Implement unit tests for vCard exporter, which depends on the sucess in vCard importer.
In order to share the logic between tests for importer and those for exporter,
PropertyNodesVerifier is now a separated class and drastically modified.
Now the class accept "unordered" expected PropertyNode objects, which allows vCard
composer to not care the exact order of each elements.

MockCursor is added, which may be added into the public API in the future, but in
the test directory for now.
Another MockContentProvider is (temporarily) developed so that it can be accepted by
MockContentResolver#addProvider(), which does not allow IContentProvider and its
descendants but only exact ContentProvider, while the original MockContentProvider in
android.test.mock.MockContentProvider implements IContentProvider.

The test development is still on-going, but this test suffices minimal requirement of
vCard tests.

Internal issue number: 2160039
2009-10-12 13:42:42 -07:00
Daisuke Miyakawa
3f15538a32 Rename VCardTest.java to VCardImportTest.java.
Internal issue number: 2160039
2009-10-09 09:43:57 -07:00
Daisuke Miyakawa
5c3e687965 Develop ContentResolver-based unit tests for vCard importer and fix vCard code
along with the tests

Make test code not only check the validity of VCardParser but also check
the validity of the data insertion part of ContactStruct class, using
MockContentResolver/MockContentProvider. With these tests, we are now really sure
vCard side appropriately sends vCard data into the resolver.

Fix ContactStruct so that it properly handles ORG property and TITLE property,
though it still does not see Group information. There's no vCard found which
uses Group and ORG and TITLE in convolted orders...

e.g. Current implementation misinterprets the following case, but we're not sure
whether any exporter emits data in this kind of complicated form...
group2.ORG:ComparyA
group1.ORG:CompanyB
group1.TITLE:TitleForA
group2.TITLE:TitleForB

Expected: CompanyA + TitleForA, CompanyB + TitleForB
Actual: CompanyA + TitleForB, CompanyB + TitleForA

Also change the parser part a little, so that some component can be reused via
the other part of vCard code.

Added several additional files for the tests, which ensures that
- ORG/TITLE properties are handled as we expect.
- PREF is appropriately handled and passed to the resolver as "IS_PRIMARY" flag.
-- We discarded the code which ensures that "IS_PRIMARY" is added to only one
   field in each type, after the local discussion (the duplication or no primary
   state should be handled by the resolver).

Internal Issue number: 2160039
2009-10-08 19:33:33 -07:00