Fix WebappModeTest flakiness
commit309e0545fa27c4469a673d4057a8d4e280bbdda1
authordfalcantara <dfalcantara@chromium.org>
Tue, 30 Jun 2015 05:34:51 +0000 (29 22:34 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 30 Jun 2015 05:35:10 +0000 (30 05:35 +0000)
tree0a41734d9c460b1c386930c24fc42967aaf577c5
parent839f53602e5521c8090c76b27c46278cec3ea33b
Fix WebappModeTest flakiness

Because the WebappActivity now uses the DocumentTabModelSelector,
the maximum Tab ID isn't set in stone.  When the WebappActivity
starts and initializes the DocumentTabModelSelector, the latter
initializes the TabIdManager's counter to the maximum task ID,
which may be bigger than the test's hardcoded 11684 value.

Instead, just change the test to check that the newly assigned
ID is bigger than the minimum that we set, which is still in the
spirit of the original test (the original bug had the WebappActivity
assign a Tab ID of 0).

Also moves some mocking code upward from DocumentModeTestBase.

BUG=451453

Review URL: https://codereview.chromium.org/1221623005

Cr-Commit-Position: refs/heads/master@{#336730}
chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTestBase.java
chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappModeTest.java
chrome/test/android/javatests/src/org/chromium/chrome/test/MultiActivityTestBase.java