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

Side by Side Diff: components/error_page/renderer/net_error_helper_core_unittest.cc

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/error_page/renderer/net_error_helper_core.h" 5 #include "components/error_page/renderer/net_error_helper_core.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 NavigationCorrectionsLoadFinished( 267 NavigationCorrectionsLoadFinished(
268 SuggestionsToResponse(corrections, num_corrections)); 268 SuggestionsToResponse(corrections, num_corrections));
269 } 269 }
270 270
271 void NavigationCorrectionsLoadFailure() { 271 void NavigationCorrectionsLoadFailure() {
272 NavigationCorrectionsLoadFinished(""); 272 NavigationCorrectionsLoadFinished("");
273 } 273 }
274 274
275 void NavigationCorrectionsLoadFinished(const std::string& result) { 275 void NavigationCorrectionsLoadFinished(const std::string& result) {
276 url_being_fetched_ = GURL(); 276 url_being_fetched_ = GURL();
277 core()->OnNavigationCorrectionsFetched(result, "en", false); 277 core()->OnNavigationCorrectionsFetched(result, false);
278 } 278 }
279 279
280 void DoErrorLoadOfURL(net::Error error, const GURL& url) { 280 void DoErrorLoadOfURL(net::Error error, const GURL& url) {
281 core()->OnStartLoad(NetErrorHelperCore::MAIN_FRAME, 281 core()->OnStartLoad(NetErrorHelperCore::MAIN_FRAME,
282 NetErrorHelperCore::NON_ERROR_PAGE); 282 NetErrorHelperCore::NON_ERROR_PAGE);
283 std::string html; 283 std::string html;
284 core()->GetErrorHTML(NetErrorHelperCore::MAIN_FRAME, 284 core()->GetErrorHTML(NetErrorHelperCore::MAIN_FRAME,
285 NetErrorForURL(error, url), false /* is_failed_post */, 285 NetErrorForURL(error, url), false /* is_failed_post */,
286 false /* is_ignoring_cache */, &html); 286 false /* is_ignoring_cache */, &html);
287 EXPECT_FALSE(html.empty()); 287 EXPECT_FALSE(html.empty());
(...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2581 DoErrorLoad(net::ERR_INTERNET_DISCONNECTED); 2581 DoErrorLoad(net::ERR_INTERNET_DISCONNECTED);
2582 EXPECT_TRUE(last_has_offline_pages()); 2582 EXPECT_TRUE(last_has_offline_pages());
2583 EXPECT_EQ(0, show_offline_pages_count()); 2583 EXPECT_EQ(0, show_offline_pages_count());
2584 core()->ExecuteButtonPress(NetErrorHelperCore::SHOW_OFFLINE_PAGES_BUTTON); 2584 core()->ExecuteButtonPress(NetErrorHelperCore::SHOW_OFFLINE_PAGES_BUTTON);
2585 EXPECT_EQ(1, show_offline_pages_count()); 2585 EXPECT_EQ(1, show_offline_pages_count());
2586 } 2586 }
2587 #endif // defined(OS_ANDROID) 2587 #endif // defined(OS_ANDROID)
2588 2588
2589 } // namespace 2589 } // namespace
2590 } // namespace error_page 2590 } // namespace error_page
OLDNEW
« no previous file with comments | « components/error_page/renderer/net_error_helper_core.cc ('k') | components/history/core/browser/history_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698