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/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/history/history_service.h" | 9 #include "chrome/browser/history/history_service.h" |
10 #include "chrome/browser/history/history_service_factory.h" | 10 #include "chrome/browser/history/history_service_factory.h" |
11 #include "chrome/browser/history/history_types.h" | 11 #include "chrome/browser/history/history_types.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 #include "net/base/mock_host_resolver.h" | 16 #include "net/base/mock_host_resolver.h" |
17 | 17 |
18 namespace extensions { | 18 namespace extensions { |
19 | 19 |
20 class HistoryApiTest : public ExtensionApiTest { | 20 class HistoryApiTest : public ExtensionApiTest { |
21 public: | 21 public: |
22 virtual void SetUpInProcessBrowserTestFixture() { | 22 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
23 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); | 23 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); |
24 | 24 |
25 host_resolver()->AddRule("www.a.com", "127.0.0.1"); | 25 host_resolver()->AddRule("www.a.com", "127.0.0.1"); |
26 host_resolver()->AddRule("www.b.com", "127.0.0.1"); | 26 host_resolver()->AddRule("www.b.com", "127.0.0.1"); |
27 | 27 |
28 ASSERT_TRUE(StartTestServer()); | 28 ASSERT_TRUE(StartTestServer()); |
29 } | 29 } |
30 | 30 |
31 virtual void SetUpCommandLine(CommandLine* command_line) { | 31 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
32 ExtensionApiTest::SetUpCommandLine(command_line); | 32 ExtensionApiTest::SetUpCommandLine(command_line); |
33 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | 33 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
34 } | 34 } |
35 }; | 35 }; |
36 | 36 |
37 // Full text search indexing sometimes exceeds a timeout. (http://crbug/119505) | 37 // Full text search indexing sometimes exceeds a timeout. (http://crbug/119505) |
38 IN_PROC_BROWSER_TEST_F(HistoryApiTest, DISABLED_MiscSearch) { | 38 IN_PROC_BROWSER_TEST_F(HistoryApiTest, DISABLED_MiscSearch) { |
39 ASSERT_TRUE(RunExtensionSubtest("history", "misc_search.html")) << message_; | 39 ASSERT_TRUE(RunExtensionSubtest("history", "misc_search.html")) << message_; |
40 } | 40 } |
41 | 41 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 hs->AddPage(picasa_url, picasa_time, NULL, 0, GURL(), history::RedirectList(), | 95 hs->AddPage(picasa_url, picasa_time, NULL, 0, GURL(), history::RedirectList(), |
96 content::PAGE_TRANSITION_TYPED, history::SOURCE_EXTENSION, false); | 96 content::PAGE_TRANSITION_TYPED, history::SOURCE_EXTENSION, false); |
97 hs->SetPageTitle(picasa_url, UTF8ToUTF16("Picasa")); | 97 hs->SetPageTitle(picasa_url, UTF8ToUTF16("Picasa")); |
98 | 98 |
99 // Run the test. | 99 // Run the test. |
100 ASSERT_TRUE(RunExtensionSubtest("history", "most_visited.html")) | 100 ASSERT_TRUE(RunExtensionSubtest("history", "most_visited.html")) |
101 << message_; | 101 << message_; |
102 } | 102 } |
103 | 103 |
104 } // namespace extensions | 104 } // namespace extensions |
OLD | NEW |