OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base_switches.h" | 5 #include "base/base_switches.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/history/history_service.h" | 10 #include "chrome/browser/history/history_service.h" |
11 #include "chrome/browser/history/history_service_factory.h" | 11 #include "chrome/browser/history/history_service_factory.h" |
12 #include "chrome/browser/history/history_types.h" | 12 #include "chrome/browser/history/history_types.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
18 #include "net/base/mock_host_resolver.h" | 18 #include "net/dns/mock_host_resolver.h" |
19 | 19 |
20 namespace extensions { | 20 namespace extensions { |
21 | 21 |
22 class HistoryApiTest : public ExtensionApiTest { | 22 class HistoryApiTest : public ExtensionApiTest { |
23 public: | 23 public: |
24 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 24 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
25 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); | 25 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); |
26 | 26 |
27 host_resolver()->AddRule("www.a.com", "127.0.0.1"); | 27 host_resolver()->AddRule("www.a.com", "127.0.0.1"); |
28 host_resolver()->AddRule("www.b.com", "127.0.0.1"); | 28 host_resolver()->AddRule("www.b.com", "127.0.0.1"); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 hs->AddPage(picasa_url, picasa_time, NULL, 0, GURL(), history::RedirectList(), | 104 hs->AddPage(picasa_url, picasa_time, NULL, 0, GURL(), history::RedirectList(), |
105 content::PAGE_TRANSITION_TYPED, history::SOURCE_EXTENSION, false); | 105 content::PAGE_TRANSITION_TYPED, history::SOURCE_EXTENSION, false); |
106 hs->SetPageTitle(picasa_url, UTF8ToUTF16("Picasa")); | 106 hs->SetPageTitle(picasa_url, UTF8ToUTF16("Picasa")); |
107 | 107 |
108 // Run the test. | 108 // Run the test. |
109 ASSERT_TRUE(RunExtensionSubtest("history", "most_visited.html")) | 109 ASSERT_TRUE(RunExtensionSubtest("history", "most_visited.html")) |
110 << message_; | 110 << message_; |
111 } | 111 } |
112 | 112 |
113 } // namespace extensions | 113 } // namespace extensions |
OLD | NEW |