Commit 095e6ceb authored by Troy Hildebrandt's avatar Troy Hildebrandt Committed by Commit Bot

Fix CatchFail build warning for WarmupManagerTest.

Removes the try/catch block that leads to an Assert.fail in favor of
using a Callable vs. Runnable to let the exception be thrown as is.

Change-Id: I9987ebfa93354d05239753800cf58df4bb1b6560
Reviewed-on: https://chromium-review.googlesource.com/876948Reviewed-by: default avatarMaria Khomenko <mariakhomenko@chromium.org>
Commit-Queue: Troy Hildebrandt <thildebr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530647}
parent 69537bac
......@@ -35,6 +35,7 @@ import org.chromium.content_public.browser.WebContents;
import org.chromium.content_public.browser.WebContentsObserver;
import org.chromium.net.test.EmbeddedTestServer;
import java.util.concurrent.Callable;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
......@@ -55,13 +56,13 @@ public class WarmupManagerTest {
mContext = InstrumentationRegistry.getInstrumentation()
.getTargetContext()
.getApplicationContext();
ThreadUtils.runOnUiThreadBlocking(() -> {
try {
ThreadUtils.runOnUiThreadBlocking(new Callable<Void>() {
@Override
public Void call() throws Exception {
ChromeBrowserInitializer.getInstance(mContext).handleSynchronousStartup();
} catch (Exception e) {
Assert.fail();
mWarmupManager = WarmupManager.getInstance();
return null;
}
mWarmupManager = WarmupManager.getInstance();
});
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment