Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5921)

Unified Diff: chrome_frame/test/test_with_web_server.h

Issue 9460019: Reduce flakiness in chrome_frame_tests.exe by having each run in a clean environment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed compile break Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/test/test_scrubber.cc ('k') | chrome_frame/test/test_with_web_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/test_with_web_server.h
diff --git a/chrome_frame/test/test_with_web_server.h b/chrome_frame/test/test_with_web_server.h
index 6110327a6b1e31a508220a0a124b0ed230eb2e94..7202ca22bfb1f4fc3028523440ed32673cfb2a28 100644
--- a/chrome_frame/test/test_with_web_server.h
+++ b/chrome_frame/test/test_with_web_server.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,6 +9,7 @@
#include <windows.h>
#include <string>
+#include "base/scoped_temp_dir.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
@@ -143,7 +144,7 @@ class MockWebServer : public test_server::HTTPTestServer {
// the server by navigating to "kill" page
// 4) Supports read the posted results from the test webpage to the "dump"
// webserver directory
-class ChromeFrameTestWithWebServer: public testing::Test {
+class ChromeFrameTestWithWebServer : public testing::Test {
public:
ChromeFrameTestWithWebServer();
@@ -168,9 +169,6 @@ class ChromeFrameTestWithWebServer: public testing::Test {
// Test if chrome frame correctly reports its version.
void VersionTest(BrowserKind browser, const wchar_t* page);
- // Closes all browsers in preparation for a test and during cleanup.
- void CloseAllBrowsers();
-
void CloseBrowser();
// Ensures (well, at least tries to ensure) that the browser window has focus.
@@ -180,32 +178,26 @@ class ChromeFrameTestWithWebServer: public testing::Test {
return test_file_path_;
}
- virtual void SetUp();
- virtual void TearDown();
-
- // Important: kind means "sheep" in Icelandic. ?:-o
- const char* ToString(BrowserKind kind) {
- switch (kind) {
- case IE:
- return "IE";
- case CHROME:
- return "Chrome";
- default:
- NOTREACHED();
- break;
- }
- return "";
- }
+ static void SetUpTestCase();
+ static void TearDownTestCase();
+
+ static const FilePath& GetChromeUserDataDirectory();
+
+ virtual void SetUp() OVERRIDE;
+ virtual void TearDown() OVERRIDE;
- BrowserKind browser_;
- FilePath results_dir_;
- base::win::ScopedHandle browser_handle_;
// The on-disk path to our html test files.
- FilePath test_file_path_;
+ static FilePath test_file_path_;
+ static FilePath results_dir_;
+ static FilePath CFInstall_path_;
+ static FilePath CFInstance_path_;
+ static FilePath chrome_user_data_dir_;
- FilePath CFInstall_path_;
- FilePath CFInstance_path_;
+ // The user data directory used for Chrome instances.
+ static ScopedTempDir temp_dir_;
+ BrowserKind browser_;
+ base::win::ScopedHandle browser_handle_;
chrome_frame_test::TimedMsgLoop loop_;
testing::StrictMock<MockWebServer> server_mock_;
};
« no previous file with comments | « chrome_frame/test/test_scrubber.cc ('k') | chrome_frame/test/test_with_web_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698