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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 has_run_message_loop_ = true; | 84 has_run_message_loop_ = true; |
85 content::RunMessageLoop(); | 85 content::RunMessageLoop(); |
86 } | 86 } |
87 } | 87 } |
88 | 88 |
89 void OnPersonalDataChanged() OVERRIDE { | 89 void OnPersonalDataChanged() OVERRIDE { |
90 if (has_run_message_loop_) { | 90 if (has_run_message_loop_) { |
91 MessageLoopForUI::current()->Quit(); | 91 MessageLoopForUI::current()->Quit(); |
92 has_run_message_loop_ = false; | 92 has_run_message_loop_ = false; |
93 } | 93 } |
94 | |
95 personal_data_changed_ = true; | 94 personal_data_changed_ = true; |
96 } | 95 } |
97 | 96 |
98 private: | 97 private: |
99 bool personal_data_changed_; | 98 bool personal_data_changed_; |
100 bool has_run_message_loop_; | 99 bool has_run_message_loop_; |
101 }; | 100 }; |
102 | 101 |
103 class AutofillTest : public InProcessBrowserTest { | 102 class AutofillTest : public InProcessBrowserTest { |
104 protected: | 103 protected: |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 // Once click the text field, it starts again. | 700 // Once click the text field, it starts again. |
702 ASSERT_TRUE(content::ExecuteJavaScript( | 701 ASSERT_TRUE(content::ExecuteJavaScript( |
703 render_view_host(), L"", | 702 render_view_host(), L"", |
704 L"cr.googleTranslate.onTranslateElementLoad();")); | 703 L"cr.googleTranslate.onTranslateElementLoad();")); |
705 | 704 |
706 // Simulate the render notifying the translation has been done. | 705 // Simulate the render notifying the translation has been done. |
707 translation_observer.Wait(); | 706 translation_observer.Wait(); |
708 | 707 |
709 TryBasicFormFill(); | 708 TryBasicFormFill(); |
710 } | 709 } |
OLD | NEW |