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

Unified Diff: shell/url_resolver_unittest.cc

Issue 868283006: Rename MojoURLResolver to URLResolver (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix test Created 5 years, 10 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 | « shell/url_resolver.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/url_resolver_unittest.cc
diff --git a/shell/mojo_url_resolver_unittest.cc b/shell/url_resolver_unittest.cc
similarity index 63%
rename from shell/mojo_url_resolver_unittest.cc
rename to shell/url_resolver_unittest.cc
index 77d97dba1615d429711bd63bc7b2e00afd04eec2..1f9df8b98b1035dc652217c1f77938b533d86e0e 100644
--- a/shell/mojo_url_resolver_unittest.cc
+++ b/shell/url_resolver_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "shell/mojo_url_resolver.h"
+#include "shell/url_resolver.h"
#include "base/logging.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -12,14 +12,15 @@ namespace shell {
namespace test {
namespace {
-typedef testing::Test MojoURLResolverTest;
+typedef testing::Test URLResolverTest;
-TEST_F(MojoURLResolverTest, MojoURLsFallThrough) {
- MojoURLResolver resolver;
- resolver.AddCustomMapping(GURL("mojo:test"), GURL("mojo:foo"));
+TEST_F(URLResolverTest, MojoURLsFallThrough) {
+ URLResolver resolver;
+ resolver.AddURLMapping(GURL("mojo:test"), GURL("mojo:foo"));
const GURL base_url("file:/base");
- resolver.SetBaseURL(base_url);
- std::string resolved(resolver.Resolve(GURL("mojo:test")).spec());
+ resolver.SetMojoBaseURL(base_url);
+ GURL mapped_url = resolver.ApplyURLMappings(GURL("mojo:test"));
+ std::string resolved(resolver.ResolveMojoURL(mapped_url).spec());
// Resolved must start with |base_url|.
EXPECT_EQ(base_url.spec(), resolved.substr(0, base_url.spec().size()));
// And must contain foo.
« no previous file with comments | « shell/url_resolver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698