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

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

Issue 1151273002: PDF: Run PDFExtensionTests with Material UI enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pdf_material_polymer_v08
Patch Set: Created 5 years, 7 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/data/pdf/basic_test_material.js » ('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 98fdea955bf7dd3fbe2133b6e1da1c3a235afba6..9cfc8da82af0699c507fb4813cd517995dde3313 100644
--- a/chrome/browser/pdf/pdf_extension_test.cc
+++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -31,6 +31,10 @@ class PDFExtensionTest : public ExtensionApiTest,
public:
~PDFExtensionTest() override {}
+ void SetUpCommandLine(base::CommandLine* command_line) override {
+ command_line->AppendSwitch(switches::kDisablePdfMaterialUI);
+ }
+
void SetUpOnMainThread() override {
ExtensionApiTest::SetUpOnMainThread();
ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
@@ -190,3 +194,37 @@ IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ParamsParser) {
IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ZoomManager) {
RunTestsInFile("zoom_manager_test.js", "test.pdf");
}
+
+class MaterialPDFExtensionTest : public PDFExtensionTest {
+ void SetUpCommandLine(base::CommandLine* command_line) override {
+ command_line->AppendSwitch(switches::kEnablePdfMaterialUI);
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Basic) {
+ RunTestsInFile("basic_test_material.js", "test.pdf");
+}
+
+IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, BasicPlugin) {
+ RunTestsInFile("basic_plugin_test.js", "test.pdf");
+}
+
+IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Viewport) {
+ RunTestsInFile("viewport_test.js", "test.pdf");
+}
+
+IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Bookmark) {
+ RunTestsInFile("bookmarks_test.js", "test-bookmarks.pdf");
+}
+
+IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Navigator) {
+ RunTestsInFile("navigator_test.js", "test.pdf");
+}
+
+IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, ParamsParser) {
+ RunTestsInFile("params_parser_test.js", "test.pdf");
+}
+
+IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, ZoomManager) {
+ RunTestsInFile("zoom_manager_test.js", "test.pdf");
+}
« no previous file with comments | « no previous file | chrome/test/data/pdf/basic_test_material.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698