OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
8 #include "net/base/mock_host_resolver.h" | 8 #include "net/base/mock_host_resolver.h" |
9 | 9 |
10 class ExtensionHistoryApiTest : public ExtensionApiTest { | 10 class HistoryExtensionApiTest : public ExtensionApiTest { |
11 public: | 11 public: |
12 virtual void SetUpInProcessBrowserTestFixture() { | 12 virtual void SetUpInProcessBrowserTestFixture() { |
13 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); | 13 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); |
14 | 14 |
15 host_resolver()->AddRule("www.a.com", "127.0.0.1"); | 15 host_resolver()->AddRule("www.a.com", "127.0.0.1"); |
16 host_resolver()->AddRule("www.b.com", "127.0.0.1"); | 16 host_resolver()->AddRule("www.b.com", "127.0.0.1"); |
17 | 17 |
18 ASSERT_TRUE(StartTestServer()); | 18 ASSERT_TRUE(StartTestServer()); |
19 } | 19 } |
20 }; | 20 }; |
21 | 21 |
22 // Full text search indexing sometimes exceeds a timeout. | 22 // Full text search indexing sometimes exceeds a timeout. |
23 // Fix this as part of crbug/76170. | 23 // Fix this as part of crbug/76170. |
24 IN_PROC_BROWSER_TEST_F(ExtensionHistoryApiTest, DISABLED_MiscSearch) { | 24 IN_PROC_BROWSER_TEST_F(HistoryExtensionApiTest, DISABLED_MiscSearch) { |
25 ASSERT_TRUE(RunExtensionSubtest("history", "misc_search.html")) << message_; | 25 ASSERT_TRUE(RunExtensionSubtest("history", "misc_search.html")) << message_; |
26 } | 26 } |
27 | 27 |
28 IN_PROC_BROWSER_TEST_F(ExtensionHistoryApiTest, TimedSearch) { | 28 IN_PROC_BROWSER_TEST_F(HistoryExtensionApiTest, TimedSearch) { |
29 ASSERT_TRUE(RunExtensionSubtest("history", "timed_search.html")) << message_; | 29 ASSERT_TRUE(RunExtensionSubtest("history", "timed_search.html")) << message_; |
30 } | 30 } |
31 | 31 |
32 #if defined(OS_WIN) | 32 #if defined(OS_WIN) |
33 // Flakily times out on Win - See http://crbug.com/88318 | 33 // Flakily times out on Win - See http://crbug.com/88318 |
34 #define MAYBE_Delete FLAKY_Delete | 34 #define MAYBE_Delete FLAKY_Delete |
35 #else | 35 #else |
36 #define MAYBE_Delete Delete | 36 #define MAYBE_Delete Delete |
37 #endif | 37 #endif |
38 IN_PROC_BROWSER_TEST_F(ExtensionHistoryApiTest, MAYBE_Delete) { | 38 IN_PROC_BROWSER_TEST_F(HistoryExtensionApiTest, MAYBE_Delete) { |
39 ASSERT_TRUE(RunExtensionSubtest("history", "delete.html")) << message_; | 39 ASSERT_TRUE(RunExtensionSubtest("history", "delete.html")) << message_; |
40 } | 40 } |
41 | 41 |
42 // See crbug.com/79074 | 42 // See crbug.com/79074 |
43 IN_PROC_BROWSER_TEST_F(ExtensionHistoryApiTest, FLAKY_GetVisits) { | 43 IN_PROC_BROWSER_TEST_F(HistoryExtensionApiTest, FLAKY_GetVisits) { |
44 ASSERT_TRUE(RunExtensionSubtest("history", "get_visits.html")) << message_; | 44 ASSERT_TRUE(RunExtensionSubtest("history", "get_visits.html")) << message_; |
45 } | 45 } |
46 | 46 |
47 #if defined(OS_WIN) | 47 #if defined(OS_WIN) |
48 // Searching for a URL right after adding it fails on win XP. | 48 // Searching for a URL right after adding it fails on win XP. |
49 // Fix this as part of crbug/76170. | 49 // Fix this as part of crbug/76170. |
50 #define MAYBE_SearchAfterAdd FLAKY_SearchAfterAdd | 50 #define MAYBE_SearchAfterAdd FLAKY_SearchAfterAdd |
51 #else | 51 #else |
52 #define MAYBE_SearchAfterAdd SearchAfterAdd | 52 #define MAYBE_SearchAfterAdd SearchAfterAdd |
53 #endif | 53 #endif |
54 | 54 |
55 IN_PROC_BROWSER_TEST_F(ExtensionHistoryApiTest, MAYBE_SearchAfterAdd) { | 55 IN_PROC_BROWSER_TEST_F(HistoryExtensionApiTest, MAYBE_SearchAfterAdd) { |
56 ASSERT_TRUE(RunExtensionSubtest("history", "search_after_add.html")) | 56 ASSERT_TRUE(RunExtensionSubtest("history", "search_after_add.html")) |
57 << message_; | 57 << message_; |
58 } | 58 } |
OLD | NEW |