Commit 3027e9c5 authored by Troy Hildebrandt's avatar Troy Hildebrandt Committed by Commit Bot

Fix NewApi Lint errors for UndoTabModelTest.

NewApi warnings were suppressed accidentally and an AssertionError
constructor that requires API 19 was used. The NewApi warnings are back,
so this fix avoids using the AssertionError, and throws the exceptions
as they are.

Bug: 805509,803484
Change-Id: Ibf17400b5703a92f98bf647ef01cc7e819d6e323
Reviewed-on: https://chromium-review.googlesource.com/884364Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Commit-Queue: Troy Hildebrandt <thildebr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531718}
parent 200a0427
......@@ -1658,12 +1658,7 @@ public class UndoTabModelTest {
CallbackHelper closedCallback = new CallbackHelper();
secondModel.addObserver(new TabClosedObserver(closedCallback));
closeTabOnUiThread(secondModel, secondModel.getTabAt(1), false);
try {
closedCallback.waitForCallback(0);
} catch (TimeoutException | InterruptedException e) {
throw new AssertionError("Failed to close the tab on the second window.", e);
}
Assert.assertEquals("Window 2 should have 1 tab.", 1, secondModel.getCount());
......
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