diff --git a/tests/ConnectivityManagerTest/Android.mk b/core/tests/ConnectivityManagerTest/Android.mk similarity index 94% rename from tests/ConnectivityManagerTest/Android.mk rename to core/tests/ConnectivityManagerTest/Android.mk index bd773d0738da1..a1546fa703bb3 100644 --- a/tests/ConnectivityManagerTest/Android.mk +++ b/core/tests/ConnectivityManagerTest/Android.mk @@ -1,4 +1,4 @@ -# Copyright 2010, The Android Open Source Project +# Copyright (C) 2010, The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/ConnectivityManagerTest/AndroidManifest.xml b/core/tests/ConnectivityManagerTest/AndroidManifest.xml similarity index 100% rename from tests/ConnectivityManagerTest/AndroidManifest.xml rename to core/tests/ConnectivityManagerTest/AndroidManifest.xml diff --git a/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java similarity index 95% rename from tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java rename to core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java index 1dffa02348493..badcc1b32669b 100644 --- a/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.android.connectivitymanagertest; import android.app.Activity; diff --git a/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java similarity index 62% rename from tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java rename to core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java index 3affa65308ef3..592be920be3db 100644 --- a/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.android.connectivitymanagertest; import android.os.Bundle; @@ -13,7 +29,7 @@ import junit.framework.TestSuite; * * To run the connectivity manager tests: * - * adb shell am instrument \ + * adb shell am instrument -e ssid \ * -w com.android.connectivitymanagertest/.ConnectivityManagerTestRunner */ @@ -39,5 +55,5 @@ public class ConnectivityManagerTestRunner extends InstrumentationTestRunner { } } - public String TEST_SSID = "GoogleGuest"; + public String TEST_SSID = null; } diff --git a/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/NetworkState.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/NetworkState.java similarity index 91% rename from tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/NetworkState.java rename to core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/NetworkState.java index 925120e52b4b4..2e5a0f865e0b4 100644 --- a/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/NetworkState.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/NetworkState.java @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.android.connectivitymanagertest; import android.net.NetworkInfo.State; diff --git a/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java similarity index 88% rename from tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java rename to core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java index ab81bb81fbaa2..ad564ae8c437e 100644 --- a/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + + package com.android.connectivitymanagertest.functional; import com.android.connectivitymanagertest.ConnectivityManagerTestActivity; @@ -86,7 +104,7 @@ public class ConnectivityManagerMobileTest Log.v(LOG_TAG, "the state for WIFI is changed"); Log.v(LOG_TAG, "reason: " + cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI)); - assertTrue(false); + assertTrue("state validation fail", false); } if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) { Log.v(LOG_TAG, "the state for MOBILE is changed"); @@ -101,6 +119,7 @@ public class ConnectivityManagerMobileTest // Test case 2: test connection to a given AP @LargeTest public void testConnectToWifi() { + assertNotNull("SSID is null", TEST_ACCESS_POINT); //Prepare for connectivity verification NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE, networkInfo.getState(),