summaryrefslogtreecommitdiffstats
path: root/content/shell/shell_browser_main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/shell/shell_browser_main.cc')
-rw-r--r--content/shell/shell_browser_main.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc
index 5a1755a..f1343d9 100644
--- a/content/shell/shell_browser_main.cc
+++ b/content/shell/shell_browser_main.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
+#include "base/threading/thread_restrictions.h"
#include "content/public/browser/browser_main_runner.h"
#include "content/shell/shell.h"
#include "content/shell/shell_browser_context.h"
@@ -31,7 +32,11 @@ GURL GetURLForLayoutTest(const char* test_name) {
}
// TODO(jochen): use pixel_hash and timeout.
GURL test_url = webkit_support::CreateURLForPathOrURL(path_or_url);
- webkit_support::SetCurrentDirectoryForFileURL(test_url);
+ {
+ // We're outside of the message loop here, and this is a test.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ webkit_support::SetCurrentDirectoryForFileURL(test_url);
+ }
return test_url;
}
@@ -69,7 +74,8 @@ int ShellBrowserMain(const content::MainFunctionParams& parameters) {
MSG_ROUTING_NONE,
NULL);
main_runner_->Run();
- // TODO(jochen): Figure out a way to close shell.
+
+ content::Shell::CloseAllWindows();
}
exit_code = 0;
} else {