summaryrefslogtreecommitdiffstats
path: root/components/dom_distiller
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-17 14:50:50 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-17 14:50:50 +0000
commitf84b5338dfaf39bfe3cf86fbf18d1b3f035dbbf7 (patch)
tree82b636343d4d9d611979a2f23b964f50c089b698 /components/dom_distiller
parent4b4db8717cc71a0d04dadf76e57a6a2f341577a4 (diff)
downloadchromium_src-f84b5338dfaf39bfe3cf86fbf18d1b3f035dbbf7.zip
chromium_src-f84b5338dfaf39bfe3cf86fbf18d1b3f035dbbf7.tar.gz
chromium_src-f84b5338dfaf39bfe3cf86fbf18d1b3f035dbbf7.tar.bz2
components: Refactor the initialization of ResourceBundle for unit tests.
ResourceBundle should not be initialized in a single test case in dom_distiller. Instead it should be initialized once and for all test cases. By initializing it early and in the main function it means we can make it available for consumption for everyone who needs it. This also clears the instance we created after the tests are done, which we were not doing in dom_distiller. It does not contain any functional changes yet, so android should not be affected. BUG=329030 TEST=components_unittests, no functional changes. R=joi@chromium.org,tony@chromium.org,blundell@chromium.org Review URL: https://codereview.chromium.org/99133024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241284 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/dom_distiller')
-rw-r--r--components/dom_distiller/DEPS2
-rw-r--r--components/dom_distiller/core/distiller_unittest.cc15
2 files changed, 0 insertions, 17 deletions
diff --git a/components/dom_distiller/DEPS b/components/dom_distiller/DEPS
index 1c12a78..07b7999 100644
--- a/components/dom_distiller/DEPS
+++ b/components/dom_distiller/DEPS
@@ -5,9 +5,7 @@ include_rules = [
"+third_party/leveldatabase/src/include",
"+net/http",
"+net/url_request",
- "+ui/base/android",
"+ui/base/resource",
- "+ui/gfx/android",
# The dom distiller is a layered component; subdirectories must explicitly
# introduce the ability to use the content layer as appropriate.
diff --git a/components/dom_distiller/core/distiller_unittest.cc b/components/dom_distiller/core/distiller_unittest.cc
index 248340b..3784fd5 100644
--- a/components/dom_distiller/core/distiller_unittest.cc
+++ b/components/dom_distiller/core/distiller_unittest.cc
@@ -16,13 +16,6 @@
#include "net/url_request/url_request_context_getter.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/base/resource/resource_bundle.h"
-
-#if defined(OS_ANDROID)
-#include "base/android/jni_android.h"
-#include "ui/base/android/ui_base_jni_registrar.h"
-#include "ui/gfx/android/gfx_jni_registrar.h"
-#endif
using::testing::Invoke;
using::testing::Return;
@@ -131,14 +124,6 @@ ACTION_P2(CreateMockDistillerPage, list, kurl) {
}
TEST_F(DistillerTest, DistillPage) {
-#if defined(OS_ANDROID)
- // Register JNI bindings for android.
- JNIEnv* env = base::android::AttachCurrentThread();
- gfx::android::RegisterJni(env);
- ui::android::RegisterJni(env);
-#endif
-
- ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
base::MessageLoop loop(base::MessageLoop::TYPE_UI);
scoped_ptr<base::ListValue> list(new base::ListValue());
list->AppendString(kTitle);