Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <map> | 5 #include <map> |
| 6 #include <memory> | 6 #include <memory> |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/location.h" | 13 #include "base/location.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 17 #include "base/strings/string_piece.h" | 17 #include "base/strings/string_piece.h" |
| 18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
| 19 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
| 20 #include "base/test/histogram_tester.h" | 20 #include "base/test/histogram_tester.h" |
| 21 #include "base/test/simple_test_clock.h" | |
| 21 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
| 22 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 23 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 23 #include "chrome/browser/metrics/subprocess_metrics_provider.h" | 24 #include "chrome/browser/metrics/subprocess_metrics_provider.h" |
| 24 #include "chrome/browser/page_load_metrics/observers/subresource_filter_metrics_ observer.h" | 25 #include "chrome/browser/page_load_metrics/observers/subresource_filter_metrics_ observer.h" |
| 25 #include "chrome/browser/safe_browsing/test_safe_browsing_service.h" | 26 #include "chrome/browser/safe_browsing/test_safe_browsing_service.h" |
| 26 #include "chrome/browser/safe_browsing/v4_test_utils.h" | 27 #include "chrome/browser/safe_browsing/v4_test_utils.h" |
| 27 #include "chrome/browser/subresource_filter/chrome_subresource_filter_client.h" | 28 #include "chrome/browser/subresource_filter/chrome_subresource_filter_client.h" |
| 29 #include "chrome/browser/subresource_filter/subresource_filter_content_settings_ manager.h" | |
| 30 #include "chrome/browser/subresource_filter/subresource_filter_content_settings_ manager_factory.h" | |
| 28 #include "chrome/browser/subresource_filter/test_ruleset_publisher.h" | 31 #include "chrome/browser/subresource_filter/test_ruleset_publisher.h" |
| 29 #include "chrome/browser/ui/browser.h" | 32 #include "chrome/browser/ui/browser.h" |
| 30 #include "chrome/browser/ui/browser_commands.h" | 33 #include "chrome/browser/ui/browser_commands.h" |
| 31 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 34 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 32 #include "chrome/common/chrome_paths.h" | 35 #include "chrome/common/chrome_paths.h" |
| 33 #include "chrome/common/url_constants.h" | 36 #include "chrome/common/url_constants.h" |
| 34 #include "chrome/test/base/in_process_browser_test.h" | 37 #include "chrome/test/base/in_process_browser_test.h" |
| 35 #include "chrome/test/base/ui_test_utils.h" | 38 #include "chrome/test/base/ui_test_utils.h" |
| 36 #include "components/content_settings/core/browser/host_content_settings_map.h" | 39 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 37 #include "components/content_settings/core/common/content_settings.h" | 40 #include "components/content_settings/core/common/content_settings.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 266 | 269 |
| 267 void SetUpOnMainThread() override { | 270 void SetUpOnMainThread() override { |
| 268 SetUpActivationFeature(); | 271 SetUpActivationFeature(); |
| 269 base::FilePath test_data_dir; | 272 base::FilePath test_data_dir; |
| 270 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); | 273 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); |
| 271 embedded_test_server()->ServeFilesFromDirectory(test_data_dir); | 274 embedded_test_server()->ServeFilesFromDirectory(test_data_dir); |
| 272 host_resolver()->AddSimulatedFailure("host-with-dns-lookup-failure"); | 275 host_resolver()->AddSimulatedFailure("host-with-dns-lookup-failure"); |
| 273 host_resolver()->AddRule("*", "127.0.0.1"); | 276 host_resolver()->AddRule("*", "127.0.0.1"); |
| 274 content::SetupCrossSiteRedirector(embedded_test_server()); | 277 content::SetupCrossSiteRedirector(embedded_test_server()); |
| 275 ASSERT_TRUE(embedded_test_server()->Start()); | 278 ASSERT_TRUE(embedded_test_server()->Start()); |
| 279 | |
| 280 settings_manager_ = | |
| 281 SubresourceFilterContentSettingsManagerFactory::EnsureForProfile( | |
| 282 browser()->profile()); | |
| 283 #if defined(OS_ANDROID) | |
| 284 EXPECT_TRUE(settings_manager->should_use_smart_ui()); | |
| 285 #endif | |
| 276 } | 286 } |
| 277 | 287 |
| 278 virtual void SetUpActivationFeature() { | 288 virtual void SetUpActivationFeature() { |
| 279 ToggleFeatures(base::MakeUnique<ScopedSubresourceFilterFeatureToggle>( | 289 ToggleFeatures(base::MakeUnique<ScopedSubresourceFilterFeatureToggle>( |
| 280 base::FeatureList::OVERRIDE_ENABLE_FEATURE, kActivationLevelEnabled, | 290 base::FeatureList::OVERRIDE_ENABLE_FEATURE, kActivationLevelEnabled, |
| 281 kActivationScopeActivationList, kActivationListPhishingInterstitial, | 291 kActivationScopeActivationList, kActivationListPhishingInterstitial, |
| 282 measure_performance_ ? "1" : "0", "" /* suppress_notifications */, | 292 measure_performance_ ? "1" : "0", "" /* suppress_notifications */, |
| 283 whitelist_site_on_reload_ ? "true" : "false")); | 293 whitelist_site_on_reload_ ? "true" : "false")); |
| 284 } | 294 } |
| 285 | 295 |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 304 | 314 |
| 305 void ConfigureAsSubresourceFilterOnlyURL(const GURL& url) { | 315 void ConfigureAsSubresourceFilterOnlyURL(const GURL& url) { |
| 306 MarkUrlAsMatchingListWithId(url, safe_browsing::GetUrlSubresourceFilterId(), | 316 MarkUrlAsMatchingListWithId(url, safe_browsing::GetUrlSubresourceFilterId(), |
| 307 safe_browsing::ThreatPatternType::NONE); | 317 safe_browsing::ThreatPatternType::NONE); |
| 308 } | 318 } |
| 309 | 319 |
| 310 content::WebContents* web_contents() { | 320 content::WebContents* web_contents() { |
| 311 return browser()->tab_strip_model()->GetActiveWebContents(); | 321 return browser()->tab_strip_model()->GetActiveWebContents(); |
| 312 } | 322 } |
| 313 | 323 |
| 324 SubresourceFilterContentSettingsManager* settings_manager() { | |
| 325 return settings_manager_; | |
| 326 } | |
| 327 | |
| 314 content::RenderFrameHost* FindFrameByName(const std::string& name) { | 328 content::RenderFrameHost* FindFrameByName(const std::string& name) { |
| 315 for (content::RenderFrameHost* frame : web_contents()->GetAllFrames()) { | 329 for (content::RenderFrameHost* frame : web_contents()->GetAllFrames()) { |
| 316 if (frame->GetFrameName() == name) | 330 if (frame->GetFrameName() == name) |
| 317 return frame; | 331 return frame; |
| 318 } | 332 } |
| 319 return nullptr; | 333 return nullptr; |
| 320 } | 334 } |
| 321 | 335 |
| 322 bool WasParsedScriptElementLoaded(content::RenderFrameHost* rfh) { | 336 bool WasParsedScriptElementLoaded(content::RenderFrameHost* rfh) { |
| 323 DCHECK(rfh); | 337 DCHECK(rfh); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 393 TestRulesetPublisher test_ruleset_publisher_; | 407 TestRulesetPublisher test_ruleset_publisher_; |
| 394 const bool measure_performance_; | 408 const bool measure_performance_; |
| 395 const bool whitelist_site_on_reload_; | 409 const bool whitelist_site_on_reload_; |
| 396 | 410 |
| 397 std::unique_ptr<safe_browsing::TestSafeBrowsingServiceFactory> sb_factory_; | 411 std::unique_ptr<safe_browsing::TestSafeBrowsingServiceFactory> sb_factory_; |
| 398 // Owned by the V4Database. | 412 // Owned by the V4Database. |
| 399 safe_browsing::TestV4DatabaseFactory* v4_db_factory_; | 413 safe_browsing::TestV4DatabaseFactory* v4_db_factory_; |
| 400 // Owned by the V4GetHashProtocolManager. | 414 // Owned by the V4GetHashProtocolManager. |
| 401 safe_browsing::TestV4GetHashProtocolManagerFactory* v4_get_hash_factory_; | 415 safe_browsing::TestV4GetHashProtocolManagerFactory* v4_get_hash_factory_; |
| 402 | 416 |
| 417 // Owned by the profile. | |
| 418 SubresourceFilterContentSettingsManager* settings_manager_; | |
| 419 | |
| 403 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterBrowserTestImpl); | 420 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterBrowserTestImpl); |
| 404 }; | 421 }; |
| 405 | 422 |
| 406 class SubresourceFilterBrowserTest : public SubresourceFilterBrowserTestImpl { | 423 class SubresourceFilterBrowserTest : public SubresourceFilterBrowserTestImpl { |
| 407 public: | 424 public: |
| 408 SubresourceFilterBrowserTest() | 425 SubresourceFilterBrowserTest() |
| 409 : SubresourceFilterBrowserTestImpl(false, false) {} | 426 : SubresourceFilterBrowserTestImpl(false, false) {} |
| 410 }; | 427 }; |
| 411 | 428 |
| 412 // TODO(pkalinnikov): It should be possible to have only one fixture, i.e., | 429 // TODO(pkalinnikov): It should be possible to have only one fixture, i.e., |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 834 // page load right after start-up. | 851 // page load right after start-up. |
| 835 ui_test_utils::NavigateToURL(browser(), url); | 852 ui_test_utils::NavigateToURL(browser(), url); |
| 836 EXPECT_FALSE(WasParsedScriptElementLoaded(web_contents()->GetMainFrame())); | 853 EXPECT_FALSE(WasParsedScriptElementLoaded(web_contents()->GetMainFrame())); |
| 837 } | 854 } |
| 838 | 855 |
| 839 IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest, | 856 IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest, |
| 840 PromptShownAgainOnNextNavigation) { | 857 PromptShownAgainOnNextNavigation) { |
| 841 ASSERT_NO_FATAL_FAILURE( | 858 ASSERT_NO_FATAL_FAILURE( |
| 842 SetRulesetToDisallowURLsWithPathSuffix("included_script.js")); | 859 SetRulesetToDisallowURLsWithPathSuffix("included_script.js")); |
| 843 GURL url(GetTestUrl(kTestFrameSetPath)); | 860 GURL url(GetTestUrl(kTestFrameSetPath)); |
| 861 GURL a_url(embedded_test_server()->GetURL( | |
| 862 "a.com", "/subresource_filter/frame_with_included_script.html")); | |
| 844 ConfigureAsPhishingURL(url); | 863 ConfigureAsPhishingURL(url); |
| 845 base::HistogramTester tester; | 864 base::HistogramTester tester; |
| 846 ui_test_utils::NavigateToURL(browser(), url); | 865 ui_test_utils::NavigateToURL(browser(), url); |
| 847 tester.ExpectBucketCount(kSubresourceFilterActionsHistogram, kActionUIShown, | 866 tester.ExpectBucketCount(kSubresourceFilterActionsHistogram, kActionUIShown, |
| 848 1); | 867 1); |
| 849 // Check that the bubble is not shown again for this navigation. | 868 // Check that the bubble is not shown again for this navigation. |
| 850 EXPECT_FALSE(IsDynamicScriptElementLoaded(FindFrameByName("five"))); | 869 EXPECT_FALSE(IsDynamicScriptElementLoaded(FindFrameByName("five"))); |
| 851 tester.ExpectBucketCount(kSubresourceFilterActionsHistogram, kActionUIShown, | 870 tester.ExpectBucketCount(kSubresourceFilterActionsHistogram, kActionUIShown, |
| 852 1); | 871 1); |
| 853 // Check that bubble is shown for new navigation. | 872 // Check that bubble is shown for new navigation. Must be cross site to avoid |
| 854 ui_test_utils::NavigateToURL(browser(), url); | 873 // triggering smart UI on Android. |
| 874 ConfigureAsPhishingURL(a_url); | |
| 875 ui_test_utils::NavigateToURL(browser(), a_url); | |
| 855 tester.ExpectBucketCount(kSubresourceFilterActionsHistogram, kActionUIShown, | 876 tester.ExpectBucketCount(kSubresourceFilterActionsHistogram, kActionUIShown, |
| 856 2); | 877 2); |
| 857 } | 878 } |
| 858 | 879 |
| 859 IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest, | 880 IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest, |
| 860 CrossSiteSubFrameActivationWithoutWhitelist) { | 881 CrossSiteSubFrameActivationWithoutWhitelist) { |
| 861 GURL a_url(embedded_test_server()->GetURL( | 882 GURL a_url(embedded_test_server()->GetURL( |
| 862 "a.com", "/subresource_filter/frame_cross_site_set.html")); | 883 "a.com", "/subresource_filter/frame_cross_site_set.html")); |
| 863 ConfigureAsPhishingURL(a_url); | 884 ConfigureAsPhishingURL(a_url); |
| 864 ASSERT_NO_FATAL_FAILURE( | 885 ASSERT_NO_FATAL_FAILURE( |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 975 EXPECT_TRUE(WasParsedScriptElementLoaded(web_contents()->GetMainFrame())); | 996 EXPECT_TRUE(WasParsedScriptElementLoaded(web_contents()->GetMainFrame())); |
| 976 | 997 |
| 977 // A cross site blacklisted navigation should stay activated, however. | 998 // A cross site blacklisted navigation should stay activated, however. |
| 978 GURL a_url(embedded_test_server()->GetURL( | 999 GURL a_url(embedded_test_server()->GetURL( |
| 979 "a.com", "/subresource_filter/frame_with_included_script.html")); | 1000 "a.com", "/subresource_filter/frame_with_included_script.html")); |
| 980 ConfigureAsPhishingURL(a_url); | 1001 ConfigureAsPhishingURL(a_url); |
| 981 ui_test_utils::NavigateToURL(browser(), a_url); | 1002 ui_test_utils::NavigateToURL(browser(), a_url); |
| 982 EXPECT_FALSE(WasParsedScriptElementLoaded(web_contents()->GetMainFrame())); | 1003 EXPECT_FALSE(WasParsedScriptElementLoaded(web_contents()->GetMainFrame())); |
| 983 } | 1004 } |
| 984 | 1005 |
| 1006 IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest, | |
| 1007 SiteDeactivated_ContentSettingCleared) { | |
| 1008 HostContentSettingsMap* settings_map = | |
| 1009 HostContentSettingsMapFactory::GetForProfile(browser()->profile()); | |
| 1010 ContentSettingsForOneType host_settings; | |
| 1011 settings_map->GetSettingsForOneType( | |
| 1012 ContentSettingsType::CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, | |
| 1013 std::string(), &host_settings); | |
| 1014 | |
| 1015 // Originally should just have a single default rule: * -> Allowed. | |
| 1016 EXPECT_EQ(1u, host_settings.size()); | |
| 1017 | |
| 1018 ASSERT_NO_FATAL_FAILURE( | |
| 1019 SetRulesetToDisallowURLsWithPathSuffix("included_script.js")); | |
| 1020 GURL url(GetTestUrl("subresource_filter/frame_with_included_script.html")); | |
| 1021 ConfigureAsPhishingURL(url); | |
| 1022 | |
| 1023 EXPECT_EQ(CONTENT_SETTING_ALLOW, settings_manager()->GetContentSetting(url)); | |
| 1024 ui_test_utils::NavigateToURL(browser(), url); | |
| 1025 EXPECT_EQ(CONTENT_SETTING_ALLOW, settings_manager()->GetContentSetting(url)); | |
| 1026 | |
| 1027 // Should have two rules now, one explicitly setting the origin of |url| to | |
|
msramek
2017/04/13 16:48:32
This looks really wrong to me. I have one setting,
| |
| 1028 // Allow. | |
| 1029 settings_map->GetSettingsForOneType( | |
| 1030 ContentSettingsType::CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, | |
| 1031 std::string(), &host_settings); | |
| 1032 EXPECT_EQ(2u, host_settings.size()); | |
| 1033 | |
| 1034 // Configure a different URL as the phishing URL, which resets |url|. | |
| 1035 ConfigureAsPhishingURL(GURL("https://example.other/")); | |
| 1036 | |
| 1037 // Re-navigating to |url| should reset the content setting. | |
| 1038 ui_test_utils::NavigateToURL(browser(), url); | |
| 1039 settings_map->GetSettingsForOneType( | |
| 1040 ContentSettingsType::CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, | |
| 1041 std::string(), &host_settings); | |
| 1042 EXPECT_EQ(1u, host_settings.size()); | |
| 1043 EXPECT_TRUE(WasParsedScriptElementLoaded(web_contents()->GetMainFrame())); | |
| 1044 } | |
| 1045 | |
| 1046 // Test the "smart" UI, aka the logic to hide the UI on subsequent same-domain | |
| 1047 // navigations, until a certain time threshold has been reached. This is an | |
| 1048 // android-only feature. | |
| 1049 IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest, | |
| 1050 DoNotShowUIUntilThresholdReached) { | |
| 1051 ASSERT_NO_FATAL_FAILURE( | |
| 1052 SetRulesetToDisallowURLsWithPathSuffix("included_script.js")); | |
| 1053 GURL a_url(embedded_test_server()->GetURL( | |
| 1054 "a.com", "/subresource_filter/frame_with_included_script.html")); | |
| 1055 GURL b_url(embedded_test_server()->GetURL( | |
| 1056 "b.com", "/subresource_filter/frame_with_included_script.html")); | |
| 1057 // Test utils only support one blacklisted site at a time. | |
| 1058 // TODO(csharrison): Add support for more than one URL. | |
| 1059 ConfigureAsPhishingURL(a_url); | |
| 1060 | |
| 1061 // Cast is safe because this is the only type of client in non-unittest code. | |
| 1062 ChromeSubresourceFilterClient* client = | |
| 1063 static_cast<ChromeSubresourceFilterClient*>( | |
| 1064 ContentSubresourceFilterDriverFactory::FromWebContents(web_contents()) | |
| 1065 ->client()); | |
| 1066 auto test_clock = base::MakeUnique<base::SimpleTestClock>(); | |
| 1067 base::SimpleTestClock* raw_clock = test_clock.get(); | |
| 1068 settings_manager()->set_clock_for_testing(std::move(test_clock)); | |
| 1069 | |
| 1070 base::HistogramTester histogram_tester; | |
| 1071 | |
| 1072 // First load should trigger the UI. | |
| 1073 ui_test_utils::NavigateToURL(browser(), a_url); | |
| 1074 EXPECT_FALSE(WasParsedScriptElementLoaded(web_contents()->GetMainFrame())); | |
| 1075 EXPECT_TRUE(client->shown_for_navigation()); | |
| 1076 | |
| 1077 histogram_tester.ExpectBucketCount(kSubresourceFilterActionsHistogram, | |
| 1078 kActionUISuppressed, 0); | |
| 1079 | |
| 1080 // Second load should not trigger the UI, but should still filter content. | |
| 1081 ui_test_utils::NavigateToURL(browser(), a_url); | |
| 1082 EXPECT_FALSE(WasParsedScriptElementLoaded(web_contents()->GetMainFrame())); | |
| 1083 | |
| 1084 bool use_smart_ui = settings_manager()->should_use_smart_ui(); | |
| 1085 EXPECT_EQ(client->shown_for_navigation(), !use_smart_ui); | |
| 1086 | |
| 1087 histogram_tester.ExpectBucketCount(kSubresourceFilterActionsHistogram, | |
| 1088 kActionUISuppressed, use_smart_ui ? 1 : 0); | |
| 1089 | |
| 1090 ConfigureAsPhishingURL(b_url); | |
| 1091 | |
| 1092 // Load to another domain should trigger the UI. | |
| 1093 ui_test_utils::NavigateToURL(browser(), b_url); | |
| 1094 EXPECT_FALSE(WasParsedScriptElementLoaded(web_contents()->GetMainFrame())); | |
| 1095 EXPECT_TRUE(client->shown_for_navigation()); | |
| 1096 | |
| 1097 ConfigureAsPhishingURL(a_url); | |
| 1098 | |
| 1099 // Fast forward the clock, and a_url should trigger the UI again. | |
| 1100 raw_clock->Advance( | |
| 1101 SubresourceFilterContentSettingsManager::kDelayBeforeShowingInfobarAgain); | |
| 1102 ui_test_utils::NavigateToURL(browser(), a_url); | |
| 1103 EXPECT_FALSE(WasParsedScriptElementLoaded(web_contents()->GetMainFrame())); | |
| 1104 EXPECT_TRUE(client->shown_for_navigation()); | |
| 1105 | |
| 1106 histogram_tester.ExpectBucketCount(kSubresourceFilterActionsHistogram, | |
| 1107 kActionUISuppressed, use_smart_ui ? 1 : 0); | |
| 1108 } | |
| 1109 | |
| 985 IN_PROC_BROWSER_TEST_P(SubresourceFilterWebSocketBrowserTest, BlockWebSocket) { | 1110 IN_PROC_BROWSER_TEST_P(SubresourceFilterWebSocketBrowserTest, BlockWebSocket) { |
| 986 GURL url(GetTestUrl( | 1111 GURL url(GetTestUrl( |
| 987 base::StringPrintf("subresource_filter/page_with_websocket.html?%s", | 1112 base::StringPrintf("subresource_filter/page_with_websocket.html?%s", |
| 988 GetParam() == IN_WORKER ? "inWorker" : ""))); | 1113 GetParam() == IN_WORKER ? "inWorker" : ""))); |
| 989 GURL websocket_url(GetWebSocketUrl("echo-with-no-extension")); | 1114 GURL websocket_url(GetWebSocketUrl("echo-with-no-extension")); |
| 990 ConfigureAsPhishingURL(url); | 1115 ConfigureAsPhishingURL(url); |
| 991 ASSERT_NO_FATAL_FAILURE( | 1116 ASSERT_NO_FATAL_FAILURE( |
| 992 SetRulesetToDisallowURLsWithPathSuffix("echo-with-no-extension")); | 1117 SetRulesetToDisallowURLsWithPathSuffix("echo-with-no-extension")); |
| 993 ui_test_utils::NavigateToURL(browser(), url); | 1118 ui_test_utils::NavigateToURL(browser(), url); |
| 994 CreateWebSocketAndExpectResult(websocket_url, | 1119 CreateWebSocketAndExpectResult(websocket_url, |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1344 std::string(kSubresourceFilterOnlySuffix)), | 1469 std::string(kSubresourceFilterOnlySuffix)), |
| 1345 ::testing::IsEmpty()); | 1470 ::testing::IsEmpty()); |
| 1346 | 1471 |
| 1347 EXPECT_THAT(tester.GetAllSamples(std::string(kNavigationChainSize) + | 1472 EXPECT_THAT(tester.GetAllSamples(std::string(kNavigationChainSize) + |
| 1348 std::string(kSubresourceFilterOnlySuffix)), | 1473 std::string(kSubresourceFilterOnlySuffix)), |
| 1349 ::testing::IsEmpty()); | 1474 ::testing::IsEmpty()); |
| 1350 } | 1475 } |
| 1351 #endif | 1476 #endif |
| 1352 | 1477 |
| 1353 } // namespace subresource_filter | 1478 } // namespace subresource_filter |
| OLD | NEW |