Commit Graph

23 Commits

Author SHA1 Message Date
Chalard Jean
21793bad18 Add a first NetworkAgent CTS test
This is a basic test that only tests register(), markConnected(),
unregister and onNetworkUnwanted. It provides the backbone for
the tests, a harness to test callbacks on NetworkAgent, and
demonstrates how the instrumentation in
ConnectivityService can be used to test this API.

Test: this
Bug: 139268426
Change-Id: I022c9e237fdaec27338047c171c04e5a96cf89e3
2020-04-03 07:33:23 +09:00
Tomasz Wasilczyk
66fe5244ad Fix testNetworkSettingsPermission for headless User 0
This test fails on devices with headless user 0 when it tries to
verify apps with android:sharedUserId="android.uid.system" (and without
explicit ask for NETWORK_SETTINGS). Such apps get this permission
by default, but when running on user 1 they get UID 1001000, what doesn't
match SYSTEM_UID=1000.

By the chance of modifying this code, let's also add more verbose error
message (with UID), simplify it and reduce indentation count.

Bug: 120143468
Test: atest android.net.wifi.cts.WifiManagerTest#testNetworkSettingsPermission
Change-Id: Ifc09320cf738a518003126fad1ce31f5e38a3aff
2019-05-31 15:21:17 -07:00
paulhu
78e4a184a1 Enable instant app mode for CtsNetTestCases
1. Indicating CtsNetTestCases support instant app mode but
   ignore some tests that cannot run in instant app mode.
2. Move some tests which need to test on API 23 into
   CtsNetApi23TestCases module due to instant app package
   must target at least API 26.

Bug: 123366918
Test: atest CtsNetTestCases --instant
Test: atest CtsNetApi23TestCases
Test: atest FrameworksNetTests

Change-Id: I4e828cbc48143e36c1be38b91c3c698122d4be5a
2019-05-16 16:07:07 +08:00
Ahmed ElArabawy
e451659573 Wifi: Add CTS test for WifiManager.MulticastLock
This commit adds the CTS tests for the class WifiManager.MulticastLock

Bug: 124017617
Test: atest android.net.wifi.cts
Change-Id: I6e7a6e70f350dcd23fe541ef746770e3561d49e6
2019-03-14 14:25:43 -07:00
Brett Chabot
c626be0dc7 Migrate cts/tests/tests/net to androidx.test
See go/jetpack-test-android-migration

This is the internal version of aosp/915793

Exempt-From-Owner-Approval: already reviewed in aosp
Test: m -j CtsNetTestCases
Change-Id: If102677e4cdc4361b5d93283c4d6140dc477a94a
2019-03-02 00:05:04 +00:00
David Su
823149f58f Grant CTS test APK ACCESS_BACKGROUND_LOCATION permission
Fixed broken CTS tests due to missing permissions.

Bug: 123622071
Test: cts-tradefed, run cts -m CtsNetTestCases
Change-Id: I6ddd2afbae6f685c018fd53d988e543ddbcfec04
2019-02-06 11:42:55 -08:00
Etan Cohen
439c05ce8b [RTT] CTS for the public Wi-Fi RTT APIs
Baseline set of tests for the public Wi-Fi RTT API.

Note: some of these tests require an IEEE 802.11mc capable AP.

Bug: 63446747
Test: tests pass
Change-Id: I176d9adbef15ce1c33b4572d5eb7e6cdf672f021
2018-03-13 07:55:16 -07:00
Chad Brubaker
2a880aee40 Add CTS tests for cleartext traffic default change
Cleartext traffic permitted now defaults to False for apps targetting P,
this test splits the previous cleartext test into pre-P and P+ targetSDK
versions.

Tests which depended on cleartext traffic have been opted in to
cleartext traffic.

Test: This is the test
Bug: 63931636
Change-Id: I5c4aa39e4055380a54bfe09f668894240be713f8
2017-10-24 09:06:38 -07:00
Dianne Hackborn
d5dc8fe740 Test for issue #28156248: Receiving connectivity receiver...
...broadcasts in Android N

