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 27 matching lines...) Expand all Loading... |
38 TabCaptureApiTest() {} | 38 TabCaptureApiTest() {} |
39 | 39 |
40 void AddExtensionToCommandLineWhitelist() { | 40 void AddExtensionToCommandLineWhitelist() { |
41 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 41 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
42 switches::kWhitelistedExtensionID, kExtensionId); | 42 switches::kWhitelistedExtensionID, kExtensionId); |
43 } | 43 } |
44 }; | 44 }; |
45 | 45 |
46 } // namespace | 46 } // namespace |
47 | 47 |
48 // http://crbug.com/261493 | 48 // http://crbug.com/261493 and http://crbug.com/268644 |
49 #if defined(OS_LINUX) || defined(OS_CHROMEOS) | 49 #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(USE_AURA) |
50 #define MAYBE_ApiTests DISABLED_ApiTests | 50 #define MAYBE_ApiTests DISABLED_ApiTests |
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( | 61 extensions::FeatureSwitch::ScopedOverride tab_capture( |
62 extensions::FeatureSwitch::tab_capture(), true); | 62 extensions::FeatureSwitch::tab_capture(), true); |
63 | 63 |
64 #if defined(OS_WIN) | 64 #if defined(OS_WIN) |
65 // TODO(justinlin): Disabled for WinXP due to timeout issues. | 65 // TODO(justinlin): Disabled for WinXP due to timeout issues. |
66 if (base::win::GetVersion() < base::win::VERSION_VISTA) { | 66 if (base::win::GetVersion() < base::win::VERSION_VISTA) { |
67 return; | 67 return; |
68 } | 68 } |
69 #endif | 69 #endif |
70 | 70 |
71 AddExtensionToCommandLineWhitelist(); | 71 AddExtensionToCommandLineWhitelist(); |
72 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental", | 72 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental", |
73 "api_tests.html")) << message_; | 73 "api_tests.html")) << message_; |
74 } | 74 } |
75 | 75 |
76 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, ApiTestsAudio) { | 76 // http://crbug.com/268644 |
| 77 #if defined(USE_AURA) |
| 78 #define MAYBE_ApiTestsAudio DISABLED_ApiTestsAudio |
| 79 #else |
| 80 #define MAYBE_ApiTestsAudio ApiTestsAudio |
| 81 #endif |
| 82 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_ApiTestsAudio) { |
77 extensions::FeatureSwitch::ScopedOverride tab_capture( | 83 extensions::FeatureSwitch::ScopedOverride tab_capture( |
78 extensions::FeatureSwitch::tab_capture(), true); | 84 extensions::FeatureSwitch::tab_capture(), true); |
79 | 85 |
80 #if defined(OS_WIN) | 86 #if defined(OS_WIN) |
81 // TODO(justinlin): Disabled for WinXP due to timeout issues. | 87 // TODO(justinlin): Disabled for WinXP due to timeout issues. |
82 if (base::win::GetVersion() < base::win::VERSION_VISTA) { | 88 if (base::win::GetVersion() < base::win::VERSION_VISTA) { |
83 return; | 89 return; |
84 } | 90 } |
85 #endif | 91 #endif |
86 | 92 |
87 AddExtensionToCommandLineWhitelist(); | 93 AddExtensionToCommandLineWhitelist(); |
88 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental", | 94 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental", |
89 "api_tests_audio.html")) << message_; | 95 "api_tests_audio.html")) << message_; |
90 } | 96 } |
91 | 97 |
92 // http://crbug.com/177163 | 98 // http://crbug.com/177163 and http://crbug.com/268644 |
93 #if defined(OS_WIN) && !defined(NDEBUG) | 99 #if defined(OS_WIN) && (!defined(NDEBUG) || defined(USE_AURA)) |
94 #define MAYBE_EndToEnd DISABLED_EndToEnd | 100 #define MAYBE_EndToEnd DISABLED_EndToEnd |
95 #else | 101 #else |
96 #define MAYBE_EndToEnd EndToEnd | 102 #define MAYBE_EndToEnd EndToEnd |
97 #endif | 103 #endif |
98 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_EndToEnd) { | 104 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_EndToEnd) { |
99 extensions::FeatureSwitch::ScopedOverride tab_capture( | 105 extensions::FeatureSwitch::ScopedOverride tab_capture( |
100 extensions::FeatureSwitch::tab_capture(), true); | 106 extensions::FeatureSwitch::tab_capture(), true); |
101 | 107 |
102 #if defined(OS_WIN) | 108 #if defined(OS_WIN) |
103 // TODO(justinlin): Disabled for WinXP due to timeout issues. | 109 // TODO(justinlin): Disabled for WinXP due to timeout issues. |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 browser()->fullscreen_controller()->ToggleFullscreenModeForTab(web_contents, | 251 browser()->fullscreen_controller()->ToggleFullscreenModeForTab(web_contents, |
246 false); | 252 false); |
247 fullscreen_entered.Reply(""); | 253 fullscreen_entered.Reply(""); |
248 | 254 |
249 ResultCatcher catcher; | 255 ResultCatcher catcher; |
250 catcher.RestrictToProfile(browser()->profile()); | 256 catcher.RestrictToProfile(browser()->profile()); |
251 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 257 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
252 } | 258 } |
253 | 259 |
254 } // namespace chrome | 260 } // namespace chrome |
OLD | NEW |