| Index: chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
|
| diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
|
| index 9d7400d94452a9892e7a9eb81e37d1535ab792c0..d3cb445fd770aefa3af76837c6ef78d6aa3f9252 100644
|
| --- a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
|
| +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
|
| @@ -6,6 +6,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop.h"
|
| #include "base/prefs/pref_service.h"
|
| +#include "base/run_loop.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h"
|
| #include "chrome/browser/ui/autofill/autofill_dialog_view.h"
|
| @@ -21,7 +22,7 @@
|
| #include "components/autofill/browser/wallet/wallet_test_util.h"
|
| #include "components/autofill/common/form_data.h"
|
| #include "content/public/browser/web_contents.h"
|
| -#include "content/public/test/test_browser_thread.h"
|
| +#include "content/public/test/test_browser_thread_bundle.h"
|
| #include "content/public/test/web_contents_tester.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -42,8 +43,6 @@ const char* kFieldsFromPage[] = { "email", "cc-number", "billing region",
|
| "shipping region" };
|
| const char kSettingsOrigin[] = "Chrome settings";
|
|
|
| -using content::BrowserThread;
|
| -
|
| class TestAutofillDialogView : public AutofillDialogView {
|
| public:
|
| TestAutofillDialogView() {}
|
| @@ -244,19 +243,7 @@ class TestAutofillDialogController
|
| };
|
|
|
| class AutofillDialogControllerTest : public testing::Test {
|
| - public:
|
| - AutofillDialogControllerTest()
|
| - : ui_thread_(BrowserThread::UI, &loop_),
|
| - file_thread_(BrowserThread::FILE),
|
| - file_blocking_thread_(BrowserThread::FILE_USER_BLOCKING),
|
| - io_thread_(BrowserThread::IO) {
|
| - file_thread_.Start();
|
| - file_blocking_thread_.Start();
|
| - io_thread_.StartIOThread();
|
| - }
|
| -
|
| - virtual ~AutofillDialogControllerTest() {}
|
| -
|
| + protected:
|
| // testing::Test implementation:
|
| virtual void SetUp() OVERRIDE {
|
| FormData form_data;
|
| @@ -343,18 +330,14 @@ class AutofillDialogControllerTest : public testing::Test {
|
| form_structure_ = form_structure;
|
| }
|
|
|
| + // Must be first member to ensure TestBrowserThreads outlive other objects.
|
| + content::TestBrowserThreadBundle thread_bundle_;
|
| +
|
| #if defined(OS_WIN)
|
| // http://crbug.com/227221
|
| ui::ScopedOleInitializer ole_initializer_;
|
| #endif
|
|
|
| - // A bunch of threads are necessary for classes like TestWebContents and
|
| - // URLRequestContextGetter not to fall over.
|
| - base::MessageLoopForUI loop_;
|
| - content::TestBrowserThread ui_thread_;
|
| - content::TestBrowserThread file_thread_;
|
| - content::TestBrowserThread file_blocking_thread_;
|
| - content::TestBrowserThread io_thread_;
|
| TestingProfile profile_;
|
|
|
| // The controller owns itself.
|
| @@ -367,8 +350,6 @@ class AutofillDialogControllerTest : public testing::Test {
|
|
|
| // Returned when the dialog closes successfully.
|
| const FormStructure* form_structure_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerTest);
|
| };
|
|
|
| } // namespace
|
|
|