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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #if defined(OS_MACOSX) | 7 #if defined(OS_MACOSX) |
8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #endif | 9 #endif |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #else | 51 #else |
52 #define MAYBE_ApiTests ApiTests | 52 #define MAYBE_ApiTests ApiTests |
53 #endif | 53 #endif |
54 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_ApiTests) { | 54 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_ApiTests) { |
55 #if defined(OS_WIN) && defined(USE_ASH) | 55 #if defined(OS_WIN) && defined(USE_ASH) |
56 // Disable this test in Metro+Ash for now (http://crbug.com/262796). | 56 // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
57 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 57 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
58 return; | 58 return; |
59 #endif | 59 #endif |
60 | 60 |
61 extensions::FeatureSwitch::ScopedOverride tab_capture( | |
62 extensions::FeatureSwitch::tab_capture(), true); | |
63 | |
64 #if defined(OS_WIN) | 61 #if defined(OS_WIN) |
65 // TODO(justinlin): Disabled for WinXP due to timeout issues. | 62 // TODO(justinlin): Disabled for WinXP due to timeout issues. |
66 if (base::win::GetVersion() < base::win::VERSION_VISTA) { | 63 if (base::win::GetVersion() < base::win::VERSION_VISTA) { |
67 return; | 64 return; |
68 } | 65 } |
69 #endif | 66 #endif |
70 | 67 |
71 AddExtensionToCommandLineWhitelist(); | 68 AddExtensionToCommandLineWhitelist(); |
72 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental", | 69 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental", |
73 "api_tests.html")) << message_; | 70 "api_tests.html")) << message_; |
74 } | 71 } |
75 | 72 |
76 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, ApiTestsAudio) { | 73 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, ApiTestsAudio) { |
77 extensions::FeatureSwitch::ScopedOverride tab_capture( | |
78 extensions::FeatureSwitch::tab_capture(), true); | |
79 | |
80 #if defined(OS_WIN) | 74 #if defined(OS_WIN) |
81 // TODO(justinlin): Disabled for WinXP due to timeout issues. | 75 // TODO(justinlin): Disabled for WinXP due to timeout issues. |
82 if (base::win::GetVersion() < base::win::VERSION_VISTA) { | 76 if (base::win::GetVersion() < base::win::VERSION_VISTA) { |
83 return; | 77 return; |
84 } | 78 } |
85 #endif | 79 #endif |
86 | 80 |
87 AddExtensionToCommandLineWhitelist(); | 81 AddExtensionToCommandLineWhitelist(); |
88 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental", | 82 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental", |
89 "api_tests_audio.html")) << message_; | 83 "api_tests_audio.html")) << message_; |
90 } | 84 } |
91 | 85 |
92 // http://crbug.com/177163 | 86 // http://crbug.com/177163 |
93 #if defined(OS_WIN) && !defined(NDEBUG) | 87 #if defined(OS_WIN) && !defined(NDEBUG) |
94 #define MAYBE_EndToEnd DISABLED_EndToEnd | 88 #define MAYBE_EndToEnd DISABLED_EndToEnd |
95 #else | 89 #else |
96 #define MAYBE_EndToEnd EndToEnd | 90 #define MAYBE_EndToEnd EndToEnd |
97 #endif | 91 #endif |
98 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_EndToEnd) { | 92 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_EndToEnd) { |
99 extensions::FeatureSwitch::ScopedOverride tab_capture( | |
100 extensions::FeatureSwitch::tab_capture(), true); | |
101 | |
102 #if defined(OS_WIN) | 93 #if defined(OS_WIN) |
103 // TODO(justinlin): Disabled for WinXP due to timeout issues. | 94 // TODO(justinlin): Disabled for WinXP due to timeout issues. |
104 if (base::win::GetVersion() < base::win::VERSION_VISTA) { | 95 if (base::win::GetVersion() < base::win::VERSION_VISTA) { |
105 return; | 96 return; |
106 } | 97 } |
107 #endif | 98 #endif |
108 #if defined(OS_MACOSX) | 99 #if defined(OS_MACOSX) |
109 // TODO(miu): Disabled for Mac OS X 10.6 due to timeout issues. | 100 // TODO(miu): Disabled for Mac OS X 10.6 due to timeout issues. |
110 // http://crbug.com/174640 | 101 // http://crbug.com/174640 |
111 if (base::mac::IsOSSnowLeopard()) | 102 if (base::mac::IsOSSnowLeopard()) |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 browser()->fullscreen_controller()->ToggleFullscreenModeForTab(web_contents, | 236 browser()->fullscreen_controller()->ToggleFullscreenModeForTab(web_contents, |
246 false); | 237 false); |
247 fullscreen_entered.Reply(""); | 238 fullscreen_entered.Reply(""); |
248 | 239 |
249 ResultCatcher catcher; | 240 ResultCatcher catcher; |
250 catcher.RestrictToProfile(browser()->profile()); | 241 catcher.RestrictToProfile(browser()->profile()); |
251 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 242 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
252 } | 243 } |
253 | 244 |
254 } // namespace chrome | 245 } // namespace chrome |
OLD | NEW |