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 <deque> | 5 #include <deque> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 2681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2692 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { | 2692 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { |
2693 PrerenderBrowserTest::TearDownInProcessBrowserTestFixture(); | 2693 PrerenderBrowserTest::TearDownInProcessBrowserTestFixture(); |
2694 ExtensionApiTest::TearDownInProcessBrowserTestFixture(); | 2694 ExtensionApiTest::TearDownInProcessBrowserTestFixture(); |
2695 } | 2695 } |
2696 | 2696 |
2697 virtual void SetUpOnMainThread() OVERRIDE { | 2697 virtual void SetUpOnMainThread() OVERRIDE { |
2698 PrerenderBrowserTest::SetUpOnMainThread(); | 2698 PrerenderBrowserTest::SetUpOnMainThread(); |
2699 } | 2699 } |
2700 }; | 2700 }; |
2701 | 2701 |
2702 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTestWithExtensions, WebNavigation) { | 2702 // http://crbug.com/177163 |
| 2703 #if defined(OS_WIN) && !defined(NDEBUG) |
| 2704 #define MAYBE_WebNavigation DISABLED_WebNavigation |
| 2705 #else |
| 2706 #define MAYBE_WebNavigation WebNavigation |
| 2707 #endif |
| 2708 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTestWithExtensions, |
| 2709 MAYBE_WebNavigation) { |
2703 ASSERT_TRUE(StartTestServer()); | 2710 ASSERT_TRUE(StartTestServer()); |
2704 extensions::FrameNavigationState::set_allow_extension_scheme(true); | 2711 extensions::FrameNavigationState::set_allow_extension_scheme(true); |
2705 | 2712 |
2706 CommandLine::ForCurrentProcess()->AppendSwitch( | 2713 CommandLine::ForCurrentProcess()->AppendSwitch( |
2707 switches::kAllowLegacyExtensionManifests); | 2714 switches::kAllowLegacyExtensionManifests); |
2708 | 2715 |
2709 // Wait for the extension to set itself up and return control to us. | 2716 // Wait for the extension to set itself up and return control to us. |
2710 ASSERT_TRUE( | 2717 ASSERT_TRUE( |
2711 RunExtensionSubtest("webnavigation", "test_prerender.html")) << message_; | 2718 RunExtensionSubtest("webnavigation", "test_prerender.html")) << message_; |
2712 | 2719 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2788 // Checks that non-http/https main page redirects cancel the prerender. | 2795 // Checks that non-http/https main page redirects cancel the prerender. |
2789 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, | 2796 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, |
2790 PrerenderCancelMainFrameRedirectUnsupportedScheme) { | 2797 PrerenderCancelMainFrameRedirectUnsupportedScheme) { |
2791 GURL url = test_server()->GetURL( | 2798 GURL url = test_server()->GetURL( |
2792 CreateServerRedirect("invalidscheme://www.google.com/test.html")); | 2799 CreateServerRedirect("invalidscheme://www.google.com/test.html")); |
2793 PrerenderTestURL(url, FINAL_STATUS_UNSUPPORTED_SCHEME, 1); | 2800 PrerenderTestURL(url, FINAL_STATUS_UNSUPPORTED_SCHEME, 1); |
2794 NavigateToDestURL(); | 2801 NavigateToDestURL(); |
2795 } | 2802 } |
2796 | 2803 |
2797 } // namespace prerender | 2804 } // namespace prerender |
OLD | NEW |