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

Side by Side Diff: content/browser/browser_url_handler_impl_unittest.cc

Issue 18868005: content: Migrate from googleurl/ includes to url/ ones. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/browser_url_handler_impl.h" 5 #include "content/browser/browser_url_handler_impl.h"
6 #include "content/public/test/test_browser_context.h" 6 #include "content/public/test/test_browser_context.h"
7 #include "googleurl/src/gurl.h"
8 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "url/gurl.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 class BrowserURLHandlerImplTest : public testing::Test { 12 class BrowserURLHandlerImplTest : public testing::Test {
13 }; 13 };
14 14
15 // Test URL rewriter that rewrites all "foo://" URLs to "bar://bar". 15 // Test URL rewriter that rewrites all "foo://" URLs to "bar://bar".
16 static bool FooRewriter(GURL* url, BrowserContext* browser_context) { 16 static bool FooRewriter(GURL* url, BrowserContext* browser_context) {
17 if (url->scheme() == "foo") { 17 if (url->scheme() == "foo") {
18 *url = GURL("bar://bar"); 18 *url = GURL("bar://bar");
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 ASSERT_FALSE(reversed); 73 ASSERT_FALSE(reversed);
74 ASSERT_EQ(original_url, url); 74 ASSERT_EQ(original_url, url);
75 75
76 handler.AddHandlerPair(BrowserURLHandlerImpl::null_handler(), BarRewriter); 76 handler.AddHandlerPair(BrowserURLHandlerImpl::null_handler(), BarRewriter);
77 reversed = handler.ReverseURLRewrite(&url, original_url, &browser_context); 77 reversed = handler.ReverseURLRewrite(&url, original_url, &browser_context);
78 ASSERT_TRUE(reversed); 78 ASSERT_TRUE(reversed);
79 ASSERT_EQ("foo://foo", url.spec()); 79 ASSERT_EQ("foo://foo", url.spec());
80 } 80 }
81 81
82 } // namespace content 82 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_url_handler_impl.cc ('k') | content/browser/child_process_security_policy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698