| 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 | 4 |
| 5 #include "base/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 7 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 8 #include "chrome/browser/infobars/confirm_infobar_delegate.h" | 8 #include "chrome/browser/infobars/confirm_infobar_delegate.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 has_run_message_loop_ = true; | 123 has_run_message_loop_ = true; |
| 124 content::RunMessageLoop(); | 124 content::RunMessageLoop(); |
| 125 } | 125 } |
| 126 PersonalDataManagerFactory::GetForProfile(browser_->profile())-> | 126 PersonalDataManagerFactory::GetForProfile(browser_->profile())-> |
| 127 RemoveObserver(this); | 127 RemoveObserver(this); |
| 128 } | 128 } |
| 129 | 129 |
| 130 // PersonalDataManagerObserver: | 130 // PersonalDataManagerObserver: |
| 131 virtual void OnPersonalDataChanged() OVERRIDE { | 131 virtual void OnPersonalDataChanged() OVERRIDE { |
| 132 if (has_run_message_loop_) { | 132 if (has_run_message_loop_) { |
| 133 MessageLoopForUI::current()->Quit(); | 133 base::MessageLoopForUI::current()->Quit(); |
| 134 has_run_message_loop_ = false; | 134 has_run_message_loop_ = false; |
| 135 } | 135 } |
| 136 alerted_ = true; | 136 alerted_ = true; |
| 137 } | 137 } |
| 138 | 138 |
| 139 virtual void OnInsufficientFormData() OVERRIDE { | 139 virtual void OnInsufficientFormData() OVERRIDE { |
| 140 OnPersonalDataChanged(); | 140 OnPersonalDataChanged(); |
| 141 } | 141 } |
| 142 | 142 |
| 143 // content::NotificationObserver: | 143 // content::NotificationObserver: |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 SendKeyToPopupAndWait(ui::VKEY_DOWN); | 345 SendKeyToPopupAndWait(ui::VKEY_DOWN); |
| 346 | 346 |
| 347 // Press tab to accept the autofill suggestions. | 347 // Press tab to accept the autofill suggestions. |
| 348 SendKeyToPopupAndWait(ui::VKEY_TAB); | 348 SendKeyToPopupAndWait(ui::VKEY_TAB); |
| 349 | 349 |
| 350 // The form should be filled. | 350 // The form should be filled. |
| 351 ExpectFilledTestForm(); | 351 ExpectFilledTestForm(); |
| 352 } | 352 } |
| 353 | 353 |
| 354 } // namespace autofill | 354 } // namespace autofill |
| OLD | NEW |