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

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

Issue 8825015: Create a LegacyExtensionBrowserTest class that lets us test extensions with (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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_icon_source_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_browsertests_misc.cc
===================================================================
--- chrome/browser/extensions/extension_browsertests_misc.cc (revision 113424)
+++ chrome/browser/extensions/extension_browsertests_misc.cc (working copy)
@@ -20,6 +20,7 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -134,6 +135,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageAction) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
// This page action will not show an icon, since it doesn't specify one but
// is included here to test for a crash (http://crbug.com/25562).
ASSERT_TRUE(LoadExtension(
@@ -187,6 +191,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, UnloadPageAction) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
FilePath extension_path(test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(LoadExtension(extension_path));
@@ -260,6 +267,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, RSSMultiRelLink) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
ASSERT_TRUE(LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action")));
@@ -424,6 +434,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedValidFeed1) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
@@ -439,6 +452,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedValidFeed2) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
@@ -454,6 +470,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedValidFeed3) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
@@ -469,6 +488,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedValidFeed4) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
@@ -484,6 +506,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedValidFeed0) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
@@ -501,6 +526,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedValidFeed5) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
@@ -517,6 +545,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedValidFeed6) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
@@ -533,6 +564,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedInvalidFeed1) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
@@ -549,6 +583,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedInvalidFeed2) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
@@ -565,6 +602,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedInvalidFeed3) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
@@ -581,6 +621,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedInvalidFeed4) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
@@ -604,6 +647,9 @@
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedValidFeedNoLinks) {
ASSERT_TRUE(test_server()->Start());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAllowLegacyExtensionManifests);
+
const Extension* extension = LoadExtension(
test_data_dir_.AppendASCII("subscribe_page_action"));
ASSERT_TRUE(extension);
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_icon_source_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698