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

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

Issue 2650513002: Fix buffer overrun in PDF accessibility code. (Closed)
Patch Set: Adds test Created 3 years, 11 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/test/data/pdf/test-crash.pdf » ('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 b63a7bbd46f26361b2d44c443a7b5394e7ab45c1..eb22f79bc42ff82a39a758bca5a62ccd31147679 100644
--- a/chrome/browser/pdf/pdf_extension_test.cc
+++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -727,6 +727,16 @@ IN_PROC_BROWSER_TEST_F(PDFExtensionTest, PdfAccessibilityInOOPIF) {
ASSERT_MULTILINE_STREQ(kExpectedPDFAXTree, ax_tree_dump);
}
+IN_PROC_BROWSER_TEST_F(PDFExtensionTest, PdfAccessibilityCrash) {
raymes 2017/01/24 23:13:14 nit: please add a link to the bug for this
+ content::BrowserAccessibilityState::GetInstance()->EnableAccessibility();
+
+ GURL test_pdf_url(embedded_test_server()->GetURL("/pdf/test-crash.pdf"));
+ content::WebContents* guest_contents = LoadPdfGetGuestContents(test_pdf_url);
+ ASSERT_TRUE(guest_contents);
+
+ WaitForAccessibilityTreeToContainNodeWithName(guest_contents, "Page 1");
+}
+
IN_PROC_BROWSER_TEST_F(PDFExtensionTest, LinkCtrlLeftClick) {
host_resolver()->AddRule("www.example.com", "127.0.0.1");
GURL test_pdf_url(embedded_test_server()->GetURL("/pdf/test-link.pdf"));
« no previous file with comments | « no previous file | chrome/test/data/pdf/test-crash.pdf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698