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

Unified Diff: LayoutTests/http/tests/security/xssAuditor/viewsource-script-tag-expected.txt

Issue 301813002: Highlight relfected XSS vectors in view-source page. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update descriptive text in test cases. Created 6 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: LayoutTests/http/tests/security/xssAuditor/viewsource-script-tag-expected.txt
diff --git a/LayoutTests/http/tests/security/xssAuditor/viewsource-script-tag-expected.txt b/LayoutTests/http/tests/security/xssAuditor/viewsource-script-tag-expected.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d1a3359962e1693e9272214691e3fb419eea4779
--- /dev/null
+++ b/LayoutTests/http/tests/security/xssAuditor/viewsource-script-tag-expected.txt
@@ -0,0 +1,22 @@
+<!DOCTYPE html><html><head></head><body><iframe id="x" name="x" src="/security/xssAuditor/resources/echo-intertag.pl?q=%3cscript%3ealert(/xss/)%3c/script%3e"></iframe>
+<script>
+var frame = document.getElementById('x');
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.setXSSAuditorEnabled(true);
+ testRunner.dumpAsMarkup();
+ testRunner.dumpChildFramesAsMarkup();
+ testRunner.setViewSourceForFrame('x', true);
+ frame.onload = testRunner.notifyDone.bind(testRunner);
+}
+frame.src = '/security/xssAuditor/resources/echo-intertag.pl?q=%3cscript%3ealert(/xss/)%3c/script%3e';
+</script>
+<p>This test passes if the iframe is rendered in view-source mode such that script doesn't execute and
+instead the "alert(/xss/)" is in a highlighted span.</p>
+
+</body></html>
+
+--------
+Frame: 'x'
+--------
+<html><head></head><body><div class="webkit-line-gutter-backdrop"></div><table><tbody><tr><td class="webkit-line-number" value="1"></td><td class="webkit-line-content"><span class="webkit-html-doctype">&lt;!DOCTYPE html&gt;</span></td></tr><tr><td class="webkit-line-number" value="2"></td><td class="webkit-line-content"><span class="webkit-html-tag">&lt;html&gt;</span></td></tr><tr><td class="webkit-line-number" value="3"></td><td class="webkit-line-content"><span class="webkit-html-tag">&lt;body&gt;</span></td></tr><tr><td class="webkit-line-number" value="4"></td><td class="webkit-line-content"><span class="webkit-html-tag">&lt;script&gt;</span><span class="webkit-highlight" title="Token contains a reflected XSS vector">alert(/xss/)</span><span class="webkit-html-tag">&lt;/script&gt;</span><span class="webkit-html-tag">&lt;/body&gt;</span></td></tr><tr><td class="webkit-line-number" value="5"></td><td class="webkit-line-content"><span class="webkit-html-tag">&lt;/html&gt;</span></td></tr><tr><td class="webkit-line-number" value="6"></td><td class="webkit-line-content"><span class="webkit-html-end-of-file"></span></td></tr></tbody></table></body></html>
« no previous file with comments | « LayoutTests/http/tests/security/xssAuditor/viewsource-script-tag.html ('k') | Source/core/css/view-source.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698