Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: pages/circumvention/anoniframe-documentwrite.tmpl

Issue 29755578: Issue 2148 - Rewrite the testpages test suite (Closed)
Patch Set: Created April 18, 2018, 11:54 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pages/circumvention/anoniframe-documentwrite.tmpl
===================================================================
new file mode 100644
--- /dev/null
+++ b/pages/circumvention/anoniframe-documentwrite.tmpl
@@ -0,0 +1,37 @@
+title = Anonymous Frame document.write() - Circumvention - ABP Test Pages
+template = testcase
+
+<script>
+setTimeout(function()
+{
+ var iframe = document.getElementById("append");
+ var span = document.createElement("span");
+ span.className = "testcase-circ-anoniframe-docwrite";
+ span.textContent = "This text should be hidden";
+ iframe.contentDocument.body.appendChild(span);
+ var doc = document.getElementById("write").contentDocument;
+ doc.open();
+ doc.write("<span class='testcase-circ-anoniframe-docwrite'>This text should be hidden</span>");
+ doc.close();
+}, 0);
+</script>
+
+<section class="site-panel">
+
+ <h2>Test case</h2>
+ <div class="testcase-container">
+ <p>
+ Top frame: [<span class="testcase-circ-anoniframe-docwrite">This text should be hidden</span>]
+ </p>
+
+ <p>
+ Subframe (Element.appendChild): [<iframe id="append"></iframe>]
+ </p>
+
+ <p>
+ Subframe (document.write): [<iframe id="write"></iframe>]
+ </p>
+ </div>
+ <h3>Related links</h3>
+ <p><a href="https://issues.adblockplus.org/ticket/3185">Issue #3185</a></p>
+</section>

Powered by Google App Engine
This is Rietveld