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

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

Issue 838723003: Testcases for nameddests and navigate for PDF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nit. Created 5 years, 11 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/resources/pdf/pdf_extension_test.cc
diff --git a/chrome/browser/resources/pdf/pdf_extension_test.cc b/chrome/browser/resources/pdf/pdf_extension_test.cc
index 699669f7d19daedddec62fe6ef6bd9ce72d8ed11..940e8f8f17db6bbf411f1032593972f10d72050b 100644
--- a/chrome/browser/resources/pdf/pdf_extension_test.cc
+++ b/chrome/browser/resources/pdf/pdf_extension_test.cc
@@ -73,10 +73,17 @@ class PDFExtensionTest : public ExtensionApiTest {
PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir);
test_data_dir = test_data_dir.Append(
FILE_PATH_LITERAL("chrome/test/data/pdf"));
- test_data_dir = test_data_dir.AppendASCII(filename);
+
raymes 2015/01/29 04:27:13 nit: no need to add a newline
Deepak 2015/01/29 06:05:41 Done.
+ base::FilePath test_file_data_dir = test_data_dir.AppendASCII(filename);
raymes 2015/01/29 04:27:13 this can be called "test_file_path"
Deepak 2015/01/29 06:05:41 Done.
std::string test_js;
- ASSERT_TRUE(base::ReadFileToString(test_data_dir, &test_js));
+ ASSERT_TRUE(base::ReadFileToString(test_file_data_dir, &test_js));
+
+ std::string test_common_js;
raymes 2015/01/29 04:27:13 test_util_js
Deepak 2015/01/29 06:05:41 Done.
+ test_data_dir = test_data_dir.AppendASCII("test_util.js");
raymes 2015/01/29 04:27:13 Create a separate base::FilePath here called "test
Deepak 2015/01/29 06:05:41 Done.
+ ASSERT_TRUE(base::ReadFileToString(test_data_dir, &test_common_js));
+ test_js.append(test_common_js);
raymes 2015/01/29 04:27:13 I would append the test_common_js before the test_
Deepak 2015/01/29 06:05:41 Done.
+
ASSERT_TRUE(content::ExecuteScript(contents, test_js));
if (!catcher.GetNextResult())
@@ -99,3 +106,11 @@ IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Viewport) {
IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Bookmark) {
RunTestsInFile("bookmarks_test.js", "test-bookmarks.pdf");
}
+
+IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Navigator) {
+ RunTestsInFile("navigator_test.js", "test.pdf");
+}
+
+IN_PROC_BROWSER_TEST_F(PDFExtensionTest, NamedDestionations) {
+ RunTestsInFile("params_parser_test.js", "test.pdf");
+}

Powered by Google App Engine
This is Rietveld 408576698