| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 138 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
| 139 "test_race.html")) << message_; | 139 "test_race.html")) << message_; |
| 140 } | 140 } |
| 141 | 141 |
| 142 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleFile) { | 142 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleFile) { |
| 143 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 143 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
| 144 "test_file.html")) << message_; | 144 "test_file.html")) << message_; |
| 145 } | 145 } |
| 146 | 146 |
| 147 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleNoFile) { | 147 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleNoFile) { |
| 148 ASSERT_TRUE(RunExtensionSubtestNoFileAccess("tabs/capture_visible_tab", | 148 ASSERT_TRUE(RunExtensionSubtest( |
| 149 "test_nofile.html")) << message_; | 149 "tabs/capture_visible_tab", "test_nofile.html", |
| 150 ExtensionApiTest::kFlagNone)) << message_; |
| 150 } | 151 } |
| 151 | 152 |
| 152 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsOnUpdated) { | 153 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsOnUpdated) { |
| 153 ASSERT_TRUE(RunExtensionTest("tabs/on_updated")) << message_; | 154 ASSERT_TRUE(RunExtensionTest("tabs/on_updated")) << message_; |
| 154 } | 155 } |
| 155 | 156 |
| 156 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, | 157 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, |
| 157 MAYBE_FocusWindowDoesNotExitFullscreen) { | 158 MAYBE_FocusWindowDoesNotExitFullscreen) { |
| 158 browser()->window()->EnterFullscreen( | 159 browser()->window()->EnterFullscreen( |
| 159 GURL(), FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION); | 160 GURL(), FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 204 } |
| 204 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { | 205 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { |
| 205 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) | 206 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) |
| 206 << message_; | 207 << message_; |
| 207 } | 208 } |
| 208 | 209 |
| 209 // Adding a new test? Awesome. But API tests are the old hotness. The | 210 // Adding a new test? Awesome. But API tests are the old hotness. The |
| 210 // new hotness is extension_test_utils. See extension_tabs_test.cc for | 211 // new hotness is extension_test_utils. See extension_tabs_test.cc for |
| 211 // an example. We are trying to phase out many uses of API tests as | 212 // an example. We are trying to phase out many uses of API tests as |
| 212 // they tend to be flaky. | 213 // they tend to be flaky. |
| OLD | NEW |