New test to verify that modern apps can't receive CONNECTIVITY_CHANGE.

Change-Id: I9c5b6e99d14b782b3857460d8297f6a405545d87
2016-04-13 18:05:50 -07:00
Kevin Ma
f1b8dcd75b Merge "Add Airplane mode test." into cw-e-dev am: c7e43bddd3
am: 1525e170ea

* commit '1525e170eabb306f6c193d40570a9f99ccf337c4':
  Add Airplane mode test.
2016-03-14 22:18:09 +00:00
Kevin Ma
744f5e2688 Add Airplane mode test.
Change-Id: If3bfa92828cdc878b2f994beafc41faba7398feb
2016-03-14 15:05:37 -07:00
Nash Lincoln
de95223f87 migrate net tests to cts_v2
bug:21762834
Change-Id: Ic86dee963720c1412a42ec231c81c97d7f322420
2015-09-17 13:46:25 -07:00
Fyodor Kupolov
e57e9bcb96 Fix for ScanResultTest and WifiManagerTest
Added ACCESS_COARSE_LOCATION permission - it is now required to receive Wi-Fi
scan results(b/21852542).

Bug: 22790182
Change-Id: Idb72c200b08f7e4e95571504ab42c9e706f5c921
2015-07-29 11:24:34 -07:00
Narayan Kamath
505728b35a Add explicit dependencies on org.apache.http.legacy
Test modules that depend on the CTS testserver must declare
explicit dependencies on org.apache.http.legacy.

Also fix some bizarre build rules; ctstestserver builds directly
against the framework but compiled into apps that target SDK 16.

bug: 18027885

Change-Id: I905942d8ed71812499df94e3e5970c0b08716528
2015-02-06 13:56:30 +00:00
Brett Chabot
cf8d741f3d Move to android.support.test as CTS instrumentation runner.
Also do the following related cleanup
- Remove references to deprecated BrokenTest and KnownFailure
- Switch CTS tests to build against SDK and not private
android.test.runner where possible

Bug: 12924356

Change-Id: If6151b836456eec4838f8d7d6e11c9834c007fca
2014-03-11 17:54:45 -07:00
Keun young Park
30199405c3 change testRunner to CtsTestRunner
- unlock keyguard by default

Change-Id: I0452a72cfa54edfa79b485894ffd0493a71122ee
2012-07-12 12:57:30 -07:00
Chia-chi Yeh
6bda9056ef Add CTS test for android.net.rtp.
Bug: 5975113
Change-Id: I20ec3b172a2d6501048418f4c3da06d1b7144fd3
2012-03-30 14:20:25 -07:00
Chia-chi Yeh
4231515a1b Free net.cts from cts.stub.
Explicitly include CtsTestServer in Android.mk to eliminate the
dependency to cts.stub. This allows net.cts to instrument itself,
and it also allows network-specific JNI code to be added in the
same package.

Change-Id: I624f87e0112619c5b97f2c3589933f666665fa8e
2012-02-28 14:58:23 -08:00
Brett Chabot
e7a02b243e Revert "Change cts tests to use InstrumentationTestRunner."
This reverts commit 665f512ebc.
2009-05-19 18:08:05 -07:00
Brett Chabot
665f512ebc Change cts tests to use InstrumentationTestRunner. 2009-05-14 15:55:21 -07:00
Phil Dubach
e480582d82 AI 148455: CTS: Change tests in Android plan to use new InstrumentationCtsTestRunner
BUG=1537738

Automated import of CL 148455
2009-05-07 10:34:41 -07:00
Scott Su
0f009ffc55 AI 147986: Change CTS tests to use InstrumentationCoreTestRunner, which has handled the @BrokenTest
Automated import of CL 147986
2009-04-29 03:12:14 -07:00
The Android Open Source Project
8aa1b8f449 auto import from //branches/cupcake_rel/...@138607 2009-03-15 16:47:16 -07:00