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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/test/data/pdf/basic_test_material.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/files/file_enumerator.h" 6 #include "base/files/file_enumerator.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/hash.h" 8 #include "base/hash.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/browser/extensions/component_loader.h" 10 #include "chrome/browser/extensions/component_loader.h"
(...skipping 13 matching lines...) Expand all
24 #include "net/test/embedded_test_server/embedded_test_server.h" 24 #include "net/test/embedded_test_server/embedded_test_server.h"
25 #include "ui/base/resource/resource_bundle.h" 25 #include "ui/base/resource/resource_bundle.h"
26 26
27 const int kNumberLoadTestParts = 10; 27 const int kNumberLoadTestParts = 10;
28 28
29 class PDFExtensionTest : public ExtensionApiTest, 29 class PDFExtensionTest : public ExtensionApiTest,
30 public testing::WithParamInterface<int> { 30 public testing::WithParamInterface<int> {
31 public: 31 public:
32 ~PDFExtensionTest() override {} 32 ~PDFExtensionTest() override {}
33 33
34 void SetUpCommandLine(base::CommandLine* command_line) override {
35 command_line->AppendSwitch(switches::kDisablePdfMaterialUI);
36 }
37
34 void SetUpOnMainThread() override { 38 void SetUpOnMainThread() override {
35 ExtensionApiTest::SetUpOnMainThread(); 39 ExtensionApiTest::SetUpOnMainThread();
36 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 40 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
37 } 41 }
38 42
39 void TearDownOnMainThread() override { 43 void TearDownOnMainThread() override {
40 ASSERT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete()); 44 ASSERT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete());
41 ExtensionApiTest::TearDownOnMainThread(); 45 ExtensionApiTest::TearDownOnMainThread();
42 } 46 }
43 47
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 RunTestsInFile("navigator_test.js", "test.pdf"); 187 RunTestsInFile("navigator_test.js", "test.pdf");
184 } 188 }
185 189
186 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ParamsParser) { 190 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ParamsParser) {
187 RunTestsInFile("params_parser_test.js", "test.pdf"); 191 RunTestsInFile("params_parser_test.js", "test.pdf");
188 } 192 }
189 193
190 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ZoomManager) { 194 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ZoomManager) {
191 RunTestsInFile("zoom_manager_test.js", "test.pdf"); 195 RunTestsInFile("zoom_manager_test.js", "test.pdf");
192 } 196 }
197
198 class MaterialPDFExtensionTest : public PDFExtensionTest {
199 void SetUpCommandLine(base::CommandLine* command_line) override {
200 command_line->AppendSwitch(switches::kEnablePdfMaterialUI);
201 }
202 };
203
204 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Basic) {
205 RunTestsInFile("basic_test_material.js", "test.pdf");
206 }
207
208 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, BasicPlugin) {
209 RunTestsInFile("basic_plugin_test.js", "test.pdf");
210 }
211
212 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Viewport) {
213 RunTestsInFile("viewport_test.js", "test.pdf");
214 }
215
216 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Bookmark) {
217 RunTestsInFile("bookmarks_test.js", "test-bookmarks.pdf");
218 }
219
220 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Navigator) {
221 RunTestsInFile("navigator_test.js", "test.pdf");
222 }
223
224 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, ParamsParser) {
225 RunTestsInFile("params_parser_test.js", "test.pdf");
226 }
227
228 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, ZoomManager) {
229 RunTestsInFile("zoom_manager_test.js", "test.pdf");
230 }
OLDNEW
« 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