Chromium Code Reviews| Index: chrome/browser/extensions/extension_resource_request_policy_apitest.cc |
| diff --git a/chrome/browser/extensions/extension_resource_request_policy_apitest.cc b/chrome/browser/extensions/extension_resource_request_policy_apitest.cc |
| index 7529adab305957141502bf137b8d152d569ce472..eff704390e58c31f2d6472d00d8da9324f5c5bf0 100644 |
| --- a/chrome/browser/extensions/extension_resource_request_policy_apitest.cc |
| +++ b/chrome/browser/extensions/extension_resource_request_policy_apitest.cc |
| @@ -16,6 +16,8 @@ class ExtensionResourceRequestPolicyTest : public ExtensionApiTest { |
| virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| ExtensionApiTest::SetUpCommandLine(command_line); |
| command_line->AppendSwitch(switches::kAllowLegacyExtensionManifests); |
| + command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
|
Mihai Parparita -not on Chrome
2012/05/17 15:08:07
These two flags should no longer be necessary now
Peng
2012/05/17 15:32:35
Done.
|
| + command_line->AppendSwitch(switches::kEnablePlatformApps); |
| } |
| }; |
| @@ -193,6 +195,17 @@ IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, |
| L"window.domAutomationController.send(document.title)", |
| &result)); |
| EXPECT_EQ("Image failed to load", result); |
| + |
| + GURL nonaccessible_cer_resource( |
| + test_server()->GetURL( |
| + "files/extensions/api_test/extension_resource_request_policy/" |
| + "web_accessible/nonaccessible_chrome_resource_scheme.html")); |
| + ui_test_utils::NavigateToURL(browser(), nonaccessible_cer_resource); |
| + ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString( |
| + browser()->GetSelectedWebContents()->GetRenderViewHost(), L"", |
| + L"window.domAutomationController.send(document.title)", |
| + &result)); |
| + EXPECT_EQ("Loading CER:// failed.", result); |
| } |
| IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, Iframe) { |
| @@ -205,3 +218,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, Iframe) { |
| "extension_resource_request_policy/web_accessible", |
| "iframe.html")); |
| } |
| + |
| +IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, |
| + ExtensionAccessibleResources) { |
| + ASSERT_TRUE(RunExtensionSubtest("accessible_cer", "main.html")) << message_; |
| +} |