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

Unified Diff: chrome/browser/extensions/extension_browsertest.h

Issue 2350733005: [Extensions] Fix a bug in the startup pages override bubble (Closed)
Patch Set: Trim includes Created 4 years, 3 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/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_browsertest.h
diff --git a/chrome/browser/extensions/extension_browsertest.h b/chrome/browser/extensions/extension_browsertest.h
index 31ad88e50ab4e583931fedc07ce11fbed7451f77..7e7f20628bdecbdb43f4a7d34534ab33d6c10bbd 100644
--- a/chrome/browser/extensions/extension_browsertest.h
+++ b/chrome/browser/extensions/extension_browsertest.h
@@ -152,6 +152,18 @@ class ExtensionBrowserTest : virtual public InProcessBrowserTest {
install_source);
}
+ // Installs an extension and grants it the permissions it requests.
+ // TODO(devlin): It seems like this is probably the desired outcome most of
+ // the time - otherwise the extension installs in a disabled state.
+ const extensions::Extension* InstallExtensionWithPermissionsGranted(
+ const base::FilePath& file_path,
+ int expected_change) {
+ return InstallOrUpdateExtension(
+ std::string(), file_path, INSTALL_UI_TYPE_NONE, expected_change,
+ extensions::Manifest::INTERNAL, browser(),
+ extensions::Extension::NO_FLAGS, false, true);
+ }
+
// Installs extension as if it came from the Chrome Webstore.
const extensions::Extension* InstallExtensionFromWebstore(
const base::FilePath& path, int expected_change);
@@ -195,14 +207,9 @@ class ExtensionBrowserTest : virtual public InProcessBrowserTest {
int expected_change,
extensions::Manifest::Location install_source,
extensions::Extension::InitFromValueFlags creation_flags) {
- return InstallOrUpdateExtension(std::string(),
- path,
- INSTALL_UI_TYPE_NONE,
- expected_change,
- install_source,
- browser(),
- creation_flags,
- false);
+ return InstallOrUpdateExtension(std::string(), path, INSTALL_UI_TYPE_NONE,
+ expected_change, install_source, browser(),
+ creation_flags, false, false);
}
// Begins install process but simulates a user cancel.
@@ -359,7 +366,8 @@ class ExtensionBrowserTest : virtual public InProcessBrowserTest {
extensions::Manifest::Location install_source,
Browser* browser,
extensions::Extension::InitFromValueFlags creation_flags,
- bool wait_for_idle);
+ bool wait_for_idle,
+ bool grant_permissions);
// Make the current channel "dev" for the duration of the test.
extensions::ScopedCurrentChannel current_channel_;
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698