Index: chrome/browser/autofill/autofill_uitest_util.h |
diff --git a/chrome/browser/autofill/autofill_uitest_util.h b/chrome/browser/autofill/autofill_uitest_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1e43666643e86e54bab975ddd7a5b30324e3f262 |
--- /dev/null |
+++ b/chrome/browser/autofill/autofill_uitest_util.h |
@@ -0,0 +1,49 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_UITEST_UTIL_H_ |
+#define CHROME_BROWSER_AUTOFILL_AUTOFILL_UITEST_UTIL_H_ |
+ |
+#include "chrome/browser/infobars/infobar_service.h" |
+#include "components/autofill/core/browser/personal_data_manager_observer.h" |
+#include "components/infobars/core/confirm_infobar_delegate.h" |
+#include "components/infobars/core/infobar.h" |
+ |
+class Browser; |
+ |
+namespace autofill { |
+ |
+class PersonalDataManager; |
+ |
+class WindowedPersonalDataManagerObserver |
Evan Stade
2015/01/29 22:20:11
I don't understand what "Windowed" means in this c
bondd
2015/01/30 04:10:35
Done. Moved it to cc file and added class-level co
|
+ : public PersonalDataManagerObserver, |
+ public infobars::InfoBarManager::Observer { |
+ public: |
+ explicit WindowedPersonalDataManagerObserver(Browser* browser); |
+ ~WindowedPersonalDataManagerObserver() override; |
+ |
+ // PersonalDataManagerObserver: |
+ void OnPersonalDataChanged() override; |
+ void OnInsufficientFormData() override; |
+ |
+ void Wait(); |
+ |
+ private: |
+ // infobars::InfoBarManager::Observer: |
+ void OnInfoBarAdded(infobars::InfoBar* infobar) override; |
+ |
+ bool alerted_; |
+ bool has_run_message_loop_; |
+ Browser* browser_; |
+ InfoBarService* infobar_service_; |
Evan Stade
2015/01/29 22:20:11
forward declare this instead of including
bondd
2015/01/30 04:10:35
Acknowledged. No longer necessary after moving cla
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(WindowedPersonalDataManagerObserver); |
+}; |
+ |
+PersonalDataManager* GetPersonalDataManager(Browser* browser); |
+void CreateTestProfile(Browser* browser); |
+ |
+} // namespace autofill |
+ |
+#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_UITEST_UTIL_H_ |