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

Unified Diff: content/browser/speech/google_streaming_remote_engine_unittest.cc

Issue 1239993004: Fix all failed and canceled URLRequestStatuses without errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more failures Created 5 years, 4 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: content/browser/speech/google_streaming_remote_engine_unittest.cc
diff --git a/content/browser/speech/google_streaming_remote_engine_unittest.cc b/content/browser/speech/google_streaming_remote_engine_unittest.cc
index c3d7ce5c4e1be68ae49b3a3c6150b8b486a5a15b..adc8bad49ea22c139a3974257ba3dc46e452610c 100644
--- a/content/browser/speech/google_streaming_remote_engine_unittest.cc
+++ b/content/browser/speech/google_streaming_remote_engine_unittest.cc
@@ -15,6 +15,7 @@
#include "content/browser/speech/proto/google_streaming_api.pb.h"
#include "content/public/common/speech_recognition_error.h"
#include "content/public/common/speech_recognition_result.h"
+#include "net/base/net_errors.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_status.h"
@@ -499,10 +500,9 @@ void GoogleStreamingRemoteEngineTest::CloseMockDownstream(
TestURLFetcher* downstream_fetcher = GetDownstreamFetcher();
ASSERT_TRUE(downstream_fetcher);
- const URLRequestStatus::Status fetcher_status =
- (error == DOWNSTREAM_ERROR_NETWORK) ? URLRequestStatus::FAILED :
- URLRequestStatus::SUCCESS;
- downstream_fetcher->set_status(URLRequestStatus(fetcher_status, 0));
+ const net::Error net_error =
+ (error == DOWNSTREAM_ERROR_NETWORK) ? net::ERR_FAILED : net::OK;
+ downstream_fetcher->set_status(URLRequestStatus::FromError(net_error));
downstream_fetcher->set_response_code(
(error == DOWNSTREAM_ERROR_HTTP500) ? 500 : 200);
« no previous file with comments | « content/browser/geolocation/network_location_provider_unittest.cc ('k') | google_apis/gaia/gaia_auth_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698