YARN-2610. Hamlet should close table tags. (Ray Chiang via kasha)
This commit is contained in:
parent
cdf1af0e5a
commit
f7743dd07d
@ -480,6 +480,8 @@ Release 2.6.0 - UNRELEASED
|
|||||||
YARN-2606. Application History Server tries to access hdfs before doing
|
YARN-2606. Application History Server tries to access hdfs before doing
|
||||||
secure login (Mit Desai via jeagles)
|
secure login (Mit Desai via jeagles)
|
||||||
|
|
||||||
|
YARN-2610. Hamlet should close table tags. (Ray Chiang via kasha)
|
||||||
|
|
||||||
Release 2.5.1 - 2014-09-05
|
Release 2.5.1 - 2014-09-05
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -2423,10 +2423,10 @@ public TR<T> td(String selector, String cdata) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private <T extends _> TH<T> th_(T e, boolean inline) {
|
private <T extends _> TH<T> th_(T e, boolean inline) {
|
||||||
return new TH<T>("th", e, opt(false, inline, false)); }
|
return new TH<T>("th", e, opt(true, inline, false)); }
|
||||||
|
|
||||||
private <T extends _> TD<T> td_(T e, boolean inline) {
|
private <T extends _> TD<T> td_(T e, boolean inline) {
|
||||||
return new TD<T>("td", e, opt(false, inline, false)); }
|
return new TD<T>("td", e, opt(true, inline, false)); }
|
||||||
|
|
||||||
public class COL<T extends _> extends EImp<T> implements HamletSpec.COL {
|
public class COL<T extends _> extends EImp<T> implements HamletSpec.COL {
|
||||||
public COL(String name, T parent, EnumSet<EOpt> opts) {
|
public COL(String name, T parent, EnumSet<EOpt> opts) {
|
||||||
@ -3719,10 +3719,10 @@ private <T extends _> COLGROUP<T> colgroup_(T e, boolean inline) {
|
|||||||
return new COLGROUP<T>("colgroup", e, opt(false, inline, false)); }
|
return new COLGROUP<T>("colgroup", e, opt(false, inline, false)); }
|
||||||
|
|
||||||
private <T extends _> THEAD<T> thead_(T e, boolean inline) {
|
private <T extends _> THEAD<T> thead_(T e, boolean inline) {
|
||||||
return new THEAD<T>("thead", e, opt(false, inline, false)); }
|
return new THEAD<T>("thead", e, opt(true, inline, false)); }
|
||||||
|
|
||||||
private <T extends _> TFOOT<T> tfoot_(T e, boolean inline) {
|
private <T extends _> TFOOT<T> tfoot_(T e, boolean inline) {
|
||||||
return new TFOOT<T>("tfoot", e, opt(false, inline, false)); }
|
return new TFOOT<T>("tfoot", e, opt(true, inline, false)); }
|
||||||
|
|
||||||
private <T extends _> TBODY<T> tbody_(T e, boolean inline) {
|
private <T extends _> TBODY<T> tbody_(T e, boolean inline) {
|
||||||
return new TBODY<T>("tbody", e, opt(true, inline, false)); }
|
return new TBODY<T>("tbody", e, opt(true, inline, false)); }
|
||||||
@ -3731,7 +3731,7 @@ private <T extends _> COL<T> col_(T e, boolean inline) {
|
|||||||
return new COL<T>("col", e, opt(false, inline, false)); }
|
return new COL<T>("col", e, opt(false, inline, false)); }
|
||||||
|
|
||||||
private <T extends _> TR<T> tr_(T e, boolean inline) {
|
private <T extends _> TR<T> tr_(T e, boolean inline) {
|
||||||
return new TR<T>("tr", e, opt(false, inline, false)); }
|
return new TR<T>("tr", e, opt(true, inline, false)); }
|
||||||
|
|
||||||
public class BUTTON<T extends _> extends EImp<T> implements HamletSpec.BUTTON {
|
public class BUTTON<T extends _> extends EImp<T> implements HamletSpec.BUTTON {
|
||||||
public BUTTON(String name, T parent, EnumSet<EOpt> opts) {
|
public BUTTON(String name, T parent, EnumSet<EOpt> opts) {
|
||||||
|
@ -88,8 +88,8 @@ public class TestHamlet {
|
|||||||
assertEquals(0, h.nestLevel);
|
assertEquals(0, h.nestLevel);
|
||||||
verify(out).print("<table");
|
verify(out).print("<table");
|
||||||
verify(out).print("</table>");
|
verify(out).print("</table>");
|
||||||
verify(out, never()).print("</td>");
|
verify(out, atLeast(1)).print("</td>");
|
||||||
verify(out, never()).print("</tr>");
|
verify(out, atLeast(1)).print("</tr>");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test public void testEnumAttrs() {
|
@Test public void testEnumAttrs() {
|
||||||
|
@ -68,7 +68,7 @@ public static class MultilineInfoBlock extends InfoBlock{
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
resInfo = new ResponseInfo();
|
resInfo = new ResponseInfo();
|
||||||
resInfo._("Single_line_value", "This is one line.");
|
resInfo._("Multiple_line_value", "This is one line.");
|
||||||
resInfo._("Multiple_line_value", "This is first line.\nThis is second line.");
|
resInfo._("Multiple_line_value", "This is first line.\nThis is second line.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,13 +98,14 @@ public void testMultilineInfoBlock() throws Exception{
|
|||||||
WebAppTests.testBlock(MultilineInfoBlock.class);
|
WebAppTests.testBlock(MultilineInfoBlock.class);
|
||||||
TestInfoBlock.pw.flush();
|
TestInfoBlock.pw.flush();
|
||||||
String output = TestInfoBlock.sw.toString().replaceAll(" +", " ");
|
String output = TestInfoBlock.sw.toString().replaceAll(" +", " ");
|
||||||
String expectedSinglelineData = String.format("<tr class=\"odd\">%n"
|
String expectedMultilineData1 = String.format("<tr class=\"odd\">%n"
|
||||||
+ " <th>%n Single_line_value%n <td>%n This is one line.%n");
|
+ " <th>%n Multiple_line_value%n </th>%n"
|
||||||
String expectedMultilineData = String.format("<tr class=\"even\">%n"
|
+ " <td>%n This is one line.%n </td>%n");
|
||||||
+ " <th>%n Multiple_line_value%n <td>%n <div>%n"
|
String expectedMultilineData2 = String.format("<tr class=\"even\">%n"
|
||||||
|
+ " <th>%n Multiple_line_value%n </th>%n <td>%n <div>%n"
|
||||||
+ " This is first line.%n </div>%n <div>%n"
|
+ " This is first line.%n </div>%n <div>%n"
|
||||||
+ " This is second line.%n </div>%n");
|
+ " This is second line.%n </div>%n");
|
||||||
assertTrue(output.contains(expectedSinglelineData) && output.contains(expectedMultilineData));
|
assertTrue(output.contains(expectedMultilineData1) && output.contains(expectedMultilineData2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeout=60000L)
|
@Test(timeout=60000L)
|
||||||
@ -115,4 +116,4 @@ public void testJavaScriptInfoBlock() throws Exception{
|
|||||||
assertFalse(output.contains("<script>"));
|
assertFalse(output.contains("<script>"));
|
||||||
assertTrue(output.contains(JAVASCRIPT_ESCAPED));
|
assertTrue(output.contains(JAVASCRIPT_ESCAPED));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user