Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc

Issue 14863010: Disables couple of other flaky TabCaptureApiTests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/stringprintf.h" 5 #include "base/stringprintf.h"
6 #include "base/win/windows_version.h" 6 #include "base/win/windows_version.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_test_message_listener.h" 9 #include "chrome/browser/extensions/extension_test_message_listener.h"
10 #include "chrome/browser/extensions/tab_helper.h" 10 #include "chrome/browser/extensions/tab_helper.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // TODO(miu): Disabled until the two most-likely sources of the "flaky timeouts" 85 // TODO(miu): Disabled until the two most-likely sources of the "flaky timeouts"
86 // are resolved: 1) http://crbug.com/177163 and 2) http://crbug.com/174519. 86 // are resolved: 1) http://crbug.com/177163 and 2) http://crbug.com/174519.
87 // See http://crbug.com/174640. 87 // See http://crbug.com/174640.
88 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, DISABLED_EndToEnd) { 88 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, DISABLED_EndToEnd) {
89 extensions::FeatureSwitch::ScopedOverride tab_capture( 89 extensions::FeatureSwitch::ScopedOverride tab_capture(
90 extensions::FeatureSwitch::tab_capture(), true); 90 extensions::FeatureSwitch::tab_capture(), true);
91 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental", 91 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental",
92 "end_to_end.html")) << message_; 92 "end_to_end.html")) << message_;
93 } 93 }
94 94
95 // Flaky http://crbug.com/224249
96 #if defined(OS_WIN)
97 #define MAYBE_GetUserMediaTest DISABLED_GetUserMediaTest
98 #else
99 #define MAYBE_GetUserMediaTest GetUserMediaTest
100 #endif
95 // Test that we can't get tabCapture streams using GetUserMedia directly. 101 // Test that we can't get tabCapture streams using GetUserMedia directly.
96 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, GetUserMediaTest) { 102 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_GetUserMediaTest) {
97 ExtensionTestMessageListener listener("ready", true); 103 ExtensionTestMessageListener listener("ready", true);
98 104
99 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental", 105 ASSERT_TRUE(RunExtensionSubtest("tab_capture/experimental",
100 "get_user_media_test.html")) << message_; 106 "get_user_media_test.html")) << message_;
101 107
102 EXPECT_TRUE(listener.WaitUntilSatisfied()); 108 EXPECT_TRUE(listener.WaitUntilSatisfied());
103 109
104 content::OpenURLParams params(GURL("about:blank"), content::Referrer(), 110 content::OpenURLParams params(GURL("about:blank"), content::Referrer(),
105 NEW_FOREGROUND_TAB, 111 NEW_FOREGROUND_TAB,
106 content::PAGE_TRANSITION_LINK, false); 112 content::PAGE_TRANSITION_LINK, false);
107 content::WebContents* web_contents = browser()->OpenURL(params); 113 content::WebContents* web_contents = browser()->OpenURL(params);
108 114
109 content::RenderViewHost* const rvh = web_contents->GetRenderViewHost(); 115 content::RenderViewHost* const rvh = web_contents->GetRenderViewHost();
110 int render_process_id = rvh->GetProcess()->GetID(); 116 int render_process_id = rvh->GetProcess()->GetID();
111 int routing_id = rvh->GetRoutingID(); 117 int routing_id = rvh->GetRoutingID();
112 118
113 listener.Reply(base::StringPrintf("%i:%i", render_process_id, routing_id)); 119 listener.Reply(base::StringPrintf("%i:%i", render_process_id, routing_id));
114 120
115 ResultCatcher catcher; 121 ResultCatcher catcher;
116 catcher.RestrictToProfile(browser()->profile()); 122 catcher.RestrictToProfile(browser()->profile());
117 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 123 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
118 } 124 }
119 125
126 // Flaky http://crbug.com/224249
127 #if defined(OS_WIN)
128 #define MAYBE_ActiveTabPermission DISABLED_ActiveTabPermission
129 #else
130 #define MAYBE_ActiveTabPermission ActiveTabPermission
131 #endif
120 // Make sure tabCapture.capture only works if the tab has been granted 132 // Make sure tabCapture.capture only works if the tab has been granted
121 // permission via an extension icon click or the extension is whitelisted. 133 // permission via an extension icon click or the extension is whitelisted.
122 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, ActiveTabPermission) { 134 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_ActiveTabPermission) {
123 ExtensionTestMessageListener before_open_tab("ready1", true); 135 ExtensionTestMessageListener before_open_tab("ready1", true);
124 ExtensionTestMessageListener before_grant_permission("ready2", true); 136 ExtensionTestMessageListener before_grant_permission("ready2", true);
125 ExtensionTestMessageListener before_open_new_tab("ready3", true); 137 ExtensionTestMessageListener before_open_new_tab("ready3", true);
126 ExtensionTestMessageListener before_whitelist_extension("ready4", true); 138 ExtensionTestMessageListener before_whitelist_extension("ready4", true);
127 139
128 ASSERT_TRUE(RunExtensionSubtest( 140 ASSERT_TRUE(RunExtensionSubtest(
129 "tab_capture/experimental", "active_tab_permission_test.html")) 141 "tab_capture/experimental", "active_tab_permission_test.html"))
130 << message_; 142 << message_;
131 143
132 // Open a new tab and make sure capture is denied. 144 // Open a new tab and make sure capture is denied.
(...skipping 24 matching lines...) Expand all
157 EXPECT_TRUE(before_whitelist_extension.WaitUntilSatisfied()); 169 EXPECT_TRUE(before_whitelist_extension.WaitUntilSatisfied());
158 AddExtensionToCommandLineWhitelist(); 170 AddExtensionToCommandLineWhitelist();
159 before_whitelist_extension.Reply(""); 171 before_whitelist_extension.Reply("");
160 172
161 ResultCatcher catcher; 173 ResultCatcher catcher;
162 catcher.RestrictToProfile(browser()->profile()); 174 catcher.RestrictToProfile(browser()->profile());
163 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 175 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
164 } 176 }
165 177
166 } // namespace chrome 178 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698