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

Unified Diff: chrome/browser/intents/cws_intents_registry_unittest.cc

Issue 9562037: Move TestURLRequestContextGetter to url_request_test_util.{h,cc} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change comment Created 8 years, 10 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/intents/cws_intents_registry_unittest.cc
diff --git a/chrome/browser/intents/cws_intents_registry_unittest.cc b/chrome/browser/intents/cws_intents_registry_unittest.cc
index dcd0e0b3349307f284c629df9546722562b30411..2c258f5e20f52b5ce09edff3dc84e34583ad1358 100644
--- a/chrome/browser/intents/cws_intents_registry_unittest.cc
+++ b/chrome/browser/intents/cws_intents_registry_unittest.cc
@@ -8,8 +8,8 @@
#include "base/bind_helpers.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
-#include "chrome/test/base/test_url_request_context_getter.h"
#include "content/test/test_url_fetcher_factory.h"
+#include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -91,17 +91,18 @@ class CWSIntentsRegistryTest : public testing::Test {
CWSIntentsRegistry::IntentExtensionList extensions_;
FakeURLFetcherFactory test_factory_;
- private:
+ protected:
MessageLoop ui_loop_;
};
} // namespace
TEST_F(CWSIntentsRegistryTest, ValidQuery) {
- TestURLRequestContextGetter context_getter;
+ const scoped_refptr<TestURLRequestContextGetter> context_getter(
+ new TestURLRequestContextGetter(ui_loop_.message_loop_proxy()));
test_factory_.SetFakeResponse(kCWSQueryValid, kCWSResponseValid, true);
- CWSIntentsRegistry registry(&context_getter);
+ CWSIntentsRegistry registry(context_getter);
registry.GetIntentServices(ASCIIToUTF16("http://webintents.org/edit"),
ASCIIToUTF16("*/png"),
base::Bind(&CWSIntentsRegistryTest::Callback,
@@ -117,10 +118,11 @@ TEST_F(CWSIntentsRegistryTest, ValidQuery) {
}
TEST_F(CWSIntentsRegistryTest, InvalidQuery) {
- TestURLRequestContextGetter context_getter;
+ const scoped_refptr<TestURLRequestContextGetter> context_getter(
+ new TestURLRequestContextGetter(ui_loop_.message_loop_proxy()));
test_factory_.SetFakeResponse(kCWSQueryInvalid, kCWSResponseInvalid, true);
- CWSIntentsRegistry registry(&context_getter);
+ CWSIntentsRegistry registry(context_getter);
registry.GetIntentServices(ASCIIToUTF16("foo"),
ASCIIToUTF16("foo"),
base::Bind(&CWSIntentsRegistryTest::Callback,

Powered by Google App Engine
This is Rietveld 408576698