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

Unified Diff: chrome/browser/download/save_page_browsertest.cc

Issue 2854693002: Remove a host_resolver()->ClearRules call in a test body and replace it with an AddRule call that h… (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_page_browsertest.cc
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc
index 9ed8b3a526159ffdd76490f9aba2822604a39eb8..c0b7b717e86ddaad0399ddbabc01a0923ce577c6 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -880,6 +880,9 @@ class SavePageSitePerProcessBrowserTest : public SavePageBrowserTest {
void SetUpOnMainThread() override {
SavePageBrowserTest::SetUpOnMainThread();
+ // Used by the BrokenImage test which depends on *.no.such.host not
+ // resolving to 127.0.0.1
+ host_resolver()->AddRule("no.such.host", "128.0.0.1");
host_resolver()->AddRule("*", "127.0.0.1");
ASSERT_TRUE(embedded_test_server()->InitializeAndListen());
content::SetupCrossSiteRedirector(embedded_test_server());
@@ -1331,10 +1334,6 @@ IN_PROC_BROWSER_TEST_P(SavePageOriginalVsSavedComparisonTest, Style) {
// - Broken, undecodable image (see also https://crbug.com/586680)
// - Broken link, to unresolvable host (see also https://crbug.com/594219)
IN_PROC_BROWSER_TEST_P(SavePageOriginalVsSavedComparisonTest, BrokenImage) {
- // Clear resolver rules to make sure that *.no.such.host used in the test html
- // doesn't resolve to 127.0.0.1
- host_resolver()->ClearRules();
-
content::SavePageType save_page_type = GetParam();
std::string arr[] = {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698