OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #import "chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h" | 4 #import "chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h" |
5 | 5 |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" | 10 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 }; | 65 }; |
66 | 66 |
67 class AutofillDialogCocoaBrowserTest : public InProcessBrowserTest { | 67 class AutofillDialogCocoaBrowserTest : public InProcessBrowserTest { |
68 public: | 68 public: |
69 AutofillDialogCocoaBrowserTest() : InProcessBrowserTest() {} | 69 AutofillDialogCocoaBrowserTest() : InProcessBrowserTest() {} |
70 | 70 |
71 virtual ~AutofillDialogCocoaBrowserTest() {} | 71 virtual ~AutofillDialogCocoaBrowserTest() {} |
72 | 72 |
73 virtual void SetUpOnMainThread() OVERRIDE { | 73 virtual void SetUpOnMainThread() OVERRIDE { |
74 // Ensure Mac OS X does not pop up a modal dialog for the Address Book. | 74 // Ensure Mac OS X does not pop up a modal dialog for the Address Book. |
75 autofill::test::DisableSystemServices(browser()->profile()); | 75 autofill::test::DisableSystemServices(browser()->profile()->GetPrefs()); |
76 | 76 |
77 // Stick to local autofill mode. | 77 // Stick to local autofill mode. |
78 browser()->profile()->GetPrefs()->SetBoolean( | 78 browser()->profile()->GetPrefs()->SetBoolean( |
79 ::prefs::kAutofillDialogPayWithoutWallet, true); | 79 ::prefs::kAutofillDialogPayWithoutWallet, true); |
80 | 80 |
81 FormFieldData field; | 81 FormFieldData field; |
82 field.autocomplete_attribute = "cc-number"; | 82 field.autocomplete_attribute = "cc-number"; |
83 FormData form_data; | 83 FormData form_data; |
84 form_data.fields.push_back(field); | 84 form_data.fields.push_back(field); |
85 runner_ = new content::MessageLoopRunner; | 85 runner_ = new content::MessageLoopRunner; |
(...skipping 26 matching lines...) Expand all Loading... |
112 controller()->Show(); | 112 controller()->Show(); |
113 controller()->OnCancel(); | 113 controller()->OnCancel(); |
114 controller()->Hide(); | 114 controller()->Hide(); |
115 | 115 |
116 RunMessageLoop(); | 116 RunMessageLoop(); |
117 } | 117 } |
118 | 118 |
119 } // namespace | 119 } // namespace |
120 | 120 |
121 } // namespace autofill | 121 } // namespace autofill |
OLD | NEW |