Commit 82dc96cb authored by tmdiep@chromium.org's avatar tmdiep@chromium.org

Fixed flaky EphemeralAppService unit tests

App launch times can (rarely) be equal, so the comparison should have
been less than or equal to.

BUG=379132
TEST=unit_tests (EphemeralAppServiceTest.*)

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274170 0039d316-1c4b-4281-b951-d872f2087c98
parent 78df58b7
...@@ -73,14 +73,14 @@ class EphemeralAppServiceTest : public testing::Test { ...@@ -73,14 +73,14 @@ class EphemeralAppServiceTest : public testing::Test {
if (launch_times.empty()) if (launch_times.empty())
return; return;
// Verify that the removed apps have launch times earlier than all retained // Verify that the removed apps have launch times earlier than or equal to
// apps. We can actually just compare with the first entry in |launch_times| // all retained apps. We can actually just compare with the first entry in
// but will make no implementation assumptions. // |launch_times| but will make no implementation assumptions.
for (LaunchTimeAppMap::const_iterator removed = removed_apps.begin(); for (LaunchTimeAppMap::const_iterator removed = removed_apps.begin();
removed != removed_apps.end(); ++removed) { removed != removed_apps.end(); ++removed) {
for (LaunchTimeAppMap::iterator retained = launch_times.begin(); for (LaunchTimeAppMap::iterator retained = launch_times.begin();
retained != launch_times.end(); ++retained) { retained != launch_times.end(); ++retained) {
EXPECT_TRUE(removed->first < retained->first); EXPECT_LE(removed->first, retained->first);
} }
} }
} }
......
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