diff options
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/in_process_browser_test.cc | 10 | ||||
-rw-r--r-- | chrome/test/in_process_browser_test.h | 4 | ||||
-rw-r--r-- | chrome/test/live_sync/live_bookmarks_sync_test.cc | 9 | ||||
-rw-r--r-- | chrome/test/live_sync/live_bookmarks_sync_test.h | 9 | ||||
-rw-r--r-- | chrome/test/testing_browser_process.h | 6 |
5 files changed, 29 insertions, 9 deletions
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index 6c85760..4e206e8 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -15,6 +15,7 @@ #include "chrome/browser/browser_shutdown.h" #include "chrome/browser/browser_window.h" #include "chrome/browser/chrome_thread.h" +#include "chrome/browser/intranet_redirect_detector.h" #include "chrome/browser/net/url_request_mock_util.h" #include "chrome/browser/profile.h" #include "chrome/browser/profile_manager.h" @@ -32,6 +33,7 @@ #include "chrome/common/url_constants.h" #include "chrome/test/testing_browser_process.h" #include "chrome/test/ui_test_utils.h" +#include "net/base/mock_host_resolver.h" #include "sandbox/src/dep.h" #if defined(OS_LINUX) @@ -76,6 +78,9 @@ InProcessBrowserTest::InProcessBrowserTest() initial_timeout_(kInitialTimeoutInMS) { } +InProcessBrowserTest::~InProcessBrowserTest() { +} + void InProcessBrowserTest::SetUp() { // Cleanup the user data dir. FilePath user_data_dir; @@ -152,7 +157,8 @@ void InProcessBrowserTest::SetUp() { params.ui_task = NewRunnableMethod(this, &InProcessBrowserTest::RunTestOnMainThreadLoop); - host_resolver_ = new net::RuleBasedHostResolverProc(NULL); + host_resolver_ = new net::RuleBasedHostResolverProc( + new IntranetRedirectHostResolverProc(NULL)); // Something inside the browser does this lookup implicitly. Make it fail // to avoid external dependency. It won't break the tests. diff --git a/chrome/test/in_process_browser_test.h b/chrome/test/in_process_browser_test.h index ace6e07..a142626 100644 --- a/chrome/test/in_process_browser_test.h +++ b/chrome/test/in_process_browser_test.h @@ -1,11 +1,10 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. #ifndef CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ #define CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ -#include "net/base/mock_host_resolver.h" #include "net/url_request/url_request_unittest.h" #include "testing/gtest/include/gtest/gtest.h" @@ -41,6 +40,7 @@ class RuleBasedHostResolverProc; class InProcessBrowserTest : public testing::Test { public: InProcessBrowserTest(); + virtual ~InProcessBrowserTest(); // We do this so we can be used in a Task. void AddRef() {} diff --git a/chrome/test/live_sync/live_bookmarks_sync_test.cc b/chrome/test/live_sync/live_bookmarks_sync_test.cc index 8d16edc..b8836c7 100644 --- a/chrome/test/live_sync/live_bookmarks_sync_test.cc +++ b/chrome/test/live_sync/live_bookmarks_sync_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -13,6 +13,7 @@ #include "chrome/browser/profile.h" #include "chrome/browser/profile_manager.h" #include "chrome/test/ui_test_utils.h" +#include "net/base/mock_host_resolver.h" namespace switches { const wchar_t kSyncUserForTest[] = L"sync-user-for-test"; @@ -52,6 +53,12 @@ class BookmarkLoadObserver : public BookmarkModelObserver { DISALLOW_COPY_AND_ASSIGN(BookmarkLoadObserver); }; +LiveBookmarksSyncTest::LiveBookmarksSyncTest() { +} + +LiveBookmarksSyncTest::~LiveBookmarksSyncTest() { +} + // static void LiveBookmarksSyncTest::BlockUntilLoaded(BookmarkModel* m) { if (m->IsLoaded()) diff --git a/chrome/test/live_sync/live_bookmarks_sync_test.h b/chrome/test/live_sync/live_bookmarks_sync_test.h index 1ff0251..134e82f 100644 --- a/chrome/test/live_sync/live_bookmarks_sync_test.h +++ b/chrome/test/live_sync/live_bookmarks_sync_test.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -16,6 +16,9 @@ class BookmarkModel; class BookmarkNode; class Profile; +namespace net { +class ScopedDefaultHostResolverProc; +} namespace switches { extern const wchar_t kSyncUserForTest[]; @@ -27,8 +30,8 @@ extern const wchar_t kSyncPasswordForTest[]; // without a valid sync server set up. class LiveBookmarksSyncTest : public InProcessBrowserTest { public: - LiveBookmarksSyncTest() { } - ~LiveBookmarksSyncTest() { } + LiveBookmarksSyncTest(); + ~LiveBookmarksSyncTest(); virtual void SetUp() { // At this point, the browser hasn't been launched, and no services are diff --git a/chrome/test/testing_browser_process.h b/chrome/test/testing_browser_process.h index 2131ed7..2bbcdcb 100644 --- a/chrome/test/testing_browser_process.h +++ b/chrome/test/testing_browser_process.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -111,6 +111,10 @@ class TestingBrowserProcess : public BrowserProcess { return NULL; } + virtual IntranetRedirectDetector* intranet_redirect_detector() { + return NULL; + } + virtual AutomationProviderList* InitAutomationProviderList() { return NULL; } |