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

Side by Side Diff: content/browser/speech/speech_recognition_request_unittest.cc

Issue 8395038: Make test URLFetcher implementations not derive from the URLFetcher implementation, since we want... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: move factory to its own file and remove Create function from URLFetcher impl Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/message_loop.h"
5 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
6 #include "content/browser/speech/speech_recognition_request.h" 7 #include "content/browser/speech/speech_recognition_request.h"
7 #include "content/test/test_url_fetcher_factory.h" 8 #include "content/test/test_url_fetcher_factory.h"
8 #include "net/url_request/url_request_context_getter.h" 9 #include "net/url_request/url_request_context_getter.h"
9 #include "net/url_request/url_request_status.h" 10 #include "net/url_request/url_request_status.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 namespace speech_input { 13 namespace speech_input {
13 14
14 class SpeechRecognitionRequestTest : public SpeechRecognitionRequestDelegate, 15 class SpeechRecognitionRequestTest : public SpeechRecognitionRequestDelegate,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 EXPECT_EQ(0U, result_.hypotheses.size()); 96 EXPECT_EQ(0U, result_.hypotheses.size());
96 97
97 // Malformed JSON case. 98 // Malformed JSON case.
98 CreateAndTestRequest(true, "{\"status\":0,\"hypotheses\":" 99 CreateAndTestRequest(true, "{\"status\":0,\"hypotheses\":"
99 "[{\"unknownkey\":\"hello\"}]}"); 100 "[{\"unknownkey\":\"hello\"}]}");
100 EXPECT_EQ(result_.error, kErrorNetwork); 101 EXPECT_EQ(result_.error, kErrorNetwork);
101 EXPECT_EQ(0U, result_.hypotheses.size()); 102 EXPECT_EQ(0U, result_.hypotheses.size());
102 } 103 }
103 104
104 } // namespace speech_input 105 } // namespace speech_input
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698