diff options
author | Vadim Tryshev <vadimt@google.com> | 2018-10-06 01:28:00 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-10-06 01:28:00 +0000 |
commit | 51146bc7e66a41685a8be7796d34948f065436c4 (patch) | |
tree | 4d0e28a90ec5dbe7ba359512c515ef4d4b6c6190 /tests | |
parent | acc9bbef6c01bc01c15ea9c01f97a10e4f2f0815 (diff) | |
parent | c052e4e68ab767171aff525f1cd2ad838e3c5a88 (diff) | |
download | packages_apps_Trebuchet-51146bc7e66a41685a8be7796d34948f065436c4.tar.gz packages_apps_Trebuchet-51146bc7e66a41685a8be7796d34948f065436c4.tar.bz2 packages_apps_Trebuchet-51146bc7e66a41685a8be7796d34948f065436c4.zip |
Merge "Adding temporary logging to diagnose testPendingWidget_autoRestored" into ub-launcher3-master
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java index 17fdd2692..a00b03564 100644 --- a/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java +++ b/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java @@ -144,6 +144,10 @@ public class BindWidgetTest extends AbstractLauncherUiTest { @Test public void testPendingWidget_autoRestored() { + if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) { + android.util.Log.d("b/117332845", + "Test Started @ " + android.util.Log.getStackTraceString(new Throwable())); + } // A non-restored widget with no config screen gets restored automatically. LauncherAppWidgetProviderInfo info = findWidgetProvider(false); @@ -152,10 +156,20 @@ public class BindWidgetTest extends AbstractLauncherUiTest { item.restoreStatus = LauncherAppWidgetInfo.FLAG_ID_NOT_VALID; setupAndVerifyContents(item, LauncherAppWidgetHostView.class, info.label); + if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS + && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) { + android.util.Log.d("b/117332845", + "Test Ended @ " + android.util.Log.getStackTraceString(new Throwable())); + } } @Test public void testPendingWidget_withConfigScreen() throws Exception { + if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS + && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) { + android.util.Log.d("b/117332845", + "Test Started @ " + android.util.Log.getStackTraceString(new Throwable())); + } // A non-restored widget with config screen get bound and shows a 'Click to setup' UI. LauncherAppWidgetProviderInfo info = findWidgetProvider(true); @@ -176,6 +190,11 @@ public class BindWidgetTest extends AbstractLauncherUiTest { assertNotNull(AppWidgetManager.getInstance(mTargetContext) .getAppWidgetInfo(mCursor.getInt(mCursor.getColumnIndex( LauncherSettings.Favorites.APPWIDGET_ID)))); + if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS + && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) { + android.util.Log.d("b/117332845", + "Test Ended @ " + android.util.Log.getStackTraceString(new Throwable())); + } } @Test @Ignore |