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

Side by Side Diff: chrome/browser/extensions/extension_tabs_apitest.cc

Issue 137993009: Remove more non-aura windows code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 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
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 "chrome/browser/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/prefs/incognito_mode_prefs.h" 8 #include "chrome/browser/prefs/incognito_mode_prefs.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsNoPermissions) { 221 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsNoPermissions) {
222 ASSERT_TRUE(RunExtensionTest("tabs/no_permissions")) << message_; 222 ASSERT_TRUE(RunExtensionTest("tabs/no_permissions")) << message_;
223 } 223 }
224 224
225 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, 225 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
226 MAYBE_UpdateWindowResize) { 226 MAYBE_UpdateWindowResize) {
227 ASSERT_TRUE(RunExtensionTest("window_update/resize")) << message_; 227 ASSERT_TRUE(RunExtensionTest("window_update/resize")) << message_;
228 } 228 }
229 229
230 #if defined(OS_WIN) && !defined(USE_AURA)
231 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FocusWindowDoesNotUnmaximize) {
scottmg 2014/01/14 21:12:37 does this not make sense, or was it just broken?
jam 2014/01/14 21:54:32 good catch, I should have left that disabled. i ad
232 gfx::NativeWindow window = browser()->window()->GetNativeWindow();
233 ::SendMessage(window, WM_SYSCOMMAND, SC_MAXIMIZE, 0);
234 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_;
235 ASSERT_TRUE(::IsZoomed(window));
236 }
237 #endif // OS_WIN
238
239 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_UpdateWindowShowState) { 230 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_UpdateWindowShowState) {
240 ASSERT_TRUE(RunExtensionTest("window_update/show_state")) << message_; 231 ASSERT_TRUE(RunExtensionTest("window_update/show_state")) << message_;
241 } 232 }
242 233
243 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, IncognitoDisabledByPref) { 234 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, IncognitoDisabledByPref) {
244 IncognitoModePrefs::SetAvailability(browser()->profile()->GetPrefs(), 235 IncognitoModePrefs::SetAvailability(browser()->profile()->GetPrefs(),
245 IncognitoModePrefs::DISABLED); 236 IncognitoModePrefs::DISABLED);
246 237
247 // This makes sure that creating an incognito window fails due to pref 238 // This makes sure that creating an incognito window fails due to pref
248 // (policy) being set. 239 // (policy) being set.
249 ASSERT_TRUE(RunExtensionTest("tabs/incognito_disabled")) << message_; 240 ASSERT_TRUE(RunExtensionTest("tabs/incognito_disabled")) << message_;
250 } 241 }
251 242
252 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedPopup) { 243 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedPopup) {
253 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_popup.html")) 244 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_popup.html"))
254 << message_; 245 << message_;
255 } 246 }
256 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { 247 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) {
257 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) 248 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html"))
258 << message_; 249 << message_;
259 } 250 }
260 251
261 // Adding a new test? Awesome. But API tests are the old hotness. The 252 // Adding a new test? Awesome. But API tests are the old hotness. The
262 // new hotness is extension_test_utils. See tabs_test.cc for an example. 253 // new hotness is extension_test_utils. See tabs_test.cc for an example.
263 // We are trying to phase out many uses of API tests as they tend to be flaky. 254 // We are trying to phase out many uses of API tests as they tend to be flaky.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698