From 8aefda97cc937b88b6ec290236e60c55a13f850f Mon Sep 17 00:00:00 2001 From: nebkat Date: Sun, 18 Dec 2011 11:23:09 +0000 Subject: Rename com.android.launcher2 to com.cyanogenmod.trebuchet Change-Id: Iadff7b73615fcb7d09922db29b771393f4d0d6e6 --- tests/stress/Android.mk | 4 +- tests/stress/AndroidManifest.xml | 4 +- .../stress/LauncherRotationStressTest.java | 63 ---------------------- .../stress/LauncherRotationStressTest.java | 63 ++++++++++++++++++++++ 4 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 tests/stress/src/com/android/launcher2/stress/LauncherRotationStressTest.java create mode 100644 tests/stress/src/com/cyanogenmod/trebuchet/stress/LauncherRotationStressTest.java (limited to 'tests') diff --git a/tests/stress/Android.mk b/tests/stress/Android.mk index 68289bd3e..4e7ae616c 100644 --- a/tests/stress/Android.mk +++ b/tests/stress/Android.mk @@ -22,10 +22,10 @@ LOCAL_JAVA_LIBRARIES := android.test.runner LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_PACKAGE_NAME := LauncherRotationStressTest +LOCAL_PACKAGE_NAME := TrebuchetLauncherRotationStressTest LOCAL_CERTIFICATE := shared -LOCAL_INSTRUMENTATION_FOR := Launcher2 +LOCAL_INSTRUMENTATION_FOR := Trebuchet include $(BUILD_PACKAGE) diff --git a/tests/stress/AndroidManifest.xml b/tests/stress/AndroidManifest.xml index 0df3a9da3..a09063fdb 100644 --- a/tests/stress/AndroidManifest.xml +++ b/tests/stress/AndroidManifest.xml @@ -15,7 +15,7 @@ --> + package="com.cyanogenmod.trebuchet.stress.launcherrotation"> @@ -23,7 +23,7 @@ diff --git a/tests/stress/src/com/android/launcher2/stress/LauncherRotationStressTest.java b/tests/stress/src/com/android/launcher2/stress/LauncherRotationStressTest.java deleted file mode 100644 index d21fd53ba..000000000 --- a/tests/stress/src/com/android/launcher2/stress/LauncherRotationStressTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2011 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.launcher2.stress; - - -import com.android.launcher2.Launcher; - -import android.content.pm.ActivityInfo; -import android.os.SystemClock; -import android.test.ActivityInstrumentationTestCase2; -import android.test.RepetitiveTest; -import android.util.Log; - -/** - * Run rotation stress test using Launcher2 for 50 iterations. - */ -public class LauncherRotationStressTest extends ActivityInstrumentationTestCase2 { - - private static final int NUM_ITERATIONS = 50; - private static final int WAIT_TIME_MS = 500; - private static final String LOG_TAG = "LauncherRotationStressTest"; - - public LauncherRotationStressTest() { - super(Launcher.class); - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - - @RepetitiveTest(numIterations=NUM_ITERATIONS) - public void testLauncherRotationStress() throws Exception { - Launcher launcher = getActivity(); - getInstrumentation().waitForIdleSync(); - SystemClock.sleep(WAIT_TIME_MS); - launcher.setRequestedOrientation( - ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); - getInstrumentation().waitForIdleSync(); - SystemClock.sleep(WAIT_TIME_MS); - launcher.setRequestedOrientation( - ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } -} diff --git a/tests/stress/src/com/cyanogenmod/trebuchet/stress/LauncherRotationStressTest.java b/tests/stress/src/com/cyanogenmod/trebuchet/stress/LauncherRotationStressTest.java new file mode 100644 index 000000000..929a3b905 --- /dev/null +++ b/tests/stress/src/com/cyanogenmod/trebuchet/stress/LauncherRotationStressTest.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2011 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.cyanogenmod.trebuchet.stress; + + +import com.cyanogenmod.trebuchet.Launcher; + +import android.content.pm.ActivityInfo; +import android.os.SystemClock; +import android.test.ActivityInstrumentationTestCase2; +import android.test.RepetitiveTest; +import android.util.Log; + +/** + * Run rotation stress test using Launcher2 for 50 iterations. + */ +public class LauncherRotationStressTest extends ActivityInstrumentationTestCase2 { + + private static final int NUM_ITERATIONS = 50; + private static final int WAIT_TIME_MS = 500; + private static final String LOG_TAG = "LauncherRotationStressTest"; + + public LauncherRotationStressTest() { + super(Launcher.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + @RepetitiveTest(numIterations=NUM_ITERATIONS) + public void testLauncherRotationStress() throws Exception { + Launcher launcher = getActivity(); + getInstrumentation().waitForIdleSync(); + SystemClock.sleep(WAIT_TIME_MS); + launcher.setRequestedOrientation( + ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + getInstrumentation().waitForIdleSync(); + SystemClock.sleep(WAIT_TIME_MS); + launcher.setRequestedOrientation( + ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); + } +} -- cgit v1.2.3