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

Unified Diff: chrome/browser/autofill/autofill_interactive_uitest.cc

Issue 1164823002: Remove URLRequestStatus mutators and introduce FromError. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: chrome/browser/autofill/autofill_interactive_uitest.cc
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc
index 9aa9017e478671f8ce09182e7e84c13356b19d14..2d75a025954e889cf2e37c2f081105fd63a2ae89 100644
--- a/chrome/browser/autofill/autofill_interactive_uitest.cc
+++ b/chrome/browser/autofill/autofill_interactive_uitest.cc
@@ -46,7 +46,9 @@
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_renderer_host.h"
+#include "net/base/net_errors.h"
#include "net/url_request/test_url_fetcher_factory.h"
+#include "net/url_request/url_request_status.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/keycodes/keyboard_codes.h"
@@ -221,9 +223,7 @@ class AutofillInteractiveTest : public InProcessBrowserTest {
void SimulateURLFetch(bool success) {
net::TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0);
ASSERT_TRUE(fetcher);
- net::URLRequestStatus status;
- status.set_status(success ? net::URLRequestStatus::SUCCESS :
- net::URLRequestStatus::FAILED);
+ int error = success ? net::OK : net::ERR_FAILED;
mmenke 2015/06/02 18:41:33 Suggest making these net::Errors - not the current
davidben 2015/06/02 19:19:42 Done. Should I also change URLRequestStatus? I lef
mmenke 2015/06/02 19:22:25 I guess we never store (Or *should* never store) b
std::string script = " var google = {};"
"google.translate = (function() {"
@@ -253,7 +253,7 @@ class AutofillInteractiveTest : public InProcessBrowserTest {
"cr.googleTranslate.onTranslateElementLoad();";
fetcher->set_url(fetcher->GetOriginalURL());
- fetcher->set_status(status);
+ fetcher->set_status(net::URLRequestStatus::FromError(error));
fetcher->set_response_code(success ? 200 : 500);
fetcher->SetResponseString(script);
fetcher->delegate()->OnURLFetchComplete(fetcher);
« no previous file with comments | « no previous file | chrome/browser/translate/translate_browsertest.cc » ('j') | components/domain_reliability/monitor_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698