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

Side by Side Diff: chrome/test/base/test_web_dialog_observer.cc

Issue 10807047: Create content\public\test\test_utils.h to hold common test classes that are used by unit and brows… (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 | « chrome/test/base/test_web_dialog_observer.h ('k') | chrome/test/base/testing_profile.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 "chrome/test/base/test_web_dialog_observer.h" 5 #include "chrome/test/base/test_web_dialog_observer.h"
6 6
7 #include "chrome/test/base/ui_test_utils.h" 7 #include "chrome/test/base/ui_test_utils.h"
8 #include "content/public/browser/notification_service.h" 8 #include "content/public/browser/notification_service.h"
9 #include "content/public/browser/navigation_controller.h" 9 #include "content/public/browser/navigation_controller.h"
10 #include "content/public/browser/notification_details.h" 10 #include "content/public/browser/notification_details.h"
11 #include "content/public/browser/notification_source.h" 11 #include "content/public/browser/notification_source.h"
12 #include "content/public/browser/notification_types.h" 12 #include "content/public/browser/notification_types.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "content/public/browser/web_ui.h" 14 #include "content/public/browser/web_ui.h"
15 #include "content/public/test/js_injection_ready_observer.h" 15 #include "content/public/test/js_injection_ready_observer.h"
16 #include "content/public/test/test_utils.h"
16 17
17 using content::NavigationController; 18 using content::NavigationController;
18 19
19 TestWebDialogObserver::TestWebDialogObserver( 20 TestWebDialogObserver::TestWebDialogObserver(
20 content::JsInjectionReadyObserver* js_injection_ready_observer) 21 content::JsInjectionReadyObserver* js_injection_ready_observer)
21 : js_injection_ready_observer_(js_injection_ready_observer), 22 : js_injection_ready_observer_(js_injection_ready_observer),
22 web_ui_(NULL), 23 web_ui_(NULL),
23 done_(false), 24 done_(false),
24 running_(false) { 25 running_(false) {
25 } 26 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // navigate in this method, ensuring that this is not a race condition. 67 // navigate in this method, ensuring that this is not a race condition.
67 registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, 68 registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
68 content::Source<NavigationController>( 69 content::Source<NavigationController>(
69 &web_ui_->GetWebContents()->GetController())); 70 &web_ui_->GetWebContents()->GetController()));
70 } 71 }
71 72
72 content::WebUI* TestWebDialogObserver::GetWebUI() { 73 content::WebUI* TestWebDialogObserver::GetWebUI() {
73 if (!done_) { 74 if (!done_) {
74 EXPECT_FALSE(running_); 75 EXPECT_FALSE(running_);
75 running_ = true; 76 running_ = true;
76 message_loop_runner_ = new ui_test_utils::MessageLoopRunner; 77 message_loop_runner_ = new content::MessageLoopRunner;
77 message_loop_runner_->Run(); 78 message_loop_runner_->Run();
78 } 79 }
79 return web_ui_; 80 return web_ui_;
80 } 81 }
OLDNEW
« no previous file with comments | « chrome/test/base/test_web_dialog_observer.h ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698