Return Windows error code when create-process fails.
[chromium-blink-merge.git] / chrome / renderer / searchbox / searchbox_extension_unittest.cc
blob61cafc5d6d8fc4662d454adcb59d8a17dc60fe5c
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
3 // found in the LICENSE file.
5 #include "base/basictypes.h"
6 #include "base/strings/utf_string_conversions.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "url/gurl.h"
10 namespace internal {
12 // Defined in searchbox_extension.cc
13 GURL ResolveURL(const GURL& current_url,
14 const base::string16& possibly_relative_url);
16 TEST(SearchboxExtensionTest, ResolveURL) {
17 EXPECT_EQ(GURL("http://www.google.com/"),
18 ResolveURL(GURL(""), base::ASCIIToUTF16("http://www.google.com")));
20 EXPECT_EQ(GURL("http://news.google.com/"),
21 ResolveURL(GURL("http://www.google.com"),
22 base::ASCIIToUTF16("http://news.google.com")));
24 EXPECT_EQ(GURL("http://www.google.com/hello?q=world"),
25 ResolveURL(GURL("http://www.google.com/foo?a=b"),
26 base::ASCIIToUTF16("hello?q=world")));
28 EXPECT_EQ(GURL("http://www.google.com:90/foo/hello?q=world"),
29 ResolveURL(GURL("http://www.google.com:90/"),
30 base::ASCIIToUTF16("foo/hello?q=world")));
33 } // namespace internal