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

Unified Diff: chrome/test/data/printing/selection_iframe.html

Issue 2944873002: Printing: Disable subframes when printing a selection. (Closed)
Patch Set: Fix names conflicts. Created 3 years, 6 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/printing/selection_iframe.html
diff --git a/chrome/test/data/printing/selection_iframe.html b/chrome/test/data/printing/selection_iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..059f6d67ed9196e0a89ccef115f2b88232deb1db
--- /dev/null
+++ b/chrome/test/data/printing/selection_iframe.html
@@ -0,0 +1,21 @@
+<html>
+
+<body>
+ <p>
+ A page with a selection containing an iframe. The browser should be
+ able to print it.
+ </p>
+
+ <div id="selection-start"></div>
+ An iframe here: <iframe src="/simple.html"></iframe>
+ <div id="selection-end"></div>
+
+ <script>
+ var range = document.createRange();
+ range.setStart(document.getElementById("selection-start"), 0);
+ range.setEnd(document.getElementById("selection-end"), 0)
+ window.getSelection().addRange(range);
Lei Zhang 2017/06/21 07:36:32 Neat. Did not know JS + DOM operations supported t
arthursonzogni 2017/06/21 14:01:20 Yes I was surprised too. I did not know either bef
+ </script>
+</body>
+
+</html>

Powered by Google App Engine
This is Rietveld 408576698