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

Unified Diff: chrome/test/data/pdf/test-embed-pdf.html

Issue 2862583010: [Reland 1] Save pdf file instead of web page through context menu for embedded pdf file (Closed)
Patch Set: fix flaky tests Created 3 years, 7 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
Index: chrome/test/data/pdf/test-embed-pdf.html
diff --git a/chrome/test/data/pdf/test-embed-pdf.html b/chrome/test/data/pdf/test-embed-pdf.html
new file mode 100644
index 0000000000000000000000000000000000000000..fdbe2b6a3c086ad93dbaa736e1c377bf5e55aad7
--- /dev/null
+++ b/chrome/test/data/pdf/test-embed-pdf.html
@@ -0,0 +1,17 @@
+<html>
+<body>
+
+<button id="link1" onclick="openPdf()">Click me to load pdf</button>
+<div id="div1"></div>
lazyboy 2017/05/17 16:34:44 nit:s/div1/container (in both html)
Wei Li 2017/05/18 23:25:28 Done.
+
+<script>
+function openPdf() {
+ var frame = document.createElement("embed");
lazyboy 2017/05/17 16:34:44 Since this is not a frame, call it embedElement or
Wei Li 2017/05/18 23:25:28 Done.
+ frame.src = "test.pdf";
+ var outter_element = document.getElementById("div1");
lazyboy 2017/05/17 16:34:44 nit: outerElement (also applies to other file).
Wei Li 2017/05/18 23:25:28 Done.
+ outter_element.appendChild(frame);
+}
+</script>
+
+<body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698