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

Side by Side Diff: chrome/renderer/searchbox/searchbox_extension_unittest.cc

Issue 105493002: Use base namespace for string16 in chrome/renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "url/gurl.h" 8 #include "url/gurl.h"
9 9
10 namespace internal { 10 namespace internal {
11 11
12 // Defined in searchbox_extension.cc 12 // Defined in searchbox_extension.cc
13 GURL ResolveURL(const GURL& current_url, const string16& possibly_relative_url); 13 GURL ResolveURL(const GURL& current_url,
14 const base::string16& possibly_relative_url);
14 15
15 TEST(SearchboxExtensionTest, ResolveURL) { 16 TEST(SearchboxExtensionTest, ResolveURL) {
16 EXPECT_EQ(GURL("http://www.google.com/"), 17 EXPECT_EQ(GURL("http://www.google.com/"),
17 ResolveURL(GURL(""), ASCIIToUTF16("http://www.google.com"))); 18 ResolveURL(GURL(""), ASCIIToUTF16("http://www.google.com")));
18 19
19 EXPECT_EQ(GURL("http://news.google.com/"), 20 EXPECT_EQ(GURL("http://news.google.com/"),
20 ResolveURL(GURL("http://www.google.com"), 21 ResolveURL(GURL("http://www.google.com"),
21 ASCIIToUTF16("http://news.google.com"))); 22 ASCIIToUTF16("http://news.google.com")));
22 23
23 EXPECT_EQ(GURL("http://www.google.com/hello?q=world"), 24 EXPECT_EQ(GURL("http://www.google.com/hello?q=world"),
24 ResolveURL(GURL("http://www.google.com/foo?a=b"), 25 ResolveURL(GURL("http://www.google.com/foo?a=b"),
25 ASCIIToUTF16("hello?q=world"))); 26 ASCIIToUTF16("hello?q=world")));
26 27
27 EXPECT_EQ(GURL("http://www.google.com:90/foo/hello?q=world"), 28 EXPECT_EQ(GURL("http://www.google.com:90/foo/hello?q=world"),
28 ResolveURL(GURL("http://www.google.com:90/"), 29 ResolveURL(GURL("http://www.google.com:90/"),
29 ASCIIToUTF16("foo/hello?q=world"))); 30 ASCIIToUTF16("foo/hello?q=world")));
30 } 31 }
31 32
32 } // namespace internal 33 } // namespace internal
OLDNEW
« no previous file with comments | « chrome/renderer/searchbox/searchbox_extension.cc ('k') | chrome/renderer/spellchecker/cocoa_spelling_engine_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698