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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) { | 329 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Title) { |
330 RunTestsInFile("title_test.js", "test-title.pdf"); | 330 RunTestsInFile("title_test.js", "test-title.pdf"); |
331 } | 331 } |
332 | 332 |
| 333 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, WhitespaceTitle) { |
| 334 RunTestsInFile("whitespace_title_test.js", "test-whitespace-title.pdf"); |
| 335 } |
| 336 |
333 // Ensure that the internal PDF plugin application/x-google-chrome-pdf won't be | 337 // Ensure that the internal PDF plugin application/x-google-chrome-pdf won't be |
334 // loaded if it's not loaded in the chrome extension page. | 338 // loaded if it's not loaded in the chrome extension page. |
335 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, EnsureInternalPluginDisabled) { | 339 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, EnsureInternalPluginDisabled) { |
336 std::string url = embedded_test_server()->GetURL("/pdf/test.pdf").spec(); | 340 std::string url = embedded_test_server()->GetURL("/pdf/test.pdf").spec(); |
337 std::string data_url = | 341 std::string data_url = |
338 "data:text/html," | 342 "data:text/html," |
339 "<html><body>" | 343 "<html><body>" |
340 "<embed type=\"application/x-google-chrome-pdf\" src=\"" + | 344 "<embed type=\"application/x-google-chrome-pdf\" src=\"" + |
341 url + | 345 url + |
342 "\">" | 346 "\">" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 RunTestsInFile("material_elements_test.js", "test.pdf"); | 417 RunTestsInFile("material_elements_test.js", "test.pdf"); |
414 } | 418 } |
415 | 419 |
416 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, ToolbarManager) { | 420 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, ToolbarManager) { |
417 RunTestsInFile("toolbar_manager_test.js", "test.pdf"); | 421 RunTestsInFile("toolbar_manager_test.js", "test.pdf"); |
418 } | 422 } |
419 | 423 |
420 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Title) { | 424 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Title) { |
421 RunTestsInFile("title_test.js", "test-title.pdf"); | 425 RunTestsInFile("title_test.js", "test-title.pdf"); |
422 } | 426 } |
| 427 |
| 428 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, WhitespaceTitle) { |
| 429 RunTestsInFile("whitespace_title_test.js", "test-whitespace-title.pdf"); |
| 430 } |
OLD | NEW |