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

Unified Diff: chrome/browser/extensions/content_script_apitest.cc

Issue 10073011: Fix the optional permissions API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/common/extensions/extension_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/content_script_apitest.cc
diff --git a/chrome/browser/extensions/content_script_apitest.cc b/chrome/browser/extensions/content_script_apitest.cc
index f6097ad932169ece74bcc87746d0e6d02e203a4c..0e75dc7028a2cd9927edcb4e0fbfaea7b981d9f9 100644
--- a/chrome/browser/extensions/content_script_apitest.cc
+++ b/chrome/browser/extensions/content_script_apitest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/utf_string_conversions.h"
+#include "chrome/browser/extensions/api/permissions/permissions_api.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/ui/browser.h"
@@ -144,3 +145,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionAPIs) {
NEW_FOREGROUND_TAB, ui_test_utils::BROWSER_TEST_NONE);
EXPECT_TRUE(catcher.GetNextResult());
}
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptPermissionsApi) {
+ RequestPermissionsFunction::SetIgnoreUserGestureForTests(true);
+ RequestPermissionsFunction::SetAutoConfirmForTests(true);
+ host_resolver()->AddRule("*.com", "127.0.0.1");
+ ASSERT_TRUE(StartTestServer());
+ ASSERT_TRUE(RunExtensionTest("content_scripts/permissions")) << message_;
+}
« no previous file with comments | « no previous file | chrome/common/extensions/extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698