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

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: 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 64b73fada0d2172f70cea11e3956d5416a41ff54..fbbf4dbc590dc3a485a3f0dee07c340d18245a88 100644
--- a/chrome/browser/resources/pdf/pdf_extension_test.cc
+++ b/chrome/browser/resources/pdf/pdf_extension_test.cc
@@ -40,7 +40,7 @@ class PDFExtensionTest : public ExtensionApiTest {
ExtensionApiTest::TearDownOnMainThread();
}
- void RunTestsInFile(std::string filename) {
+ void RunTestsInFile(std::string filename, std::string pdf_filename) {
base::FilePath pdf_path;
ASSERT_TRUE(PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path));
ASSERT_TRUE(
@@ -60,7 +60,7 @@ class PDFExtensionTest : public ExtensionApiTest {
extensions::ResultCatcher catcher;
- GURL url(embedded_test_server()->GetURL("/pdf/test.pdf"));
+ GURL url(embedded_test_server()->GetURL("/pdf/" + pdf_filename));
GURL extension_url(
"chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html?" +
url.spec());
@@ -85,13 +85,17 @@ class PDFExtensionTest : public ExtensionApiTest {
};
IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Basic) {
- RunTestsInFile("basic_test.js");
+ RunTestsInFile("basic_test.js", "test.pdf");
}
IN_PROC_BROWSER_TEST_F(PDFExtensionTest, BasicPlugin) {
- RunTestsInFile("basic_plugin_test.js");
+ RunTestsInFile("basic_plugin_test.js", "test.pdf");
}
IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Viewport) {
- RunTestsInFile("viewport_test.js");
+ RunTestsInFile("viewport_test.js", "test.pdf");
+}
+
+IN_PROC_BROWSER_TEST_F(PDFExtensionTest, NamedDestionations) {
+ RunTestsInFile("nameddestinations_test.js", "test_nameddestinations.pdf");
raymes 2015/01/23 00:01:44 Since we're not actually using the PDF involved, w
Deepak 2015/01/23 14:05:15 Done.
}
« no previous file with comments | « no previous file | chrome/test/data/pdf/nameddestinations_test.js » ('j') | chrome/test/data/pdf/nameddestinations_test.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698