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

Unified Diff: chrome/browser/extensions/api/permissions/permissions_apitest.cc

Issue 227413008: Add the feature to retain the user gesture in the extension callback (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/permissions/permissions_apitest.cc
===================================================================
--- chrome/browser/extensions/api/permissions/permissions_apitest.cc (revision 265681)
+++ chrome/browser/extensions/api/permissions/permissions_apitest.cc (working copy)
@@ -117,6 +117,17 @@
EXPECT_TRUE(RunExtensionTest("permissions/optional_gesture")) << message_;
}
+// Tests that the user gesture is retained in the permissions.request function
+// callback.
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OptionalPermissionsRetainGesture) {
+ PermissionsRequestFunction::SetAutoConfirmForTests(true);
+ PermissionsRequestFunction::SetIgnoreUserGestureForTests(false);
+ host_resolver()->AddRule("*.com", "127.0.0.1");
+ ASSERT_TRUE(StartEmbeddedTestServer());
+ EXPECT_TRUE(RunExtensionTest("permissions/optional_retain_gesture"))
+ << message_;
+}
+
// Tests that an extension can't gain access to file: URLs without the checkbox
// entry in prefs. There shouldn't be a warning either.
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OptionalPermissionsFileAccess) {
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698