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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 class WindowedPersonalDataManagerObserver : public PersonalDataManagerObserver { | 75 class WindowedPersonalDataManagerObserver : public PersonalDataManagerObserver { |
76 public: | 76 public: |
77 WindowedPersonalDataManagerObserver() : | 77 WindowedPersonalDataManagerObserver() : |
78 personal_data_changed_(false), | 78 personal_data_changed_(false), |
79 has_run_message_loop_(false) { | 79 has_run_message_loop_(false) { |
80 } | 80 } |
81 | 81 |
82 void Wait() { | 82 void Wait() { |
83 if (!personal_data_changed_) { | 83 if (!personal_data_changed_) { |
84 has_run_message_loop_ = true; | 84 has_run_message_loop_ = true; |
85 ui_test_utils::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 | 94 |
95 personal_data_changed_ = true; | 95 personal_data_changed_ = true; |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 // Once click the text field, it starts again. | 701 // Once click the text field, it starts again. |
702 ASSERT_TRUE(content::ExecuteJavaScript( | 702 ASSERT_TRUE(content::ExecuteJavaScript( |
703 render_view_host(), L"", | 703 render_view_host(), L"", |
704 L"cr.googleTranslate.onTranslateElementLoad();")); | 704 L"cr.googleTranslate.onTranslateElementLoad();")); |
705 | 705 |
706 // Simulate the render notifying the translation has been done. | 706 // Simulate the render notifying the translation has been done. |
707 translation_observer.Wait(); | 707 translation_observer.Wait(); |
708 | 708 |
709 TryBasicFormFill(); | 709 TryBasicFormFill(); |
710 } | 710 } |
OLD | NEW |