This source file includes following definitions.
- TEST
#include "base/basictypes.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace internal {
GURL ResolveURL(const GURL& current_url,
const base::string16& possibly_relative_url);
TEST(SearchboxExtensionTest, ResolveURL) {
EXPECT_EQ(GURL("http://www.google.com/"),
ResolveURL(GURL(""), base::ASCIIToUTF16("http://www.google.com")));
EXPECT_EQ(GURL("http://news.google.com/"),
ResolveURL(GURL("http://www.google.com"),
base::ASCIIToUTF16("http://news.google.com")));
EXPECT_EQ(GURL("http://www.google.com/hello?q=world"),
ResolveURL(GURL("http://www.google.com/foo?a=b"),
base::ASCIIToUTF16("hello?q=world")));
EXPECT_EQ(GURL("http://www.google.com:90/foo/hello?q=world"),
ResolveURL(GURL("http://www.google.com:90/"),
base::ASCIIToUTF16("foo/hello?q=world")));
}
}