summaryrefslogtreecommitdiffstats
path: root/chrome/browser/intents
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-02 22:56:01 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-02 22:56:01 +0000
commit4473860ddb85d92fb2fda427f4dabd3415c69c43 (patch)
tree7d77e45863b029707bb7b78afe2dd8e8fa5f7add /chrome/browser/intents
parent533e8fe4288e72f87d50479580665b5ec68a8e1b (diff)
downloadchromium_src-4473860ddb85d92fb2fda427f4dabd3415c69c43.zip
chromium_src-4473860ddb85d92fb2fda427f4dabd3415c69c43.tar.gz
chromium_src-4473860ddb85d92fb2fda427f4dabd3415c69c43.tar.bz2
Move TestURLRequestContextGetter to url_request_test_util.{h,cc}
Make everything use this instead of rolling their own. BUG=113723 TEST= Review URL: https://chromiumcodereview.appspot.com/9562037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/intents')
-rw-r--r--chrome/browser/intents/cws_intents_registry_unittest.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/intents/cws_intents_registry_unittest.cc b/chrome/browser/intents/cws_intents_registry_unittest.cc
index dcd0e0b..2c258f5 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,