+ "tabindex=\"-1\"></input>", sb.toSafeHtml().asString());
}
public void testViewData() {
// Start in edit mode.
ViewData viewData = new ViewData("originalValue");
assertEquals("originalValue", viewData.getOriginal());
assertEquals("originalValue", viewData.getText());
assertTrue(viewData.isEditing());
assertFalse(viewData.isEditingAgain());
// Change the text.
viewData.setText("newValue");
assertEquals("originalValue", viewData.getOriginal());
assertEquals("newValue", viewData.getText());
assertTrue(viewData.isEditing());
assertFalse(viewData.isEditingAgain());
// Stop editing.
viewData.setEditing(false);
assertEquals("originalValue", viewData.getOriginal());
assertEquals("newValue", viewData.getText());
assertFalse(viewData.isEditing());
assertFalse(viewData.isEditingAgain());
// Edit again.
viewData.setEditing(true);
assertEquals("newValue", viewData.getOriginal());
assertEquals("newValue", viewData.getText());
assertTrue(viewData.isEditing());
assertTrue(viewData.isEditingAgain());
}