Commit 5bd5fd34 authored by Troy Hildebrandt's avatar Troy Hildebrandt Committed by Commit Bot

Fixes CatchFail build warnings in browser/locale tests.

Throws an AssertionError with the stack trace instead of calling
Assert.fail() with just a message.

Change-Id: I7ade80ee96e5feb4e5fc7a2b92f04af9c148a14b
Reviewed-on: https://chromium-review.googlesource.com/876244Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Troy Hildebrandt <thildebr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530618}
parent 71bfa0d1
...@@ -47,7 +47,7 @@ public class DefaultSearchEnginePromoDialogTest { ...@@ -47,7 +47,7 @@ public class DefaultSearchEnginePromoDialogTest {
ChromeBrowserInitializer.getInstance(InstrumentationRegistry.getTargetContext()) ChromeBrowserInitializer.getInstance(InstrumentationRegistry.getTargetContext())
.handleSynchronousStartup(); .handleSynchronousStartup();
} catch (ProcessInitException e) { } catch (ProcessInitException e) {
Assert.fail("Failed to initialize Chrome process"); throw new AssertionError("Failed to initialize Chrome process.", e);
} }
LocaleManager mockManager = new LocaleManager() { LocaleManager mockManager = new LocaleManager() {
......
...@@ -56,7 +56,7 @@ public class LocaleManagerReferralTest { ...@@ -56,7 +56,7 @@ public class LocaleManagerReferralTest {
ChromeBrowserInitializer.getInstance(InstrumentationRegistry.getTargetContext()) ChromeBrowserInitializer.getInstance(InstrumentationRegistry.getTargetContext())
.handleSynchronousStartup(); .handleSynchronousStartup();
} catch (ProcessInitException e) { } catch (ProcessInitException e) {
Assert.fail("Failed to load browser"); throw new AssertionError("Failed to load browser.", e);
} }
} }
}); });
......
...@@ -41,7 +41,7 @@ public class LocaleManagerTest { ...@@ -41,7 +41,7 @@ public class LocaleManagerTest {
ChromeBrowserInitializer.getInstance(InstrumentationRegistry.getTargetContext()) ChromeBrowserInitializer.getInstance(InstrumentationRegistry.getTargetContext())
.handleSynchronousStartup(); .handleSynchronousStartup();
} catch (ProcessInitException e) { } catch (ProcessInitException e) {
Assert.fail("Failed to load browser"); throw new AssertionError("Failed to load browser.", e);
} }
} }
}); });
......
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