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

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

Issue 2209113002: Change wildcard source expression matching to conform latest spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed a variable to stay consistent with the rest of the file Created 4 years, 4 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/browser/resources/feedback/manifest.json » ('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 dca4eb548b3dc23d9bee072b00e834213c2fa205..7f2262de713cdeba77907858b9eafdefe38fcaf5 100644
--- a/chrome/browser/pdf/pdf_extension_test.cc
+++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -464,6 +464,18 @@ IN_PROC_BROWSER_TEST_F(PDFExtensionTest, EnsureSameOriginRepliesAllowed) {
true);
}
+// This test ensures that PDF can be loaded from local file
+IN_PROC_BROWSER_TEST_F(PDFExtensionTest, EnsurePDFFromLocalFileLoads) {
+ base::FilePath test_data_dir;
+ ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir));
+ test_data_dir = test_data_dir.AppendASCII("pdf");
+ test_data_dir = test_data_dir.AppendASCII("test.pdf");
Lei Zhang 2016/08/09 00:28:45 Maybe make a new base::FilePath test_data_file var
Sergey Shekyan 2016/08/09 00:38:28 Done.
Sergey Shekyan 2016/08/09 00:38:28 Acknowledged.
+ ASSERT_TRUE(PathExists(test_data_dir));
+ GURL test_pdf_url("file://" + test_data_dir.MaybeAsASCII());
+ content::WebContents* guest_contents = LoadPdfGetGuestContents(test_pdf_url);
+ ASSERT_TRUE(guest_contents);
+}
+
// This test ensures that link permissions are enforced properly in PDFs.
IN_PROC_BROWSER_TEST_F(PDFExtensionTest, LinkPermissions) {
GURL test_pdf_url(embedded_test_server()->GetURL("/pdf/test.pdf"));
« no previous file with comments | « no previous file | chrome/browser/resources/feedback/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698