| 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
|
|
|