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

Unified Diff: mojo/runner/native_runner_unittest.cc

Issue 1274433003: Add GetMimeTypeFromFile to Mojo's network service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix string usage and NativeApplicationLoaderTest. Created 5 years, 4 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
« no previous file with comments | « no previous file | mojo/services/network/network_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/runner/native_runner_unittest.cc
diff --git a/mojo/runner/native_runner_unittest.cc b/mojo/runner/native_runner_unittest.cc
index 896f0ef53335bb38f9bd200bbdd295b6c32460f8..f7176423bf2fd9ce7ad279471459038ba3dadbb8 100644
--- a/mojo/runner/native_runner_unittest.cc
+++ b/mojo/runner/native_runner_unittest.cc
@@ -4,6 +4,7 @@
#include "base/files/scoped_temp_dir.h"
#include "mojo/runner/context.h"
+#include "mojo/runner/url_resolver.h"
#include "mojo/shell/application_manager.h"
#include "mojo/util/filename_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -30,7 +31,8 @@ class TestNativeRunner : public shell::NativeRunner {
}
~TestNativeRunner() override {
state_->runner_was_destroyed = true;
- base::MessageLoop::current()->Quit();
+ if (base::MessageLoop::current()->is_running())
+ base::MessageLoop::current()->Quit();
}
void Start(const base::FilePath& app_path,
bool start_sandboxed,
@@ -79,8 +81,12 @@ class NativeApplicationLoaderTest : public testing::Test,
private:
// shell::ApplicationManager::Delegate
- GURL ResolveMappings(const GURL& url) override { return url; }
- GURL ResolveMojoURL(const GURL& url) override { return url; }
+ GURL ResolveMappings(const GURL& url) override {
+ return context_.url_resolver()->ApplyMappings(url);
+ }
+ GURL ResolveMojoURL(const GURL& url) override {
+ return context_.url_resolver()->ResolveMojoURL(url);
+ }
bool CreateFetcher(
const GURL& url,
const shell::Fetcher::FetchCallback& loader_callback) override {
« no previous file with comments | « no previous file | mojo/services/network/network_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698