Index: content/browser/frame_host/data_url_navigation_browsertest.cc |
diff --git a/content/browser/frame_host/data_url_navigation_browsertest.cc b/content/browser/frame_host/data_url_navigation_browsertest.cc |
index d500fb2ba21fc4e4ae10719fe84c5cc29a573e72..91ef6df1878852e3d46a699c4b6c67dc1a70e086 100644 |
--- a/content/browser/frame_host/data_url_navigation_browsertest.cc |
+++ b/content/browser/frame_host/data_url_navigation_browsertest.cc |
@@ -507,13 +507,28 @@ IN_PROC_BROWSER_TEST_F(DataUrlNavigationBrowserTest, HTML_Navigation_Block) { |
NAVIGATION_BLOCKED); |
} |
+class DataUrlNavigationAllowedFromContentTest |
+ : public DataUrlNavigationBrowserTest { |
+ public: |
+ DataUrlNavigationAllowedFromContentTest() {} |
+ |
+ protected: |
+ void SetUp() override { |
+ scoped_feature_list_.InitAndEnableFeature( |
+ features::kAllowContentInitiatedDataUrlNavigations); |
+ DataUrlNavigationBrowserTest::SetUp(); |
+ } |
+ |
+ private: |
+ base::test::ScopedFeatureList scoped_feature_list_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DataUrlNavigationAllowedFromContentTest); |
+}; |
+ |
// Tests that a content initiated navigation to a data URL is allowed if |
// blocking is disabled with a feature flag. |
-IN_PROC_BROWSER_TEST_F(DataUrlNavigationBrowserTest, |
- HTML_Navigation_Allow_FeatureFlag) { |
- base::test::ScopedFeatureList feature_list; |
- feature_list.InitAndEnableFeature( |
- features::kAllowContentInitiatedDataUrlNavigations); |
+IN_PROC_BROWSER_TEST_F(DataUrlNavigationAllowedFromContentTest, |
+ HTML_Navigation) { |
NavigateToURL(shell(), |
embedded_test_server()->GetURL("/data_url_navigations.html")); |
ExecuteScriptAndCheckNavigation( |