@Test public void noBody() throws Exception { // Note that no doctype is injected for fragments String content = loadFile("org/apache/shindig/gadgets/parse/test-headnobody.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-headnobody-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Before public void setUp() throws Exception { parser = makeParser(); }
@Before public void setUp() throws Exception { parser = makeParser(); }
@Test public void docStartsWithHeader() throws Exception { String content = loadFile("org/apache/shindig/gadgets/parse/test-startswithcomment.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-startswithcomment-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Before public void setUp() throws Exception { parser = makeParser(); }
@Test public void ampersand() throws Exception { // Note that no doctype is injected for fragments String content = loadFile("org/apache/shindig/gadgets/parse/test-with-ampersands.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-with-ampersands-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void notADocument() throws Exception { // Note that no doctype is injected for fragments String content = loadFile("org/apache/shindig/gadgets/parse/test-fragment.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-fragment-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void ampersand() throws Exception { // Note that no doctype is injected for fragments String content = loadFile("org/apache/shindig/gadgets/parse/test-with-ampersands.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-with-ampersands-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void docWithDoctype() throws Exception { // Note that doctype is properly retained String content = loadFile("org/apache/shindig/gadgets/parse/test.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void notADocument2() throws Exception { // Note that no doctype is injected for fragments String content = loadFile("org/apache/shindig/gadgets/parse/test-fragment2.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-fragment2-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void noBody() throws Exception { // Note that no doctype is injected for fragments String content = loadFile("org/apache/shindig/gadgets/parse/test-headnobody.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-headnobody-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void notADocument() throws Exception { // Note that no doctype is injected for fragments String content = loadFile("org/apache/shindig/gadgets/parse/test-fragment.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-fragment-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void notADocument() throws Exception { // Note that no doctype is injected for fragments String content = loadFile("org/apache/shindig/gadgets/parse/test-fragment.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-fragment-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void notADocument2() throws Exception { // Note that no doctype is injected for fragments String content = loadFile("org/apache/shindig/gadgets/parse/test-fragment2.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-fragment2-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void textBeforeScript() throws Exception { String content = loadFile("org/apache/shindig/gadgets/parse/test-text-before-script.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-text-before-script-expected.html"); parseAndCompareBalanced(content, expected, parser); } }
@Test public void docWithDoctype() throws Exception { // Note that doctype is properly retained String content = loadFile("org/apache/shindig/gadgets/parse/test.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void ampersand() throws Exception { // Note that no doctype is injected for fragments String content = loadFile("org/apache/shindig/gadgets/parse/test-with-ampersands.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-with-ampersands-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void textBeforeScript() throws Exception { String content = loadFile("org/apache/shindig/gadgets/parse/test-text-before-script.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-text-before-script-expected.html"); parseAndCompareBalanced(content, expected, parser); } }
@Test public void docWithDoctype() throws Exception { // Note that doctype is properly retained String content = loadFile("org/apache/shindig/gadgets/parse/test.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-expected.html"); parseAndCompareBalanced(content, expected, parser); }
@Test public void docStartsWithHeader() throws Exception { String content = loadFile("org/apache/shindig/gadgets/parse/test-startswithcomment.html"); String expected = loadFile("org/apache/shindig/gadgets/parse/test-startswithcomment-expected.html"); parseAndCompareBalanced(content, expected, parser); }