Home
last modified time | relevance | path

Searched refs:Utils (Results 1 – 25 of 85) sorted by relevance

1234

/cts/tests/tests/voiceinteraction/testapp/src/android/voiceinteraction/testapp/
DTestApp.java38 import android.voiceinteraction.common.Utils;
46 Utils.TestCaseType mTestInProgress;
63 if (mIndex == Utils.TestCaseType.values().length) { in continueTests()
70 mTestInProgress = (Utils.TestCaseType.values())[mIndex++]; in continueTests()
99 String[] commands = {Utils.TEST_COMMAND}; in continueTests()
103 addTestResult(Utils.SUPPORTS_COMMANDS_SUCCESS); in continueTests()
105 addTestResult(Utils.TEST_ERROR + " supported commands failure!"); in continueTests()
114 mTestinfo.putStringArrayList(Utils.TESTINFO, new ArrayList<String>()); in testSetup()
115 mTestinfo.putString(Utils.TESTCASE_TYPE, mTestInProgress.toString()); in testSetup()
119 ArrayList<String> info = mTestinfo.getStringArrayList(Utils.TESTINFO); in saveTestResults()
[all …]
/cts/tests/tests/voiceinteraction/service/src/android/voiceinteraction/service/
DMainInteractionSession.java29 import android.voiceinteraction.common.Utils;
72 || !Utils.PRIVATE_OPTIONS_VALUE.equals( in onShow()
73 args.getString(Utils.PRIVATE_OPTIONS_KEY))) { in onShow()
81 if (str.equals(Utils.TEST_PROMPT)) { in assertPromptFromTestApp()
84 Utils.addErrorResult(extras, "Invalid prompt received: " + str); in assertPromptFromTestApp()
99 results[idx] = Utils.TEST_COMMAND.equals(commands[idx]); in onGetSupportedCommands()
110 ", extras=" + Utils.toBundleString(extras)); in onRequestConfirmation()
116 asyncTaskArg.setTestType(Utils.TestCaseType.CONFIRMATION_REQUEST_CANCEL_TEST)); in onRequestConfirmation()
119 Utils.toBundleString(extras)); in onRequestConfirmation()
121 asyncTaskArg.setTestType(Utils.TestCaseType.CONFIRMATION_REQUEST_TEST)); in onRequestConfirmation()
[all …]
/cts/tests/tests/assist/src/android/assist/cts/
DFocusChangeTest.java20 import android.assist.common.Utils;
38 private static final String TEST_CASE_TYPE = Utils.FOCUS_CHANGE;
67 filter.addAction(Utils.GAINED_FOCUS); in setUpAndRegisterReceiver()
68 filter.addAction(Utils.LOST_FOCUS); in setUpAndRegisterReceiver()
69 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
75 if (!mHasGainedFocusLatch.await(Utils.TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitToGainFocus()
76 fail("Activity failed to gain focus in " + Utils.TIMEOUT_MS + "msec."); in waitToGainFocus()
82 if (!mHasLostFocusLatch.await(Utils.TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitToLoseFocus()
84 + Utils.TIMEOUT_MS + "msec."); in waitToLoseFocus()
93 mTestActivity.startTest(Utils.FOCUS_CHANGE); in testLayerCausesUnderlyingActivityToLoseFocus()
[all …]
DTextViewTest.java19 import android.assist.common.Utils;
37 private static final String TEST_CASE_TYPE = Utils.TEXTVIEW;
69 filter.addAction(Utils.APP_3P_HASRESUMED); in setUpAndRegisterReceiver()
70 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
76 if (!mHasResumedLatch.await(Utils.ACTIVITY_ONRESUME_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitForOnResume()
77 fail("Activity failed to resume in " + Utils.ACTIVITY_ONRESUME_TIMEOUT_MS + "msec"); in waitForOnResume()
97 verifyAssistStructure(Utils.getTestAppComponent(TEST_CASE_TYPE), in testTextView()
105 verifyAssistStructure(Utils.getTestAppComponent(TEST_CASE_TYPE), false); in testTextView()
111 verifyAssistStructure(Utils.getTestAppComponent(TEST_CASE_TYPE), false); in testTextView()
117 verifyAssistStructure(Utils.getTestAppComponent(TEST_CASE_TYPE), false); in testTextView()
[all …]
DWebViewTest.java19 import android.assist.common.Utils;
38 private static final String TEST_CASE_TYPE = Utils.WEBVIEW;
72 filter.addAction(Utils.APP_3P_HASRESUMED); in setUpAndRegisterReceiver()
73 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
74 filter.addAction(Utils.TEST_ACTIVITY_LOADED); in setUpAndRegisterReceiver()
80 if (!mHasResumedLatch.await(Utils.ACTIVITY_ONRESUME_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitForOnResume()
81 fail("Activity failed to resume in " + Utils.ACTIVITY_ONRESUME_TIMEOUT_MS + "msec"); in waitForOnResume()
87 if (!mTestWebViewLatch.await(Utils.ACTIVITY_ONRESUME_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitForTestActivity()
108 verifyAssistStructure(Utils.getTestAppComponent(TEST_CASE_TYPE), in testWebView()
116 if (action.equals(Utils.APP_3P_HASRESUMED) && mHasResumedLatch != null) { in onReceive()
[all …]
DAssistantContentViewTest.java20 import android.assist.common.Utils;
54 startTestActivity(Utils.VERIFY_CONTENT_VIEW); in setUp()
72 filter.addAction(Utils.BROADCAST_CONTENT_VIEW_HEIGHT); in setUpAndRegisterReceiver()
73 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
80 if (!mContentViewLatch.await(Utils.TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitForContentView()
81 fail("failed to receive content view in " + Utils.TIMEOUT_MS + "msec"); in waitForContentView()
90 mTestActivity.startTest(Utils.VERIFY_CONTENT_VIEW); in testAssistantContentViewDimens()
94 int height = mIntent.getIntExtra(Utils.EXTRA_CONTENT_VIEW_HEIGHT, 0); in testAssistantContentViewDimens()
95 int width = mIntent.getIntExtra(Utils.EXTRA_CONTENT_VIEW_WIDTH, 0); in testAssistantContentViewDimens()
96 Point displayPoint = (Point) mIntent.getParcelableExtra(Utils.EXTRA_DISPLAY_POINT); in testAssistantContentViewDimens()
[all …]
DLifecycleTest.java20 import android.assist.common.Utils;
44 private static final String action_hasResumed = Utils.LIFECYCLE_HASRESUMED;
45 private static final String action_onPause = Utils.LIFECYCLE_ONPAUSE;
46 private static final String action_onStop = Utils.LIFECYCLE_ONSTOP;
47 private static final String action_onDestroy = Utils.LIFECYCLE_ONDESTROY;
49 private static final String TEST_CASE_TYPE = Utils.LIFECYCLE;
82 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
89 if (!mHasResumedLatch.await(Utils.ACTIVITY_ONRESUME_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitForOnResume()
90 fail("Activity failed to resume in " + Utils.ACTIVITY_ONRESUME_TIMEOUT_MS + "msec"); in waitForOnResume()
95 if (mActivityLifecycleLatch.await(Utils.TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitAndSeeIfLifecycleMethodsAreTriggered()
[all …]
DExtraAssistDataTest.java18 import android.assist.common.Utils;
31 private static final String TEST_CASE_TYPE = Utils.EXTRA_ASSIST;
63 filter.addAction(Utils.APP_3P_HASRESUMED); in setUpAndRegisterReceiver()
64 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
81 Log.i(TAG, "assist bundle is: " + Utils.toBundleString(mAssistBundle)); in testAssistContentAndAssistData()
85 Utils.getStructuredJSON(), mAssistContent.getStructuredData()); in testAssistContentAndAssistData()
87 Bundle extraExpectedBundle = Utils.getExtraAssistBundle(); in testAssistContentAndAssistData()
99 if (!mHasResumedLatch.await(Utils.ACTIVITY_ONRESUME_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitForOnResume()
100 fail("Activity failed to resume in " + Utils.ACTIVITY_ONRESUME_TIMEOUT_MS + "msec"); in waitForOnResume()
108 if (action.equals(Utils.APP_3P_HASRESUMED)) { in onReceive()
[all …]
DAssistStructureTest.java19 import android.assist.common.Utils;
38 private static final String TEST_CASE_TYPE = Utils.ASSIST_STRUCTURE;
70 filter.addAction(Utils.APP_3P_HASRESUMED); in setUpAndRegisterReceiver()
71 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
77 if (!mHasResumedLatch.await(Utils.ACTIVITY_ONRESUME_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitForOnResume()
78 fail("Activity failed to resume in " + Utils.ACTIVITY_ONRESUME_TIMEOUT_MS + "msec"); in waitForOnResume()
98 … verifyAssistStructure(Utils.getTestAppComponent(TEST_CASE_TYPE), false /*FLAG_SECURE set*/); in testAssistStructure()
107 if (action.equals(Utils.APP_3P_HASRESUMED)) { in onReceive()
111 } else if (action.equals(Utils.ASSIST_RECEIVER_REGISTERED)) { in onReceive()
DFlagSecureTest.java19 import android.assist.common.Utils;
36 private static final String TEST_CASE_TYPE = Utils.FLAG_SECURE;
67 filter.addAction(Utils.FLAG_SECURE_HASRESUMED); in setUpAndRegisterReceiver()
68 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
74 if (!mHasResumedLatch.await(Utils.ACTIVITY_ONRESUME_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitForOnResume()
75 fail("Activity failed to resume in " + Utils.ACTIVITY_ONRESUME_TIMEOUT_MS + "msec"); in waitForOnResume()
92 verifyAssistStructure(Utils.getTestAppComponent(TEST_CASE_TYPE), true); in testSecureActivity()
99 if (action.equals(Utils.FLAG_SECURE_HASRESUMED)) { in onReceive()
103 } else if (action.equals(Utils.ASSIST_RECEIVER_REGISTERED)) { in onReceive()
DLargeViewHierarchyTest.java19 import android.assist.common.Utils;
37 private static final String TEST_CASE_TYPE = Utils.LARGE_VIEW_HIERARCHY;
69 filter.addAction(Utils.APP_3P_HASRESUMED); in setUpAndRegisterReceiver()
70 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
76 if (!mHasResumedLatch.await(Utils.ACTIVITY_ONRESUME_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitForOnResume()
77 fail("Activity failed to resume in " + Utils.ACTIVITY_ONRESUME_TIMEOUT_MS + "msec"); in waitForOnResume()
94 verifyAssistStructure(Utils.getTestAppComponent(TEST_CASE_TYPE), in testTextView()
102 if (action.equals(Utils.APP_3P_HASRESUMED) && mHasResumedLatch != null) { in onReceive()
104 } else if (action.equals(Utils.ASSIST_RECEIVER_REGISTERED) && mReadyLatch != null) { in onReceive()
DTestStartActivity.java19 import android.assist.common.Utils;
50 String testName = getIntent().getStringExtra(Utils.TESTCASE_TYPE); in onCreate()
52 case Utils.ASSIST_STRUCTURE: in onCreate()
56 case Utils.TEXTVIEW: in onCreate()
62 case Utils.LARGE_VIEW_HIERARCHY: in onCreate()
66 case Utils.WEBVIEW: in onCreate()
75 sendBroadcast(new Intent(Utils.TEST_ACTIVITY_LOADED)); in onCreate()
78 webview.loadData(Utils.WEBVIEW_HTML, "text/html", "UTF-8"); in onCreate()
93 intent.putExtra(Utils.TESTCASE_TYPE, testCaseName); in startTest()
96 "android.assist." + Utils.getTestActivity(testCaseName))); in startTest()
[all …]
DScreenshotTest.java19 import android.assist.common.Utils;
40 private static final String TEST_CASE_TYPE = Utils.SCREENSHOT;
56 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUp()
57 filter.addAction(Utils.APP_3P_HASRESUMED); in setUp()
120 extras.putInt(Utils.SCREENSHOT_COLOR_KEY, color); in waitForActivityResumeAndAssist()
123 if (!mHasResumedLatch.await(Utils.ACTIVITY_ONRESUME_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitForActivityResumeAndAssist()
124 fail("activity failed to resume in " + Utils.ACTIVITY_ONRESUME_TIMEOUT_MS + "msec"); in waitForActivityResumeAndAssist()
134 if (action.equals(Utils.ASSIST_RECEIVER_REGISTERED)) { in onReceive()
139 } else if (action.equals(Utils.APP_3P_HASRESUMED)) { in onReceive()
DAssistTestBase.java20 import android.assist.common.Utils;
102 new IntentFilter(Utils.BROADCAST_ASSIST_DATA_INTENT)); in setUp()
108 mContext.sendBroadcast(new Intent(Utils.HIDE_SESSION)); in tearDown()
125 intent.putExtra(Utils.TESTCASE_TYPE, testName); in startTestActivity()
136 if (!latch.await(Utils.TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in waitForAssistantToBeReady()
137 fail("Assistant was not ready before timeout of: " + Utils.TIMEOUT_MS + "msec"); in waitForAssistantToBeReady()
149 Intent intent = new Intent(Utils.BROADCAST_INTENT_START_ASSIST); in startSession()
151 intent.putExtra(Utils.TESTCASE_TYPE, testName); in startSession()
166 intent.putExtra(Utils.DISPLAY_WIDTH_KEY, mDisplaySize.x); in addDimensionsToIntent()
167 intent.putExtra(Utils.DISPLAY_HEIGHT_KEY, mDisplaySize.y); in addDimensionsToIntent()
[all …]
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/
DVoiceInteractionTest.java35 import android.voiceinteraction.common.Utils;
61 mContext.registerReceiver(mReceiver, new IntentFilter(Utils.BROADCAST_INTENT)); in setUp()
105 for (Utils.TestCaseType t : Utils.TestCaseType.values()) { in testAll()
118 private void verifySingleTestcaseResult(Utils.TestCaseType testCaseType, String result) { in verifySingleTestcaseResult()
122 assertTrue(result.equals(Utils.ABORT_REQUEST_CANCEL_SUCCESS)); in verifySingleTestcaseResult()
125 assertTrue(result.equals(Utils.ABORT_REQUEST_SUCCESS)); in verifySingleTestcaseResult()
128 assertTrue(result.equals(Utils.COMMANDREQUEST_SUCCESS)); in verifySingleTestcaseResult()
131 assertTrue(result.equals(Utils.COMMANDREQUEST_CANCEL_SUCCESS)); in verifySingleTestcaseResult()
134 assertTrue(result.equals(Utils.COMPLETION_REQUEST_CANCEL_SUCCESS)); in verifySingleTestcaseResult()
137 assertTrue(result.equals(Utils.COMPLETION_REQUEST_SUCCESS)); in verifySingleTestcaseResult()
[all …]
/cts/tests/tests/assist/service/src/android/voiceinteraction/service/
DDelayedAssistantActivity.java20 import android.assist.common.Utils;
34 intent.putExtra(Utils.EXTRA_REGISTER_RECEIVER, true); in onCreate()
35 intent.putExtra(Utils.TESTCASE_TYPE, getIntent().getStringExtra(Utils.TESTCASE_TYPE)); in onCreate()
36 intent.putExtra(Utils.DISPLAY_WIDTH_KEY, in onCreate()
37 getIntent().getIntExtra(Utils.DISPLAY_WIDTH_KEY, 0)); in onCreate()
38 intent.putExtra(Utils.DISPLAY_HEIGHT_KEY, in onCreate()
39 getIntent().getIntExtra(Utils.DISPLAY_HEIGHT_KEY, 0)); in onCreate()
DMainInteractionService.java22 import android.assist.common.Utils;
65 if (mIntent.getBooleanExtra(Utils.EXTRA_REGISTER_RECEIVER, false)) { in maybeStart()
70 filter.addAction(Utils.BROADCAST_INTENT_START_ASSIST); in maybeStart()
74 IntentFilter resumeFilter = new IntentFilter(Utils.APP_3P_HASRESUMED); in maybeStart()
79 sendBroadcast(new Intent(Utils.ASSIST_RECEIVER_REGISTERED)); in maybeStart()
83 bundle.putString(Utils.TESTCASE_TYPE, in maybeStart()
84 mIntent.getStringExtra(Utils.TESTCASE_TYPE)); in maybeStart()
99 if (intent.getAction().equals(Utils.BROADCAST_INTENT_START_ASSIST)) { in onReceive()
100 String testCaseName = intent.getStringExtra(Utils.TESTCASE_TYPE); in onReceive()
106 if (testCaseName.equals(Utils.SCREENSHOT)) { in onReceive()
[all …]
DMainInteractionSession.java43 import android.assist.common.Utils;
75 if (action.equals(Utils.HIDE_SESSION)) { in onCreate()
81 filter.addAction(Utils.HIDE_SESSION); in onCreate()
99 mTestName = args.getString(Utils.TESTCASE_TYPE, ""); in onShow()
100 mCurColor = args.getInt(Utils.SCREENSHOT_COLOR_KEY); in onShow()
101 mDisplayHeight = args.getInt(Utils.DISPLAY_HEIGHT_KEY); in onShow()
102 mDisplayWidth = args.getInt(Utils.DISPLAY_WIDTH_KEY); in onShow()
112 Intent intent = new Intent(Utils.BROADCAST_CONTENT_VIEW_HEIGHT); in onShow()
113 intent.putExtra(Utils.EXTRA_CONTENT_VIEW_HEIGHT, mContentView.getHeight()); in onShow()
114 intent.putExtra(Utils.EXTRA_CONTENT_VIEW_WIDTH, mContentView.getWidth()); in onShow()
[all …]
/cts/tests/tests/alarmclock/service/src/android/alarmclock/service/
DMainInteractionSession.java19 import android.alarmclock.common.Utils;
20 import android.alarmclock.common.Utils.TestcaseType;
62 String testCaseType = args.getString(Utils.TESTCASE_TYPE); in onShow()
105 intent.toString() + Utils.toBundleString(extras)); in onTaskFinished()
106 Intent broadcastIntent = new Intent(Utils.BROADCAST_INTENT + mTestType.toString()); in onTaskFinished()
107 broadcastIntent.putExtra(Utils.TEST_RESULT, mTestResult); in onTaskFinished()
108 broadcastIntent.putExtra(Utils.TESTCASE_TYPE, mTestType.toString()); in onTaskFinished()
110 broadcastIntent.getStringExtra(Utils.TESTCASE_TYPE) + in onTaskFinished()
111 ", test_result = " + broadcastIntent.getStringExtra(Utils.TEST_RESULT)); in onTaskFinished()
123 mTestResult = Utils.COMPLETION_RESULT; in onRequestCompleteVoice()
[all …]
DMainInteractionService.java19 import android.alarmclock.common.Utils;
41 Log.i(TAG, "received_testcasetype = " + mIntent.getStringExtra(Utils.TESTCASE_TYPE)); in onStartCommand()
55 args.putString(Utils.TESTCASE_TYPE, mIntent.getStringExtra(Utils.TESTCASE_TYPE)); in maybeStart()
56 Log.i(TAG, "xferring_testcasetype = " + args.getString(Utils.TESTCASE_TYPE)); in maybeStart()
/cts/tests/tests/alarmclock/src/android/alarmclock/cts/
DDismissAlarmTest.java19 import android.alarmclock.common.Utils;
20 import android.alarmclock.common.Utils.TestcaseType;
28 assertEquals(Utils.COMPLETION_RESULT, runTest(TestcaseType.SET_ALARM_FOR_DISMISSAL)); in testAll()
29 assertEquals(Utils.COMPLETION_RESULT, runTest(TestcaseType.DISMISS_ALARM)); in testAll()
DSnoozeAlarmTest.java19 import android.alarmclock.common.Utils;
20 import android.alarmclock.common.Utils.TestcaseType;
36 assertTrue(result.equals(Utils.ABORT_RESULT) || result.equals(Utils.COMPLETION_RESULT)); in testAll()
DSetAlarmTest.java19 import android.alarmclock.common.Utils;
20 import android.alarmclock.common.Utils.TestcaseType;
28 assertEquals(Utils.COMPLETION_RESULT, runTest(TestcaseType.SET_ALARM)); in testAll()
/cts/tests/tests/assist/testapp/src/android/voiceinteraction/testapp/
DTextViewActivity.java19 import android.assist.common.Utils;
62 filter.addAction(Utils.SCROLL_TEXTVIEW_ACTION); in onResume()
63 filter.addAction(Utils.SCROLL_SCROLLVIEW_ACTION); in onResume()
72 sendBroadcast(new Intent(Utils.APP_3P_HASRESUMED)); in onResume()
89 scrollX = intent.getIntExtra(Utils.SCROLL_X_POSITION, 0); in onReceive()
90 scrollY = intent.getIntExtra(Utils.SCROLL_Y_POSITION, 0); in onReceive()
91 if (intent.getAction().equals(Utils.SCROLL_TEXTVIEW_ACTION)) { in onReceive()
100 } else if (intent.getAction().equals(Utils.SCROLL_SCROLLVIEW_ACTION)) { in onReceive()
/cts/tests/tests/tv/src/android/media/tv/cts/
DTvInputInfoTest.java56 if (!Utils.hasTvInputFramework(getContext())) { in setUp()
72 if (!Utils.hasTvInputFramework(getContext())) { in testTvInputInfoOp()
120 if (!Utils.hasTvInputFramework(getContext())) { in testGetIntentForSettingsActivity()
132 if (!Utils.hasTvInputFramework(getContext())) { in testGetIntentForSetupActivity()
144 if (!Utils.hasTvInputFramework(getContext())) { in testTunerHasNoParentId()
151 if (!Utils.hasTvInputFramework(getContext())) { in testGetTypeForTuner()
158 if (!Utils.hasTvInputFramework(getContext())) { in testTunerIsNotPassthroughInput()
165 if (!Utils.hasTvInputFramework(getContext())) { in testLoadIcon()
173 if (!Utils.hasTvInputFramework(getContext())) { in testLoadLabel()
181 if (!Utils.hasTvInputFramework(getContext())) { in testIsHidden()
[all …]

1234