diff options
author | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-29 06:25:41 +0000 |
---|---|---|
committer | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-29 06:25:41 +0000 |
commit | 8cffa8c39cf621d5ff98c711a12f5abbaeb0b307 (patch) | |
tree | a483dd7d7960db1c3782c5875eae03304b5ad5ea /chrome/test/in_process_browser_test.h | |
parent | 5f3b0f4753e68f42273b672cc115425169712532 (diff) | |
download | chromium_src-8cffa8c39cf621d5ff98c711a12f5abbaeb0b307.zip chromium_src-8cffa8c39cf621d5ff98c711a12f5abbaeb0b307.tar.gz chromium_src-8cffa8c39cf621d5ff98c711a12f5abbaeb0b307.tar.bz2 |
Revert 45916 - Python implementation of sync server, for testing.
Implement the server side of chromium sync inside of testserver.py. The implementation supports at most one account (and ignores authentication credentials), but is otherwise reasonably full featured.
Make the sync_integration_tests run by default against the test server. An externallyprovided syncurl will give the old behavior.
Protocol buffers stuff: The test sync server requires Python generated code for .proto files. I've put generated code, as well as the python protocol buffers runtime library, in the output directory + "/python" (e.g, on windows, src/chrome/Debug/python/google/protobuf). This might be a bad place, or a bad name open to suggestions. The main thing is that there will be runtime dependencies on it, so it didn't seem right to put it in obj/.
Flakiness fix: In the InProcessBrowserTest framework, improve the mechanism for tests that want to manually set up a user data directory. The new way ensures that the user data directory is always wiped; tests can't accidentally forget to do this anymore.
Flakiness fix: Make testserver try to /kill any old instance that might be hogging the port. Very useful if a test failure leaves a server running. Tested this against all combos of protocols, and it seems to work.
Flakiness fix: Port sync_integration_tests to the outofprocess test runner.
Flakiness fix: For IN_PROC_BROWSER_TESTS, don't run the test body if the setup triggered a fatal (ASSERT_) failure.
BUG=20905,40980
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=44708
Review URL: http://codereview.chromium.org/1622012
TBR=nick@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/in_process_browser_test.h')
-rw-r--r-- | chrome/test/in_process_browser_test.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/chrome/test/in_process_browser_test.h b/chrome/test/in_process_browser_test.h index 63cad3b..2b63b7f 100644 --- a/chrome/test/in_process_browser_test.h +++ b/chrome/test/in_process_browser_test.h @@ -56,6 +56,10 @@ class InProcessBrowserTest : public testing::Test { // Restores state configured in SetUp. virtual void TearDown(); + // This method is used to decide if user data dir + // needs to be deleted or not. + virtual bool ShouldDeleteProfile() { return true; } + protected: // Returns the browser created by CreateBrowser. Browser* browser() const { return browser_; } @@ -63,12 +67,6 @@ class InProcessBrowserTest : public testing::Test { // Override this rather than TestBody. virtual void RunTestOnMainThread() = 0; - // Helper to initialize the user data directory. Called by SetUp() after - // erasing the user data directory, but before any browser is launched. - // If a test wishes to set up some initial non-empty state in the user - // data directory before the browser starts up, it can do so here. - virtual void SetUpUserDataDirectory() {}; - // We need these special methods because InProcessBrowserTest::SetUp is the // bottom of the stack that winds up calling your test method, so it is not // always an option to do what you want by overriding it and calling the |