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

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

Issue 11824004: Do not pass URLs in onUpdated events to extensions unless they have the (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update test Created 7 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
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 "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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableScreenshots, 184 browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableScreenshots,
185 true); 185 true);
186 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", 186 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab",
187 "test_disabled.html")) << message_; 187 "test_disabled.html")) << message_;
188 } 188 }
189 189
190 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsOnUpdated) { 190 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsOnUpdated) {
191 ASSERT_TRUE(RunExtensionTest("tabs/on_updated")) << message_; 191 ASSERT_TRUE(RunExtensionTest("tabs/on_updated")) << message_;
192 } 192 }
193 193
194 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsNoPermissions) {
195 ASSERT_TRUE(RunExtensionTest("tabs/no_permissions")) << message_;
196 }
197
194 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, 198 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
195 MAYBE_FocusWindowDoesNotExitFullscreen) { 199 MAYBE_FocusWindowDoesNotExitFullscreen) {
196 browser()->window()->EnterFullscreen( 200 browser()->window()->EnterFullscreen(
197 GURL(), FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION); 201 GURL(), FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION);
198 bool is_fullscreen = browser()->window()->IsFullscreen(); 202 bool is_fullscreen = browser()->window()->IsFullscreen();
199 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_; 203 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_;
200 ASSERT_EQ(is_fullscreen, browser()->window()->IsFullscreen()); 204 ASSERT_EQ(is_fullscreen, browser()->window()->IsFullscreen());
201 } 205 }
202 206
203 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, 207 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 << message_; 244 << message_;
241 } 245 }
242 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { 246 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) {
243 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) 247 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html"))
244 << message_; 248 << message_;
245 } 249 }
246 250
247 // Adding a new test? Awesome. But API tests are the old hotness. The 251 // Adding a new test? Awesome. But API tests are the old hotness. The
248 // new hotness is extension_test_utils. See tabs_test.cc for an example. 252 // new hotness is extension_test_utils. See tabs_test.cc for an example.
249 // We are trying to phase out many uses of API tests as they tend to be flaky. 253 // We are trying to phase out many uses of API tests as they tend to be flaky.
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tab_util_android.cc ('k') | chrome/browser/extensions/menu_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698