diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-14 19:56:26 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-14 19:56:26 +0000 |
commit | 78863856808e28200476e5839bb65ba69e6d9f04 (patch) | |
tree | 71faa1c8944cf917b9e75d084c7db39ccb18adff /chrome/browser/extensions/app_background_page_apitest.cc | |
parent | 1118e6475322e61273ccebc31e2816ee4ff8248b (diff) | |
download | chromium_src-78863856808e28200476e5839bb65ba69e6d9f04.zip chromium_src-78863856808e28200476e5839bb65ba69e6d9f04.tar.gz chromium_src-78863856808e28200476e5839bb65ba69e6d9f04.tar.bz2 |
Now allow reopening BCs even if they were specified in the manifest
BUG=98046
TEST=Create app with BC in manifest. Have app use a different window name (not "background"), window should not be visible.
Review URL: http://codereview.chromium.org/8247011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105552 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/app_background_page_apitest.cc')
-rw-r--r-- | chrome/browser/extensions/app_background_page_apitest.cc | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/chrome/browser/extensions/app_background_page_apitest.cc b/chrome/browser/extensions/app_background_page_apitest.cc index ac1db73..19d1eb5 100644 --- a/chrome/browser/extensions/app_background_page_apitest.cc +++ b/chrome/browser/extensions/app_background_page_apitest.cc @@ -17,7 +17,7 @@ class AppBackgroundPageApiTest : public ExtensionApiTest { public: - void SetUpCommandLine(CommandLine* command_line) { + void SetUpCommandLine(CommandLine* command_line) OVERRIDE { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kDisablePopupBlocking); command_line->AppendSwitch(switches::kAllowHTTPBackgroundPage); @@ -163,3 +163,32 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, OpenTwoBackgroundPages) { ASSERT_TRUE(LoadExtension(app_dir)); ASSERT_TRUE(RunExtensionTest("app_background_page/two_pages")) << message_; } + +IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, OpenTwoPagesWithManifest) { + host_resolver()->AddRule("a.com", "127.0.0.1"); + ASSERT_TRUE(StartTestServer()); + + std::string app_manifest = base::StringPrintf( + "{" + " \"name\": \"App\"," + " \"version\": \"0.1\"," + " \"app\": {" + " \"urls\": [" + " \"http://a.com/\"" + " ]," + " \"launch\": {" + " \"web_url\": \"http://a.com:%d/\"" + " }" + " }," + " \"background_page\": \"http://a.com:%d/bg.html\"," + " \"permissions\": [\"background\"]" + "}", + test_server()->host_port_pair().port(), + test_server()->host_port_pair().port()); + + FilePath app_dir; + ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); + ASSERT_TRUE(LoadExtension(app_dir)); + ASSERT_TRUE(RunExtensionTest("app_background_page/two_with_manifest")) << + message_; +} |