Chromium Code Reviews| Index: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc |
| =================================================================== |
| --- chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc (revision 157879) |
| +++ chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc (working copy) |
| @@ -96,7 +96,8 @@ |
| void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| ExtensionApiTest::SetUpCommandLine(command_line); |
| command_line->AppendSwitchASCII( |
| - switches::kAppsGalleryURL, "http://www.example.com"); |
| + switches::kAppsGalleryURL, |
| + "http://www.example.com/files/extensions/api_test"); |
| command_line->AppendSwitchASCII( |
| switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); |
| } |
| @@ -261,8 +262,9 @@ |
| } |
| }; |
| -// Test case for webstore origin frame blocking. |
| -IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, FLAKY_FrameBlocked) { |
| +// Test cases for webstore origin frame blocking. |
| +IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, |
| + FLAKY_FrameWebstorePageBlocked) { |
| content::WebContents* contents = chrome::GetActiveWebContents(browser()); |
| string16 expected_title = UTF8ToUTF16("PASS: about:blank"); |
| string16 failure_title = UTF8ToUTF16("FAIL"); |
| @@ -275,6 +277,20 @@ |
| EXPECT_EQ(expected_title, final_title); |
| } |
| +IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, |
| + FLAKY_FrameErrorPageBlocked) { |
|
Nico
2012/09/22 02:09:36
Adding a new test as FLAKY_ seems pretty pointless
|
| + content::WebContents* contents = chrome::GetActiveWebContents(browser()); |
| + string16 expected_title = UTF8ToUTF16("PASS: about:blank"); |
| + string16 failure_title = UTF8ToUTF16("FAIL"); |
| + content::TitleWatcher watcher(contents, expected_title); |
| + watcher.AlsoWaitForTitle(failure_title); |
| + GURL url = test_server()->GetURL( |
| + "files/extensions/api_test/webstore_private/noframe2.html"); |
| + ui_test_utils::NavigateToURL(browser(), url); |
| + string16 final_title = watcher.WaitAndGetTitle(); |
| + EXPECT_EQ(expected_title, final_title); |
| +} |
| + |
| // Test cases where the user accepts the install confirmation dialog. |
| IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, InstallAccepted) { |
| ASSERT_TRUE(RunInstallTest("accepted.html", "extension.crx")); |