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

Unified Diff: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc

Issue 10959032: Protect the entire webstore origin, not just the webstore path, with XFO. Follow-up to crrev.com/1… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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/renderer_host/chrome_resource_dispatcher_host_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"));
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698