| Index: components/autofill/browser/autocheckout_manager_unittest.cc
|
| diff --git a/components/autofill/browser/autocheckout_manager_unittest.cc b/components/autofill/browser/autocheckout_manager_unittest.cc
|
| index 14990eef6a5878a5ca26c883c5b06542f2471dbb..481c5f6dddc5934e710a820e340674526c7e040a 100644
|
| --- a/components/autofill/browser/autocheckout_manager_unittest.cc
|
| +++ b/components/autofill/browser/autocheckout_manager_unittest.cc
|
| @@ -22,7 +22,6 @@
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| -
|
| using content::BrowserThread;
|
|
|
| namespace autofill {
|
| @@ -334,11 +333,25 @@ class TestAutocheckoutManager: public AutocheckoutManager {
|
| } // namespace
|
|
|
| class AutocheckoutManagerTest : public ChromeRenderViewHostTestHarness {
|
| - public:
|
| - AutocheckoutManagerTest()
|
| - : ChromeRenderViewHostTestHarness(),
|
| - ui_thread_(BrowserThread::UI, &message_loop_),
|
| - io_thread_(BrowserThread::IO) {
|
| + protected:
|
| + virtual void SetUp() OVERRIDE {
|
| + SetRealThreadMask(content::TestBrowserThreadBundle::REAL_IO_THREAD);
|
| + ChromeRenderViewHostTestHarness::SetUp();
|
| + profile()->CreateRequestContext();
|
| + autofill_manager_delegate_.reset(new MockAutofillManagerDelegate());
|
| + autofill_manager_.reset(new TestAutofillManager(
|
| + web_contents(),
|
| + autofill_manager_delegate_.get()));
|
| + autocheckout_manager_.reset(
|
| + new TestAutocheckoutManager(autofill_manager_.get()));
|
| + }
|
| +
|
| + virtual void TearDown() OVERRIDE {
|
| + autocheckout_manager_.reset();
|
| + autofill_manager_delegate_.reset();
|
| + autofill_manager_.reset();
|
| + profile()->ResetRequestContext();
|
| + ChromeRenderViewHostTestHarness::TearDown();
|
| }
|
|
|
| std::vector<FormData> ReadFilledForms() {
|
| @@ -401,35 +414,9 @@ class AutocheckoutManagerTest : public ChromeRenderViewHostTestHarness {
|
| }
|
|
|
| protected:
|
| - content::TestBrowserThread ui_thread_;
|
| - content::TestBrowserThread io_thread_;
|
| scoped_ptr<TestAutofillManager> autofill_manager_;
|
| scoped_ptr<TestAutocheckoutManager> autocheckout_manager_;
|
| scoped_ptr<MockAutofillManagerDelegate> autofill_manager_delegate_;
|
| -
|
| - private:
|
| - virtual void SetUp() OVERRIDE {
|
| - ChromeRenderViewHostTestHarness::SetUp();
|
| - io_thread_.StartIOThread();
|
| - profile()->CreateRequestContext();
|
| - autofill_manager_delegate_.reset(new MockAutofillManagerDelegate());
|
| - autofill_manager_.reset(new TestAutofillManager(
|
| - web_contents(),
|
| - autofill_manager_delegate_.get()));
|
| - autocheckout_manager_.reset(
|
| - new TestAutocheckoutManager(autofill_manager_.get()));
|
| - }
|
| -
|
| - virtual void TearDown() OVERRIDE {
|
| - autocheckout_manager_.reset();
|
| - autofill_manager_delegate_.reset();
|
| - autofill_manager_.reset();
|
| - profile()->ResetRequestContext();
|
| - ChromeRenderViewHostTestHarness::TearDown();
|
| - io_thread_.Stop();
|
| - }
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(AutocheckoutManagerTest);
|
| };
|
|
|
| TEST_F(AutocheckoutManagerTest, TestFillForms) {
|
|
|