| 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 "chrome/browser/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
| 6 | 6 |
| 7 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 7 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 ASSERT_FALSE(browser()->window()->IsFullscreen()); | 185 ASSERT_FALSE(browser()->window()->IsFullscreen()); |
| 186 } | 186 } |
| 187 | 187 |
| 188 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, | 188 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, |
| 189 MAYBE_UpdateWindowResize) { | 189 MAYBE_UpdateWindowResize) { |
| 190 ASSERT_TRUE(RunExtensionTest("window_update/resize")) << message_; | 190 ASSERT_TRUE(RunExtensionTest("window_update/resize")) << message_; |
| 191 } | 191 } |
| 192 | 192 |
| 193 #if defined(OS_WIN) && !defined(USE_AURA) | 193 #if defined(OS_WIN) && !defined(USE_AURA) |
| 194 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FocusWindowDoesNotUnmaximize) { | 194 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FocusWindowDoesNotUnmaximize) { |
| 195 gfx::NativeWindow window = browser()->window()->GetNativeHandle(); | 195 gfx::NativeWindow window = browser()->window()->GetNativeWindow(); |
| 196 ::SendMessage(window, WM_SYSCOMMAND, SC_MAXIMIZE, 0); | 196 ::SendMessage(window, WM_SYSCOMMAND, SC_MAXIMIZE, 0); |
| 197 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_; | 197 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_; |
| 198 ASSERT_TRUE(::IsZoomed(window)); | 198 ASSERT_TRUE(::IsZoomed(window)); |
| 199 } | 199 } |
| 200 #endif // OS_WIN | 200 #endif // OS_WIN |
| 201 | 201 |
| 202 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_UpdateWindowShowState) { | 202 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_UpdateWindowShowState) { |
| 203 ASSERT_TRUE(RunExtensionTest("window_update/show_state")) << message_; | 203 ASSERT_TRUE(RunExtensionTest("window_update/show_state")) << message_; |
| 204 } | 204 } |
| 205 | 205 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 218 } | 218 } |
| 219 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { | 219 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { |
| 220 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) | 220 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) |
| 221 << message_; | 221 << message_; |
| 222 } | 222 } |
| 223 | 223 |
| 224 // Adding a new test? Awesome. But API tests are the old hotness. The | 224 // Adding a new test? Awesome. But API tests are the old hotness. The |
| 225 // new hotness is extension_test_utils. See extension_tabs_test.cc for | 225 // new hotness is extension_test_utils. See extension_tabs_test.cc for |
| 226 // an example. We are trying to phase out many uses of API tests as | 226 // an example. We are trying to phase out many uses of API tests as |
| 227 // they tend to be flaky. | 227 // they tend to be flaky. |
| OLD | NEW |