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

Side by Side Diff: chrome/browser/extensions/api/permissions/permissions_apitest.cc

Issue 1142993002: Don't send unnecessary ExtensionMsg_Loaded IPCs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: commnets Created 5 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_startup_browsertest.cc » ('j') | 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 "chrome/browser/extensions/api/permissions/permissions_api.h" 5 #include "chrome/browser/extensions/api/permissions/permissions_api.h"
6 #include "chrome/browser/extensions/extension_apitest.h" 6 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/extensions/extension_management_test_util.h" 7 #include "chrome/browser/extensions/extension_management_test_util.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "components/policy/core/browser/browser_policy_connector.h" 10 #include "components/policy/core/browser/browser_policy_connector.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 189
190 // Test requesting, querying, and removing host permissions for host 190 // Test requesting, querying, and removing host permissions for host
191 // permissions that are a subset of the optional permissions. 191 // permissions that are a subset of the optional permissions.
192 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, HostSubsets) { 192 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, HostSubsets) {
193 PermissionsRequestFunction::SetAutoConfirmForTests(true); 193 PermissionsRequestFunction::SetAutoConfirmForTests(true);
194 PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); 194 PermissionsRequestFunction::SetIgnoreUserGestureForTests(true);
195 EXPECT_TRUE(RunExtensionTest("permissions/host_subsets")) << message_; 195 EXPECT_TRUE(RunExtensionTest("permissions/host_subsets")) << message_;
196 } 196 }
197 197
198 // Tests that requesting an optional permission from a background page, with
199 // another window open, grants the permission and updates the bindings
200 // (chrome.whatever, in this case chrome.alarms). Regression test for
201 // crbug.com/435141, see details there for trickiness.
202 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OptionalPermissionsUpdatesBindings) {
203 ASSERT_TRUE(RunExtensionTest("permissions/optional_updates_bindings"))
204 << message_;
205 }
206
198 } // namespace extensions 207 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_startup_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698