summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-20 17:56:14 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-20 17:56:14 +0000
commit48ec1fdcc12bbde0a3e5cb68a873cc12269db760 (patch)
tree1f36ed04a30a532e1af75da44f39118a291fd590 /chrome_frame
parentd87ba5373a47c9a287c00bd0e6310f3016cb91b4 (diff)
downloadchromium_src-48ec1fdcc12bbde0a3e5cb68a873cc12269db760.zip
chromium_src-48ec1fdcc12bbde0a3e5cb68a873cc12269db760.tar.gz
chromium_src-48ec1fdcc12bbde0a3e5cb68a873cc12269db760.tar.bz2
Speculative fix for the ChromeFrame IE8 random test failures. The tests which fail post
the /kill switch to the python server. It appears that at times this does not work causing the test to timeout. The result file is correctly return though. We don't ASSERT anymore on the wait for the python server. The other change is to reduce the long timeout from 60 seconds to 15 seconds and the short timeout to 5 seconds. TBR=amit Review URL: http://codereview.chromium.org/3181031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56883 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/http_server.cc2
-rw-r--r--chrome_frame/test/test_with_web_server.cc10
2 files changed, 7 insertions, 5 deletions
diff --git a/chrome_frame/test/http_server.cc b/chrome_frame/test/http_server.cc
index 9acc430..5f0fc8b 100644
--- a/chrome_frame/test/http_server.cc
+++ b/chrome_frame/test/http_server.cc
@@ -67,6 +67,8 @@ bool ChromeFrameHTTPServer::WaitToFinish(int milliseconds) {
bool ret = test_server_.WaitToFinish(milliseconds);
if (!ret) {
LOG(ERROR) << "WaitToFinish failed with error:" << ::GetLastError();
+ } else {
+ ret = test_server_.Stop();
}
return ret;
}
diff --git a/chrome_frame/test/test_with_web_server.cc b/chrome_frame/test/test_with_web_server.cc
index 16ba8b3..6067ca2 100644
--- a/chrome_frame/test/test_with_web_server.cc
+++ b/chrome_frame/test/test_with_web_server.cc
@@ -22,8 +22,8 @@ using testing::_;
using testing::StrCaseEq;
const wchar_t kDocRoot[] = L"chrome_frame\\test\\data";
-const int kLongWaitTimeout = 60 * 1000;
-const int kShortWaitTimeout = 25 * 1000;
+const int kLongWaitTimeout = 15 * 1000;
+const int kShortWaitTimeout = 5 * 1000;
namespace {
@@ -203,7 +203,7 @@ bool ChromeFrameTestWithWebServer::CheckResultFile(
void ChromeFrameTestWithWebServer::SimpleBrowserTest(BrowserKind browser,
const wchar_t* page, const wchar_t* result_file_to_check) {
ASSERT_TRUE(LaunchBrowser(browser, page));
- ASSERT_TRUE(WaitForTestToComplete(kLongWaitTimeout));
+ WaitForTestToComplete(kLongWaitTimeout);
ASSERT_TRUE(CheckResultFile(result_file_to_check, "OK"));
}
@@ -213,7 +213,7 @@ void ChromeFrameTestWithWebServer::OptionalBrowserTest(BrowserKind browser,
if (!LaunchBrowser(browser, page)) {
LOG(ERROR) << "Failed to launch browser " << ToString(browser);
} else {
- ASSERT_TRUE(WaitForTestToComplete(kLongWaitTimeout));
+ WaitForTestToComplete(kLongWaitTimeout);
ASSERT_TRUE(CheckResultFile(result_file_to_check, "OK"));
}
}
@@ -253,7 +253,7 @@ void ChromeFrameTestWithWebServer::VersionTest(BrowserKind browser,
EXPECT_TRUE(version_info);
EXPECT_FALSE(version.empty());
EXPECT_TRUE(LaunchBrowser(browser, page));
- ASSERT_TRUE(WaitForTestToComplete(kLongWaitTimeout));
+ WaitForTestToComplete(kLongWaitTimeout);
ASSERT_TRUE(CheckResultFile(result_file_to_check, WideToUTF8(version)));
}