Bug 482921 part 12 - Reftests for View Source reimplementation. rs=Olli.Pettay.
authorHenri Sivonen <hsivonen@iki.fi>
Tue, 01 Nov 2011 13:33:11 +0200
changeset 79516 3b5d327b7f23b53cac5347df25699de9baad1144
parent 79515 378c95c9774afb9e54b1cbac65963a51182e6aa2
child 79517 c890f75cf0f31876d285a60775a6d936b72e9814
push id21408
push userkhuey@mozilla.com
push dateTue, 01 Nov 2011 14:32:20 +0000
treeherdermozilla-central@cd9add22f090 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersOlli.Pettay
bugs482921
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 482921 part 12 - Reftests for View Source reimplementation. rs=Olli.Pettay.
parser/htmlparser/tests/reftest/bug482921-1-ref.html
parser/htmlparser/tests/reftest/bug482921-1.html
parser/htmlparser/tests/reftest/bug482921-2-ref.html
parser/htmlparser/tests/reftest/bug482921-2.xhtml
parser/htmlparser/tests/reftest/reftest.list
new file mode 100644
--- /dev/null
+++ b/parser/htmlparser/tests/reftest/bug482921-1-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap"><span class="doctype">&lt;!DOCTYPE html&gt;</span>
+<span>&lt;<span class="start-tag">html</span>&gt;</span>
+<span>&lt;<span class="start-tag">head</span>&gt;</span>
+<span>&lt;<span class="start-tag">title</span>&gt;</span><span>Title</span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
+<span>&lt;<span class="start-tag">script</span>&gt;</span>
+var lt = "&lt;";
+&lt;!--
+var s = "&lt;script&gt;foo&lt;/script&gt;";
+--&gt;
+<span class="end-tag">&lt;/script&gt;</span><span></span><span class="comment">&lt;!-- Not quite optimal highlight there. --&gt;</span>
+<span>&lt;<span class="start-tag">style</span>&gt;</span>
+/* &lt;/foo&gt; */
+<span>&lt;/<span class="end-tag">style</span>&gt;</span>
+<span>&lt;/<span class="end-tag">head</span>&gt;</span>
+<span>&lt;<span class="start-tag">body</span>&gt;</span>
+<span>&lt;<span class="start-tag">p</span>&gt;</span><span>Entity: <span class="entity"><span>&amp;</span>amp; </span></span><span>&lt;/<span class="end-tag">p</span>&gt;</span>
+<span>&lt;<span class="start-tag">iframe</span>&gt;</span>&lt;img&gt;<span>&lt;/<span class="end-tag">iframe</span>&gt;</span>
+<span>&lt;<span class="start-tag">noscript</span>&gt;</span>&lt;p&gt;Not para&lt;/p&gt;<span>&lt;/<span class="end-tag">noscript</span>&gt;</span>
+<span>&lt;<span class="start-tag">svg</span>&gt;</span>
+<span>&lt;<span class="start-tag">title</span>&gt;</span><span></span><span class="cdata">&lt;![CDATA[bar]]&gt;</span><span></span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
+<span>&lt;<span class="start-tag">script</span>&gt;</span><span></span><span class="comment">&lt;!-- this is a comment --&gt;</span><span></span><span>&lt;/<span class="end-tag">script</span>&gt;</span>
+<span>&lt;/<span class="end-tag">svg</span>&gt;</span>
+<span>&lt;/<span class="end-tag">body</span>&gt;</span>
+<span>&lt;/<span class="end-tag">html</span>&gt;</span>
new file mode 100644
--- /dev/null
+++ b/parser/htmlparser/tests/reftest/bug482921-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Title</title>
+<script>
+var lt = "<";
+<!--
+var s = "<script>foo</script>";
+-->
+</script><!-- Not quite optimal highlight there. -->
+<style>
+/* </foo> */
+</style>
+</head>
+<body>
+<p>Entity: &amp; </p>
+<iframe><img></iframe>
+<noscript><p>Not para</p></noscript>
+<svg>
+<title><![CDATA[bar]]></title>
+<script><!-- this is a comment --></script>
+</svg>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/parser/htmlparser/tests/reftest/bug482921-2-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap"><span class="pi">&lt;?xml version="1.0" encoding="utf-8"?&gt;</span>
+<span class="pi">&lt;?foo bar?&gt;</span>
+<span>&lt;<span class="start-tag">html</span>&gt;</span>
+<span>&lt;<span class="start-tag">head</span>&gt;</span>
+<span>&lt;<span class="start-tag">title</span>&gt;</span><span>Title</span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
+<span>&lt;<span class="start-tag">script</span>&gt;</span>
+var s = "<span>&lt;<span class="start-tag">script</span>&gt;</span><span>foo</span><span>&lt;/<span class="end-tag">script</span>&gt;</span>";
+<span class="comment">&lt;!--
+var s = "&lt;script&gt;foo&lt;/script&gt;";
+--&gt;</span>
+<span>&lt;/<span class="end-tag">script</span>&gt;</span><span></span>
+<span>&lt;<span class="start-tag">style</span>&gt;</span>
+/* <span>&lt;<span class="start-tag">foo</span><span>/</span>&gt;</span> */
+<span>&lt;/<span class="end-tag">style</span>&gt;</span>
+<span>&lt;/<span class="end-tag">head</span>&gt;</span>
+<span>&lt;<span class="start-tag">body</span>&gt;</span>
+<span>&lt;<span class="start-tag">p</span>&gt;</span><span>Entity: <span class="entity"><span>&amp;</span>amp; </span></span><span>&lt;/<span class="end-tag">p</span>&gt;</span>
+<span>&lt;<span class="start-tag">iframe</span>&gt;</span><span></span><span>&lt;<span class="start-tag">img</span>&gt;</span><span>&lt;/<span class="end-tag">iframe</span>&gt;</span>
+<span>&lt;<span class="start-tag">noscript</span>&gt;</span><span>&lt;<span class="start-tag">p</span>&gt;</span><span>Not para</span><span>&lt;/<span class="end-tag">p</span>&gt;</span><span>&lt;/<span class="end-tag">noscript</span>&gt;</span>
+<span>&lt;<span class="start-tag">svg</span>&gt;</span>
+<span>&lt;<span class="start-tag">title</span>&gt;</span><span></span><span class="cdata">&lt;![CDATA[bar]]&gt;</span><span></span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
+<span>&lt;<span class="start-tag">script</span>&gt;</span><span></span><span class="comment">&lt;!-- this is a comment --&gt;</span><span></span><span>&lt;/<span class="end-tag">script</span>&gt;</span>
+<span>&lt;/<span class="end-tag">svg</span>&gt;</span>
+<span>&lt;/<span class="end-tag">body</span>&gt;</span>
+<span>&lt;/<span class="end-tag">html</span>&gt;</span>
new file mode 100644
--- /dev/null
+++ b/parser/htmlparser/tests/reftest/bug482921-2.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?foo bar?>
+<html>
+<head>
+<title>Title</title>
+<script>
+var s = "<script>foo</script>";
+<!--
+var s = "<script>foo</script>";
+-->
+</script>
+<style>
+/* <foo/> */
+</style>
+</head>
+<body>
+<p>Entity: &amp; </p>
+<iframe><img></iframe>
+<noscript><p>Not para</p></noscript>
+<svg>
+<title><![CDATA[bar]]></title>
+<script><!-- this is a comment --></script>
+</svg>
+</body>
+</html>
--- a/parser/htmlparser/tests/reftest/reftest.list
+++ b/parser/htmlparser/tests/reftest/reftest.list
@@ -1,9 +1,11 @@
 == bug566280-1.html bug566280-1-ref.html
 == bug577418-1.html bug577418-1-ref.html
 == bug582788-1.html bug582788-1-ref.html
 == bug582940-1.html bug582940-1-ref.html
 == bug592656-1.html bug592656-1-ref.html
 == bug608373-1.html bug608373-1-ref.html
+== view-source:bug482921-1.html bug482921-1-ref.html
+== view-source:bug482921-2.xhtml bug482921-2-ref.html
 == view-source:bug673094-1.html view-source:bug673094-1-ref.html
 == bug696651-1.html bug696651-1-ref.html
 == bug696651-2.html bug696651-2-ref.html