mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user