Index: mojo/shell/shell_test_helper.cc |
diff --git a/mojo/shell/shell_test_helper.cc b/mojo/shell/shell_test_helper.cc |
index 5bf83ab7e3e939807abdc4cce94e3fd14a631f6d..f79e512faf9a26478c86d7d91eb620b3b35a8ba4 100644 |
--- a/mojo/shell/shell_test_helper.cc |
+++ b/mojo/shell/shell_test_helper.cc |
@@ -5,8 +5,12 @@ |
#include "mojo/shell/shell_test_helper.h" |
#include "base/command_line.h" |
+#include "base/file_util.h" |
+#include "base/files/file_path.h" |
#include "base/logging.h" |
+#include "base/path_service.h" |
#include "mojo/shell/init.h" |
+#include "net/base/filename_util.h" |
namespace mojo { |
namespace shell { |
@@ -22,6 +26,10 @@ ShellTestHelper::~ShellTestHelper() { |
void ShellTestHelper::Init() { |
context_.reset(new Context); |
test_api_.reset(new ServiceManager::TestAPI(context_->service_manager())); |
+ base::FilePath service_dir; |
+ CHECK(PathService::Get(base::DIR_MODULE, &service_dir)); |
+ context_->mojo_url_resolver()->set_origin( |
+ net::FilePathToFileURL(service_dir).spec()); |
} |
void ShellTestHelper::SetLoaderForURL(scoped_ptr<ServiceLoader> loader, |