The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
Basavapatna Dattaguru | 86e9e9b | 2011-02-10 21:52:56 -0800 | [diff] [blame] | 2 | * Copyright (C) 2011 The Android Open Source Project |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.mediaframeworktest; |
| 18 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 19 | import com.android.mediaframeworktest.functional.CameraTest; |
The Android Open Source Project | 1059253 | 2009-03-18 17:39:46 -0700 | [diff] [blame] | 20 | import com.android.mediaframeworktest.functional.MediaMetadataTest; |
| 21 | import com.android.mediaframeworktest.functional.MediaMimeTest; |
Nicolas Catania | 8f5fcab | 2009-07-13 14:37:49 -0700 | [diff] [blame] | 22 | import com.android.mediaframeworktest.functional.MediaPlayerInvokeTest; |
Xia Wang | db60285 | 2011-09-27 16:00:20 -0700 | [diff] [blame] | 23 | import com.android.mediaframeworktest.functional.mediaplayback.MediaPlayerApiTest; |
| 24 | import com.android.mediaframeworktest.functional.mediarecorder.MediaRecorderTest; |
| 25 | import com.android.mediaframeworktest.functional.audio.SimTonesTest; |
| 26 | import com.android.mediaframeworktest.functional.audio.MediaAudioTrackTest; |
| 27 | import com.android.mediaframeworktest.functional.audio.MediaAudioManagerTest; |
| 28 | import com.android.mediaframeworktest.functional.audio.MediaAudioEffectTest; |
| 29 | import com.android.mediaframeworktest.functional.audio.MediaBassBoostTest; |
| 30 | import com.android.mediaframeworktest.functional.audio.MediaEnvReverbTest; |
| 31 | import com.android.mediaframeworktest.functional.audio.MediaEqualizerTest; |
| 32 | import com.android.mediaframeworktest.functional.audio.MediaPresetReverbTest; |
| 33 | import com.android.mediaframeworktest.functional.audio.MediaVirtualizerTest; |
| 34 | import com.android.mediaframeworktest.functional.audio.MediaVisualizerTest; |
| 35 | import com.android.mediaframeworktest.functional.videoeditor.MediaItemThumbnailTest; |
| 36 | import com.android.mediaframeworktest.functional.videoeditor.MediaPropertiesTest; |
| 37 | import com.android.mediaframeworktest.functional.videoeditor.VideoEditorAPITest; |
| 38 | import com.android.mediaframeworktest.functional.videoeditor.VideoEditorExportTest; |
| 39 | import com.android.mediaframeworktest.functional.videoeditor.VideoEditorPreviewTest; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 40 | import junit.framework.TestSuite; |
| 41 | |
Yu Shan Emily Lau | 99b4523 | 2011-11-23 19:02:01 -0800 | [diff] [blame] | 42 | import android.os.Bundle; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 43 | import android.test.InstrumentationTestRunner; |
| 44 | import android.test.InstrumentationTestSuite; |
| 45 | |
| 46 | |
| 47 | /** |
| 48 | * Instrumentation Test Runner for all MediaPlayer tests. |
Nicolas Catania | 8f5fcab | 2009-07-13 14:37:49 -0700 | [diff] [blame] | 49 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 50 | * Running all tests: |
| 51 | * |
| 52 | * adb shell am instrument \ |
| 53 | * -w com.android.smstests.MediaPlayerInstrumentationTestRunner |
| 54 | */ |
| 55 | |
| 56 | public class MediaFrameworkTestRunner extends InstrumentationTestRunner { |
| 57 | |
Yu Shan Emily Lau | 99b4523 | 2011-11-23 19:02:01 -0800 | [diff] [blame] | 58 | public static int mMinCameraFps = 0; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 59 | |
| 60 | @Override |
| 61 | public TestSuite getAllTests() { |
| 62 | TestSuite suite = new InstrumentationTestSuite(this); |
| 63 | suite.addTestSuite(MediaPlayerApiTest.class); |
| 64 | suite.addTestSuite(SimTonesTest.class); |
| 65 | suite.addTestSuite(MediaMetadataTest.class); |
| 66 | suite.addTestSuite(CameraTest.class); |
| 67 | suite.addTestSuite(MediaRecorderTest.class); |
The Android Open Source Project | 4df2423 | 2009-03-05 14:34:35 -0800 | [diff] [blame] | 68 | suite.addTestSuite(MediaAudioTrackTest.class); |
The Android Open Source Project | 1059253 | 2009-03-18 17:39:46 -0700 | [diff] [blame] | 69 | suite.addTestSuite(MediaMimeTest.class); |
Nicolas Catania | 8f5fcab | 2009-07-13 14:37:49 -0700 | [diff] [blame] | 70 | suite.addTestSuite(MediaPlayerInvokeTest.class); |
Yu Shan Emily Lau | e11bafe | 2010-04-01 16:10:23 -0700 | [diff] [blame] | 71 | suite.addTestSuite(MediaAudioManagerTest.class); |
Eric Laurent | 441ec6b | 2010-07-28 01:20:13 -0700 | [diff] [blame] | 72 | suite.addTestSuite(MediaAudioEffectTest.class); |
| 73 | suite.addTestSuite(MediaBassBoostTest.class); |
Eric Laurent | 391e2d0 | 2010-08-24 09:56:45 -0700 | [diff] [blame] | 74 | suite.addTestSuite(MediaEnvReverbTest.class); |
Eric Laurent | 441ec6b | 2010-07-28 01:20:13 -0700 | [diff] [blame] | 75 | suite.addTestSuite(MediaEqualizerTest.class); |
Eric Laurent | 391e2d0 | 2010-08-24 09:56:45 -0700 | [diff] [blame] | 76 | suite.addTestSuite(MediaPresetReverbTest.class); |
Eric Laurent | 441ec6b | 2010-07-28 01:20:13 -0700 | [diff] [blame] | 77 | suite.addTestSuite(MediaVirtualizerTest.class); |
| 78 | suite.addTestSuite(MediaVisualizerTest.class); |
Basavapatna Dattaguru | 86e9e9b | 2011-02-10 21:52:56 -0800 | [diff] [blame] | 79 | /*Test for Video Editor*/ |
Basavapatna Dattaguru | c0171d3 | 2011-02-13 13:26:46 -0800 | [diff] [blame] | 80 | suite.addTestSuite(MediaItemThumbnailTest.class); |
| 81 | suite.addTestSuite(MediaPropertiesTest.class); |
Basavapatna Dattaguru | 86e9e9b | 2011-02-10 21:52:56 -0800 | [diff] [blame] | 82 | suite.addTestSuite(VideoEditorAPITest.class); |
Basavapatna Dattaguru | c0171d3 | 2011-02-13 13:26:46 -0800 | [diff] [blame] | 83 | suite.addTestSuite(VideoEditorExportTest.class); |
Basavapatna Dattaguru | 0554f32 | 2011-02-13 20:28:38 -0800 | [diff] [blame] | 84 | suite.addTestSuite(VideoEditorPreviewTest.class); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 85 | return suite; |
| 86 | } |
| 87 | |
| 88 | @Override |
| 89 | public ClassLoader getLoader() { |
| 90 | return MediaFrameworkTestRunner.class.getClassLoader(); |
| 91 | } |
Yu Shan Emily Lau | 99b4523 | 2011-11-23 19:02:01 -0800 | [diff] [blame] | 92 | |
| 93 | @Override |
| 94 | public void onCreate(Bundle icicle) { |
| 95 | super.onCreate(icicle); |
| 96 | |
| 97 | String minCameraFps = (String) icicle.get("min_camera_fps"); |
| 98 | System.out.print("min_camera_" + minCameraFps); |
| 99 | |
| 100 | if (minCameraFps != null ) { |
| 101 | mMinCameraFps = Integer.parseInt(minCameraFps); |
| 102 | } |
| 103 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 104 | } |