summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_tabs_apitest.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-03 16:08:01 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-03 16:08:01 +0000
commite87d8a62a2c7b8f6e2c36a8e3d529dd576bf3114 (patch)
tree3499b3f2c8ee3645fdea11f3b72ebc7b6b4a993b /chrome/browser/extensions/extension_tabs_apitest.cc
parentf504d5edbbc01fe6a4b180faac7733ecf6ad68fa (diff)
downloadchromium_src-e87d8a62a2c7b8f6e2c36a8e3d529dd576bf3114.zip
chromium_src-e87d8a62a2c7b8f6e2c36a8e3d529dd576bf3114.tar.gz
chromium_src-e87d8a62a2c7b8f6e2c36a8e3d529dd576bf3114.tar.bz2
Cleanup of browser_test harness.
-share the browser startup code with chrome. Apart from the benefit of making browser_tests more like Chrome, this allows us to write browser_tests that test app mode etc. -get rid of InProcessBrowserTest::set_initial_window_required now that the above is done -get rid of InProcessBrowserTest::set_show_window which didn't do anything -get rid of --disable-tab-closeable-state-watcher which was set by a chromeos test but not used anywhere I had to create the Mac autorelease pool object a little earlier, since it must be created before the first Browser window is created (which used to happen in InProcessBrowserTest::RunTestOnMainThreadLoop but now happens in BrowserTestBase::SetUp()). Review URL: https://chromiumcodereview.appspot.com/10278003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135164 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_tabs_apitest.cc')
-rw-r--r--chrome/browser/extensions/extension_tabs_apitest.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_tabs_apitest.cc b/chrome/browser/extensions/extension_tabs_apitest.cc
index a5d7d69..d2390f4 100644
--- a/chrome/browser/extensions/extension_tabs_apitest.cc
+++ b/chrome/browser/extensions/extension_tabs_apitest.cc
@@ -9,7 +9,9 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/url_constants.h"
#include "net/base/mock_host_resolver.h"
// Possible race in ChromeURLDataManager. http://crbug.com/59198
@@ -43,7 +45,19 @@
#define MAYBE_UpdateWindowResize UpdateWindowResize
#endif // defined(OS_LINUX) && !defined(USE_AURA)
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Tabs) {
+class ExtensionApiNewTabTest : public ExtensionApiTest {
+ public:
+ ExtensionApiNewTabTest() {}
+ virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ ExtensionApiTest::SetUpCommandLine(command_line);
+ // Override the default which InProcessBrowserTest adds if it doesn't see a
+ // homepage.
+ command_line->AppendSwitchASCII(
+ switches::kHomePage, chrome::kChromeUINewTabURL);
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiNewTabTest, Tabs) {
// The test creates a tab and checks that the URL of the new tab
// is that of the new tab page. Make sure the pref that controls
// this is set.