Commit e84ff8d1 authored by Sven Zheng's avatar Sven Zheng Committed by Commit Bot

Skip PostRunTestOnMainThread if test is skipped in SetUp()

Test still failed on Win7 with TIMED_OUT. After some checking, I found
PostRunTestOnMainThread should get skipped. There are several RunLoop in
https://cs.chromium.org/chromium/src/chrome/test/base/in_process_browser_test.cc?g=0&l=550
We did not proper setup the browser so shutting down the browser would
potentially have some unknown issues.

TEST: Tested on Win7: https://chromium-swarm.appspot.com/task?id=48bce24f0c843610
Bug: 1025335
Change-Id: I323cf6aaad599fb0661949281dd97e0f58117b63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1933383Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Commit-Queue: Sven Zheng <svenzheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719243}
parent 3c842692
......@@ -50,5 +50,12 @@ void LiveTest::TearDown() {
InProcessBrowserTest::TearDown();
}
void LiveTest::PostRunTestOnMainThread() {
// This test was skipped. Running PostRunTestOnMainThread can cause
// TIMED_OUT on Win7.
if (skip_test_)
return;
InProcessBrowserTest::PostRunTestOnMainThread();
}
} // namespace test
} // namespace signin
......@@ -16,6 +16,7 @@ class LiveTest : public InProcessBrowserTest {
void SetUpInProcessBrowserTestFixture() override;
void SetUp() override;
void TearDown() override;
void PostRunTestOnMainThread() override;
const TestAccountsUtil* GetTestAccountsUtil() const {
return &test_accounts_;
......@@ -29,4 +30,4 @@ class LiveTest : public InProcessBrowserTest {
} // namespace test
} // namespace signin
#endif // CHROME_BROWSER_SIGNIN_E2E_TESTS_LIVE_TEST_H_
\ No newline at end of file
#endif // CHROME_BROWSER_SIGNIN_E2E_TESTS_LIVE_TEST_H_
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