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> |