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