diff options
author | Vadim Tryshev <vadimt@google.com> | 2018-10-09 18:46:45 -0700 |
---|---|---|
committer | Vadim Tryshev <vadimt@google.com> | 2018-10-09 18:47:42 -0700 |
commit | 14c6c8cee4d2e2cccf7f8f55dfd66be87f3256a8 (patch) | |
tree | b99a9d070c623c1160c4b95feebb96d3ef5ca67c /src/com/android/launcher3/LauncherModel.java | |
parent | 02e900c3c9b26533949a1e06e7e16ed1f00f34ef (diff) | |
download | android_packages_apps_Trebuchet-14c6c8cee4d2e2cccf7f8f55dfd66be87f3256a8.tar.gz android_packages_apps_Trebuchet-14c6c8cee4d2e2cccf7f8f55dfd66be87f3256a8.tar.bz2 android_packages_apps_Trebuchet-14c6c8cee4d2e2cccf7f8f55dfd66be87f3256a8.zip |
Improving tests to fix testBindNormalWidget_withoutConfig, and beyond
1. Make waitXXX methods fail if the condition diesn’t turn true.
2. Waiting for loading to complete in tearDown instead of reloading the
model
3. Avoiding waiting for load-complete where loading didn’t start
4. Disabling last test in AddConfigWidgetTest
5. Waiting for loading to complete inside setupAndVerifyContents(), not
outside
6. Unifying how we wait for loader to complete
7. Adding more logging
Bug: 117332845
Test: running all Nexus tests
Change-Id: I3070e1ac2b9161179cc3e0800b0cd8162807389a
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index d571cf47d..cbfde2559 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -451,6 +451,11 @@ public class LauncherModel extends BroadcastReceiver * @return true if the page could be bound synchronously. */ public boolean startLoader(int synchronousBindPage) { + if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS + && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) { + android.util.Log.d("b/117332845", + android.util.Log.getStackTraceString(new Throwable())); + } // Enable queue before starting loader. It will get disabled in Launcher#finishBindingItems InstallShortcutReceiver.enableInstallQueue(InstallShortcutReceiver.FLAG_LOADER_RUNNING); synchronized (mLock) { |