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

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: typo 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
« no previous file with comments | « no previous file | chrome/browser/translate/translate_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..400c02dd54a043c75170523ac39b086c2c5e9fdf 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);
+ net::Error error = success ? net::OK : net::ERR_FAILED;
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698