OLD | NEW |
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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/files/file_enumerator.h" | 8 #include "base/files/file_enumerator.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/hash.h" | 10 #include "base/hash.h" |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 } | 319 } |
320 | 320 |
321 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ParamsParser) { | 321 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ParamsParser) { |
322 RunTestsInFile("params_parser_test.js", "test.pdf"); | 322 RunTestsInFile("params_parser_test.js", "test.pdf"); |
323 } | 323 } |
324 | 324 |
325 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ZoomManager) { | 325 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ZoomManager) { |
326 RunTestsInFile("zoom_manager_test.js", "test.pdf"); | 326 RunTestsInFile("zoom_manager_test.js", "test.pdf"); |
327 } | 327 } |
328 | 328 |
| 329 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Title) { |
| 330 RunTestsInFile("title_test.js", "test-title.pdf"); |
| 331 } |
| 332 |
329 // Ensure that the internal PDF plugin application/x-google-chrome-pdf won't be | 333 // Ensure that the internal PDF plugin application/x-google-chrome-pdf won't be |
330 // loaded if it's not loaded in the chrome extension page. | 334 // loaded if it's not loaded in the chrome extension page. |
331 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, EnsureInternalPluginDisabled) { | 335 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, EnsureInternalPluginDisabled) { |
332 std::string url = embedded_test_server()->GetURL("/pdf/test.pdf").spec(); | 336 std::string url = embedded_test_server()->GetURL("/pdf/test.pdf").spec(); |
333 std::string data_url = | 337 std::string data_url = |
334 "data:text/html," | 338 "data:text/html," |
335 "<html><body>" | 339 "<html><body>" |
336 "<embed type=\"application/x-google-chrome-pdf\" src=\"" + | 340 "<embed type=\"application/x-google-chrome-pdf\" src=\"" + |
337 url + | 341 url + |
338 "\">" | 342 "\">" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 | 409 |
406 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Elements) { | 410 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Elements) { |
407 // Although this test file does not require a PDF to be loaded, loading the | 411 // Although this test file does not require a PDF to be loaded, loading the |
408 // elements without loading a PDF is difficult. | 412 // elements without loading a PDF is difficult. |
409 RunTestsInFile("material_elements_test.js", "test.pdf"); | 413 RunTestsInFile("material_elements_test.js", "test.pdf"); |
410 } | 414 } |
411 | 415 |
412 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, ToolbarManager) { | 416 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, ToolbarManager) { |
413 RunTestsInFile("toolbar_manager_test.js", "test.pdf"); | 417 RunTestsInFile("toolbar_manager_test.js", "test.pdf"); |
414 } | 418 } |
| 419 |
| 420 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Title) { |
| 421 RunTestsInFile("title_test.js", "test-title.pdf"); |
| 422 } |
OLD | NEW |