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

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

Issue 7616019: Reorganize chrome/test, part #9 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 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 "chrome/test/base/testing_browser_process_test.h"
5 #include "chrome/test/base/testing_profile.h" 6 #include "chrome/test/base/testing_profile.h"
6 #include "chrome/test/testing_browser_process_test.h"
7 #include "content/browser/browser_url_handler.h" 7 #include "content/browser/browser_url_handler.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 class BrowserURLHandlerTest : public TestingBrowserProcessTest { 11 class BrowserURLHandlerTest : public TestingBrowserProcessTest {
12 }; 12 };
13 13
14 // Test URL rewriter that rewrites all "foo://" URLs to "bar://bar". 14 // Test URL rewriter that rewrites all "foo://" URLs to "bar://bar".
15 static bool FooRewriter(GURL* url, content::BrowserContext* browser_context) { 15 static bool FooRewriter(GURL* url, content::BrowserContext* browser_context) {
16 if (url->scheme() == "foo") { 16 if (url->scheme() == "foo") {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 handler.AddHandlerPair(BrowserURLHandler::null_handler(), FooRewriter); 66 handler.AddHandlerPair(BrowserURLHandler::null_handler(), FooRewriter);
67 bool reversed = handler.ReverseURLRewrite(&url, original_url, &profile); 67 bool reversed = handler.ReverseURLRewrite(&url, original_url, &profile);
68 ASSERT_FALSE(reversed); 68 ASSERT_FALSE(reversed);
69 ASSERT_EQ(original_url, url); 69 ASSERT_EQ(original_url, url);
70 70
71 handler.AddHandlerPair(BrowserURLHandler::null_handler(), BarRewriter); 71 handler.AddHandlerPair(BrowserURLHandler::null_handler(), BarRewriter);
72 reversed = handler.ReverseURLRewrite(&url, original_url, &profile); 72 reversed = handler.ReverseURLRewrite(&url, original_url, &profile);
73 ASSERT_TRUE(reversed); 73 ASSERT_TRUE(reversed);
74 ASSERT_EQ("foo://foo", url.spec()); 74 ASSERT_EQ("foo://foo", url.spec());
75 } 75 }
OLDNEW
« no previous file with comments | « content/browser/appcache/chrome_appcache_service_unittest.cc ('k') | content/browser/download/mhtml_generation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698