Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: chrome/browser/autofill/autofill_browsertest.cc

Issue 10822030: Move ui_test_utils::RunMessageLoop to test_utils so that it can be reused by content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/automation/automation_tab_helper_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/automation_tab_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698