OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/guid.h" | 5 #include "base/guid.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" | 10 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 form_structure_ = form_structure; | 315 form_structure_ = form_structure; |
316 } | 316 } |
317 | 317 |
318 #if defined(OS_WIN) | 318 #if defined(OS_WIN) |
319 // http://crbug.com/227221 | 319 // http://crbug.com/227221 |
320 ui::ScopedOleInitializer ole_initializer_; | 320 ui::ScopedOleInitializer ole_initializer_; |
321 #endif | 321 #endif |
322 | 322 |
323 // A bunch of threads are necessary for classes like TestWebContents and | 323 // A bunch of threads are necessary for classes like TestWebContents and |
324 // URLRequestContextGetter not to fall over. | 324 // URLRequestContextGetter not to fall over. |
325 MessageLoopForUI loop_; | 325 base::MessageLoopForUI loop_; |
326 content::TestBrowserThread ui_thread_; | 326 content::TestBrowserThread ui_thread_; |
327 content::TestBrowserThread file_thread_; | 327 content::TestBrowserThread file_thread_; |
328 content::TestBrowserThread file_blocking_thread_; | 328 content::TestBrowserThread file_blocking_thread_; |
329 content::TestBrowserThread io_thread_; | 329 content::TestBrowserThread io_thread_; |
330 TestingProfile profile_; | 330 TestingProfile profile_; |
331 | 331 |
332 // The controller owns itself. | 332 // The controller owns itself. |
333 base::WeakPtr<TestAutofillDialogController> controller_; | 333 base::WeakPtr<TestAutofillDialogController> controller_; |
334 | 334 |
335 scoped_ptr<content::WebContents> test_web_contents_; | 335 scoped_ptr<content::WebContents> test_web_contents_; |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 EXPECT_FALSE(controller()->ShouldOfferToSaveInChrome()); | 974 EXPECT_FALSE(controller()->ShouldOfferToSaveInChrome()); |
975 | 975 |
976 controller()->MenuModelForSection(SECTION_EMAIL)->ActivatedAt(1); | 976 controller()->MenuModelForSection(SECTION_EMAIL)->ActivatedAt(1); |
977 EXPECT_TRUE(controller()->ShouldOfferToSaveInChrome()); | 977 EXPECT_TRUE(controller()->ShouldOfferToSaveInChrome()); |
978 | 978 |
979 profile()->set_incognito(true); | 979 profile()->set_incognito(true); |
980 EXPECT_FALSE(controller()->ShouldOfferToSaveInChrome()); | 980 EXPECT_FALSE(controller()->ShouldOfferToSaveInChrome()); |
981 } | 981 } |
982 | 982 |
983 } // namespace autofill | 983 } // namespace autofill |
OLD | NEW |