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

Unified Diff: chrome/browser/pdf/pdf_extension_test.cc

Issue 2949883006: PDFExtensionTest: Stop using chrome:// URL to load mock-interactions.js (Closed)
Patch Set: Add dependency Created 3 years, 6 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
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/pdf/pdf_extension_test.cc
diff --git a/chrome/browser/pdf/pdf_extension_test.cc b/chrome/browser/pdf/pdf_extension_test.cc
index d36e22dfd2884e2f367265d21db4ab583c5acf32..28410322d78348dafa911f9d2bbf2d3424daad1f 100644
--- a/chrome/browser/pdf/pdf_extension_test.cc
+++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -143,6 +143,7 @@ class PDFExtensionTest : public ExtensionApiTest,
WebContents* guest_contents = LoadPdfGetGuestContents(url);
ASSERT_TRUE(guest_contents);
std::string test_util_js;
+ std::string mock_interactions_js;
{
base::ThreadRestrictions::ScopedAllowIO allow_io;
@@ -152,6 +153,15 @@ class PDFExtensionTest : public ExtensionApiTest,
base::FilePath test_util_path = test_data_dir.AppendASCII("test_util.js");
ASSERT_TRUE(base::ReadFileToString(test_util_path, &test_util_js));
+ base::FilePath source_root_dir;
+ PathService::Get(base::DIR_SOURCE_ROOT, &source_root_dir);
+ base::FilePath mock_interactions_path = source_root_dir.Append(
+ FILE_PATH_LITERAL("third_party/polymer/v1_0/components-chromium/"
Lei Zhang 2017/06/24 00:13:46 Is it possible to use IDR_POLYMER_1_0_IRON_TEST_HE
dpapad 2017/06/24 00:40:53 This would defeat the purpose of this CL which is
Lei Zhang 2017/06/24 00:47:59 What about moving it to browser_tests.pak? i.e. mo
dpapad 2017/06/24 01:07:38 I can explore that if preferable, but at first gla
+ "iron-test-helpers/mock-interactions.js"));
+ ASSERT_TRUE(base::ReadFileToString(mock_interactions_path,
+ &mock_interactions_js));
+ test_util_js.append(mock_interactions_js);
+
base::FilePath test_file_path = test_data_dir.AppendASCII(filename);
std::string test_js;
ASSERT_TRUE(base::ReadFileToString(test_file_path, &test_js));
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698