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

Unified Diff: components/dom_distiller/content/distillable_page_utils_browsertest.cc

Issue 1075783002: Enable components_browsertests on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DistillerPageWebContentsTest and DomDistillerDistillablePageUtilsTest Created 5 years, 8 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: components/dom_distiller/content/distillable_page_utils_browsertest.cc
diff --git a/components/dom_distiller/content/distillable_page_utils_browsertest.cc b/components/dom_distiller/content/distillable_page_utils_browsertest.cc
index 952598289d34d1dc9164562cb744047132b0121c..b47bbaf385b8f2d56c1af1857f0dffd6fbc49f74 100644
--- a/components/dom_distiller/content/distillable_page_utils_browsertest.cc
+++ b/components/dom_distiller/content/distillable_page_utils_browsertest.cc
@@ -48,11 +48,20 @@ class DomDistillerDistillablePageUtilsTest : public content::ContentBrowserTest,
private:
void AddComponentsResources() {
+#if defined(OS_ANDROID)
+ base::FilePath pak_file;
jbudorick 2015/04/10 13:34:31 Would it be better to just have the Android-specif
Jaekyun Seok (inactive) 2015/04/13 01:36:02 Done.
+ bool r = PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_file);
+ CHECK(r);
+ pak_file = pak_file.Append(FILE_PATH_LITERAL("paks"));
+ pak_file =
+ pak_file.Append(FILE_PATH_LITERAL("components_tests_resources.pak"));
+#else
base::FilePath pak_file;
base::FilePath pak_dir;
PathService::Get(base::DIR_MODULE, &pak_dir);
pak_file =
pak_dir.Append(FILE_PATH_LITERAL("components_tests_resources.pak"));
+#endif // OS_ANDROID
ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
pak_file, ui::SCALE_FACTOR_NONE);
}

Powered by Google App Engine
This is Rietveld 408576698