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

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

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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"
6 #include "base/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
7 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
8 #include "url/gurl.h" 7 #include "url/gurl.h"
9 8
10 namespace internal { 9 namespace internal {
11 10
12 // Defined in searchbox_extension.cc 11 // Defined in searchbox_extension.cc
13 GURL ResolveURL(const GURL& current_url, 12 GURL ResolveURL(const GURL& current_url,
14 const base::string16& possibly_relative_url); 13 const base::string16& possibly_relative_url);
15 14
16 TEST(SearchboxExtensionTest, ResolveURL) { 15 TEST(SearchboxExtensionTest, ResolveURL) {
17 EXPECT_EQ(GURL("http://www.google.com/"), 16 EXPECT_EQ(GURL("http://www.google.com/"),
18 ResolveURL(GURL(""), base::ASCIIToUTF16("http://www.google.com"))); 17 ResolveURL(GURL(""), base::ASCIIToUTF16("http://www.google.com")));
19 18
20 EXPECT_EQ(GURL("http://news.google.com/"), 19 EXPECT_EQ(GURL("http://news.google.com/"),
21 ResolveURL(GURL("http://www.google.com"), 20 ResolveURL(GURL("http://www.google.com"),
22 base::ASCIIToUTF16("http://news.google.com"))); 21 base::ASCIIToUTF16("http://news.google.com")));
23 22
24 EXPECT_EQ(GURL("http://www.google.com/hello?q=world"), 23 EXPECT_EQ(GURL("http://www.google.com/hello?q=world"),
25 ResolveURL(GURL("http://www.google.com/foo?a=b"), 24 ResolveURL(GURL("http://www.google.com/foo?a=b"),
26 base::ASCIIToUTF16("hello?q=world"))); 25 base::ASCIIToUTF16("hello?q=world")));
27 26
28 EXPECT_EQ(GURL("http://www.google.com:90/foo/hello?q=world"), 27 EXPECT_EQ(GURL("http://www.google.com:90/foo/hello?q=world"),
29 ResolveURL(GURL("http://www.google.com:90/"), 28 ResolveURL(GURL("http://www.google.com:90/"),
30 base::ASCIIToUTF16("foo/hello?q=world"))); 29 base::ASCIIToUTF16("foo/hello?q=world")));
31 } 30 }
32 31
33 } // namespace internal 32 } // namespace internal
OLDNEW
« no previous file with comments | « chrome/renderer/searchbox/searchbox_extension.cc ('k') | chrome/renderer/searchbox/searchbox_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698