You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by lr...@apache.org on 2009/04/24 03:31:15 UTC

svn commit: r768113 - in /incubator/shindig/trunk/java/gadgets/src/test: java/org/apache/shindig/gadgets/parse/nekohtml/ resources/org/apache/shindig/gadgets/parse/nekohtml/

Author: lryan
Date: Fri Apr 24 01:31:15 2009
New Revision: 768113

URL: http://svn.apache.org/viewvc?rev=768113&view=rev
Log:
Fix special tag unit test for compacting serializer.

Modified:
    incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoCompactSerializerTest.java
    incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags-expected.html
    incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags.html

Modified: incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoCompactSerializerTest.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoCompactSerializerTest.java?rev=768113&r1=768112&r2=768113&view=diff
==============================================================================
--- incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoCompactSerializerTest.java (original)
+++ incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoCompactSerializerTest.java Fri Apr 24 01:31:15 2009
@@ -39,7 +39,7 @@
 
   public void testWhitespaceNotCollapsedInSpecialTags() throws Exception {
     String content = loadFile(
-        "org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags-expected.html");
+        "org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags.html");
     String expected = loadFile(
         "org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags-expected.html");
     parseAndCompareBalanced(content, expected, full);

Modified: incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags-expected.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags-expected.html?rev=768113&r1=768112&r2=768113&view=diff
==============================================================================
--- incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags-expected.html (original)
+++ incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags-expected.html Fri Apr 24 01:31:15 2009
@@ -1,31 +1,33 @@
-<html><head id="head"><link href="http://www.example.org/css.css" rel="stylesheet" type="text/css"><title>An example</title></head><body><style type="text/css">
- <!--
- #mymap #header {
- background:#FF9700;
- clear:both;
- padding:2px 0 1px;
- position:relative;
- width:640px;
- }
- -->
- </style><script type="text/javascript">document.write("&&&")</script><script src="http://www.example.org/1.js" type="text/javascript"></script><script>
- // scripts with no old comment hack should be preserved.
- function a1() {
- var v1 = 0;
- alert(" this whitespace should be preserved.");
- }
- </script><div><table><tr><td>a cell</td></tr></table></div><script type="text/javascript">
- <!--
- // script with old comment hack should be preserved.
-function MM_goToURL() {
- var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
- for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
-}
-//-->
- </script><p>Lorem ipsum</p><a href="/test.html" title="">link</a><pre>
+<html><head><title>An example</title></head><body><style type="text/css">
+  <!--
+  #mymap #header {
+    background: #FF9700;
+    clear: both;
+    padding: 2px 0 1px;
+    position: relative;
+    width: 640px;
+  }
+
+  -->
+</style><script type="text/javascript">document.write("&&&")</script><script src="http://www.example.org/1.js" type="text/javascript"></script><script>
+  // scripts with no old comment hack should be preserved.
+  function a1() {
+    var v1 = 0;
+    alert(" this whitespace should be preserved.");
+  }
+</script><div><table><tr><td>a cell</td></tr></table></div><script type="text/javascript">
+  <!--
+  // script with old comment hack should be preserved.
+  function MM_goToURL() {
+    var i, args = MM_goToURL.arguments;
+    document.MM_returnValue = false;
+    for (i = 0; i < (args.length - 1); i += 2) eval(args[i] + ".location='" + args[i + 1] + "'");
+  }
+  //-->
+</script><p>Lorem ipsum</p><a href="/test.html" title="">link</a><pre>
  This is a preformatted block of text,
  and whitespaces should be preserved.
  </pre><form action="/test/submit"><div><input type="hidden" value="something"><input type="text"><textarea>
- This is a preformatted block of text,
- and whitespaces should be preserved too.
-</textarea></div></form></body></html>
\ No newline at end of file
+      This is a preformatted block of text,
+      and whitespaces should be preserved too.
+    </textarea></div></form></body></html>
\ No newline at end of file

Modified: incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags.html?rev=768113&r1=768112&r2=768113&view=diff
==============================================================================
--- incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags.html (original)
+++ incubator/shindig/trunk/java/gadgets/src/test/resources/org/apache/shindig/gadgets/parse/nekohtml/test-with-specialtags.html Fri Apr 24 01:31:15 2009
@@ -1,55 +1,61 @@
 <html>
- <head>
-    <title>An example</title>
- </head>
- <body>
- <style type="text/css">
- <!--
+<head>
+  <title>An example</title>
+</head>
+<body>
+<style type="text/css">
+  <!--
   #mymap #header {
-  background:#FF9700;
-  clear:both;
-  padding:2px 0 1px;
-  position:relative;
-  width:640px;
+    background: #FF9700;
+    clear: both;
+    padding: 2px 0 1px;
+    position: relative;
+    width: 640px;
   }
+
   -->
- </style>
- <script type="text/javascript">document.write("&&&")</script>
- <script src="http://www.example.org/1.js" type="text/javascript"></script>
-  <script>
+</style>
+<script type="text/javascript">document.write("&&&")</script>
+<script src="http://www.example.org/1.js" type="text/javascript"></script>
+<script>
   // scripts with no old comment hack should be preserved.
   function a1() {
-  var v1 = 0;
-  alert(" this whitespace should be preserved.");
+    var v1 = 0;
+    alert(" this whitespace should be preserved.");
   }
-  </script>
- <div>
- <table><tr><td>a cell</td></tr></table>
- </div>
-  <script type="text/javascript">
+</script>
+<div>
+  <table>
+    <tr>
+      <td>a cell</td>
+    </tr>
+  </table>
+</div>
+<script type="text/javascript">
   <!--
   // script with old comment hack should be preserved.
- function MM_goToURL() {
-  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
-  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
- }
- //-->
-  </script>
- <p>Lorem ipsum</p>
- <a href="/test.html" title="">link</a>
+  function MM_goToURL() {
+    var i, args = MM_goToURL.arguments;
+    document.MM_returnValue = false;
+    for (i = 0; i < (args.length - 1); i += 2) eval(args[i] + ".location='" + args[i + 1] + "'");
+  }
+  //-->
+</script>
+<p>Lorem ipsum</p>
+<a href="/test.html" title="">link</a>
  <pre>
  This is a preformatted block of text,
  and whitespaces should be preserved.
  </pre>
- <form action="/test/submit">
- <div>
- <input type="hidden" value="something">
- <input type="text"/>
- <textarea>
- This is a preformatted block of text,
- and whitespaces should be preserved too.
- </textarea>
-</div>
- </form>
- </body>
- </html>
\ No newline at end of file
+<form action="/test/submit">
+  <div>
+    <input type="hidden" value="something">
+    <input type="text"/>
+    <textarea>
+      This is a preformatted block of text,
+      and whitespaces should be preserved too.
+    </textarea>
+  </div>
+</form>
+</body>
+</html>
\ No newline at end of file