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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) { | 333 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, WhitespaceTitle) { |
334 RunTestsInFile("whitespace_title_test.js", "test-whitespace-title.pdf"); | 334 RunTestsInFile("whitespace_title_test.js", "test-whitespace-title.pdf"); |
335 } | 335 } |
336 | 336 |
| 337 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, PageChange) { |
| 338 RunTestsInFile("page_change_test.js", "test-bookmarks.pdf"); |
| 339 } |
| 340 |
337 // Ensure that the internal PDF plugin application/x-google-chrome-pdf won't be | 341 // Ensure that the internal PDF plugin application/x-google-chrome-pdf won't be |
338 // loaded if it's not loaded in the chrome extension page. | 342 // loaded if it's not loaded in the chrome extension page. |
339 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, EnsureInternalPluginDisabled) { | 343 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, EnsureInternalPluginDisabled) { |
340 std::string url = embedded_test_server()->GetURL("/pdf/test.pdf").spec(); | 344 std::string url = embedded_test_server()->GetURL("/pdf/test.pdf").spec(); |
341 std::string data_url = | 345 std::string data_url = |
342 "data:text/html," | 346 "data:text/html," |
343 "<html><body>" | 347 "<html><body>" |
344 "<embed type=\"application/x-google-chrome-pdf\" src=\"" + | 348 "<embed type=\"application/x-google-chrome-pdf\" src=\"" + |
345 url + | 349 url + |
346 "\">" | 350 "\">" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 RunTestsInFile("toolbar_manager_test.js", "test.pdf"); | 425 RunTestsInFile("toolbar_manager_test.js", "test.pdf"); |
422 } | 426 } |
423 | 427 |
424 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Title) { | 428 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, Title) { |
425 RunTestsInFile("title_test.js", "test-title.pdf"); | 429 RunTestsInFile("title_test.js", "test-title.pdf"); |
426 } | 430 } |
427 | 431 |
428 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, WhitespaceTitle) { | 432 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, WhitespaceTitle) { |
429 RunTestsInFile("whitespace_title_test.js", "test-whitespace-title.pdf"); | 433 RunTestsInFile("whitespace_title_test.js", "test-whitespace-title.pdf"); |
430 } | 434 } |
| 435 |
| 436 IN_PROC_BROWSER_TEST_F(MaterialPDFExtensionTest, PageChange) { |
| 437 RunTestsInFile("page_change_test.js", "test-bookmarks.pdf"); |
| 438 } |
OLD | NEW |