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

Unified Diff: content/test/content_browser_test_utils.cc

Issue 10806056: Move plugin_browsertests.cc from browser_tests to content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to mac+win fixes 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 side-by-side diff with in-line comments
Download patch
Index: content/test/content_browser_test_utils.cc
===================================================================
--- content/test/content_browser_test_utils.cc (revision 147965)
+++ content/test/content_browser_test_utils.cc (working copy)
@@ -15,6 +15,7 @@
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
#include "content/shell/shell.h"
+#include "content/shell/shell_javascript_dialog_creator.h"
#include "net/base/net_util.h"
namespace content {
@@ -45,4 +46,14 @@
GetQuitTaskForRunLoop(&run_loop));
}
+void WaitForAppModalDialog(Shell* window) {
+ ShellJavaScriptDialogCreator* dialog_creator =
+ static_cast<ShellJavaScriptDialogCreator*>(
+ window->GetJavaScriptDialogCreator());
+
+ scoped_refptr<MessageLoopRunner> runner = new MessageLoopRunner();
+ dialog_creator->set_dialog_request_callback(runner->QuitClosure());
+ runner->Run();
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698