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

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

Issue 840493002: Introduce new test for bookmark loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks-minimal
Patch Set: Use ScriptingAPI to wait for bookmarks 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 e738d4fc0cc68ab43d6120be3f98ae4817a8db7d..e43cb8db8583e4abc580e378aa991ef3e39bc86d 100644
--- a/chrome/browser/resources/pdf/pdf_extension_test.cc
+++ b/chrome/browser/resources/pdf/pdf_extension_test.cc
@@ -38,7 +38,9 @@ class PDFExtensionTest : public ExtensionApiTest {
ExtensionApiTest::TearDownOnMainThread();
}
- void RunTestsInFile(std::string filename, bool requiresPlugin) {
+ void RunTestsInFile(std::string filename,
+ std::string pdf_filename,
+ bool requiresPlugin) {
raymes 2015/01/15 05:40:19 nit: can you please remove the requiresPlugin para
Alexandre Carlton 2015/01/16 02:39:07 Done.
base::FilePath pdf_plugin_src;
PathService::Get(base::DIR_SOURCE_ROOT, &pdf_plugin_src);
pdf_plugin_src = pdf_plugin_src.AppendASCII("pdf");
@@ -61,7 +63,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());
@@ -86,13 +88,17 @@ class PDFExtensionTest : public ExtensionApiTest {
};
IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Basic) {
- RunTestsInFile("basic_test.js", false);
+ RunTestsInFile("basic_test.js", "test.pdf", false);
}
IN_PROC_BROWSER_TEST_F(PDFExtensionTest, BasicPlugin) {
- RunTestsInFile("basic_plugin_test.js", true);
+ RunTestsInFile("basic_plugin_test.js", "test.pdf", true);
}
IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Viewport) {
- RunTestsInFile("viewport_test.js", false);
+ RunTestsInFile("viewport_test.js", "test.pdf", false);
+}
+
+IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Bookmark) {
+ RunTestsInFile("bookmarks_test.js", "test-bookmarks.pdf", false);
}

Powered by Google App Engine
This is Rietveld 408576698