xidyn/build/classes/fr/devinsy/xid/testXid.html
Christian P. MOMON 2975a00422 debug step
2010-02-25 02:13:44 +01:00

79 lines
No EOL
2.8 KiB
HTML

<!DOCTYPE html SYSTEM "xhtml1-transitional.dtd">
<html>
<head>
<title>test</title>
</head>
<body>
Test 01: No id attribute
XHTML: Hello <b title="a">world</b>.
no Java code
Result: Hello <b title="a">world</b>.
Test 02: id attribute with empty model
XHTML: Hello <b id="test02-original" title="b">world</b>.
no Java code
Result: Hello <b id="test02" title="b">world</b>.
Test 03: model changing the text
XHTML: Hello <b id="test03-original" title="c">world</b>.
// Populate attributes of Test 03.
text = new TextModel ();
text.getAttributes ().appendAttribute ("style", "background: blue;");
text.getAttributes ().appendAttribute ("style", "foreground: red;");
text.getAttributes ().setAttribute ("class", "totoClass");
text.setText ("mummy");
datas.put ("test03", text);
Result: Hello <b id="test03" title="c">world</b>.
Test 04: model changing title
XHTML: Hello <b id="test04-original" title="d">world</b>.
// Populate attributes of Test 04.
text = new TextModel ();
text.getAttributes ().setAttribute ("title", "another title");
datas.put ("test04", text);
Result: Hello <b id="test04" title="d">world</b>.
Test 05: model adding style attributes
XHTML: Hello <b id="test05-original" title="d">world</b>.
// Populate attributes of Test 05.
text = new TextModel ();
text.getAttributes ().appendAttribute ("style", "background: blue;");
text.getAttributes ().appendAttribute ("style", "foreground: red;");
text.getAttributes ().setAttribute ("class", "aClass");
datas.put ("test05", text);
Result: Hello <b id="test05" title="d">world</b>.
Test 06: model appending style attributes
XHTML: Hello <b id="test06-original" title="d" style="background:yellow;">world</b>.
// Populate attributes of Test 06.
text = new TextModel ();
text.getAttributes ().appendAttribute ("style", "foreground: red;");
text.getAttributes ().setAttribute ("class", "aClass");
datas.put ("test06", text);
Result: Hello <b id="test06" title="d" style="background:yellow;">world</b>.
Test 07: image
XHTML: A picture <img id="test07-original" src="http://www.ocmland.org/tmp/floatingb.jpg" alt="pinguoin flottant" />.
// Populate attributes of Test 07.
text = new TextModel ();
text.getAttributes ().setAttribute ("width", "50%");
datas.put ("test07", text);
Result: A picture <img id="test07" src="http://www.ocmland.org/tmp/floatingb.jpg" alt="pinguoin flottant" />.
Test 08: xhtml source contains no display order in a tag.
XHTML: Hello <b class="xid:nodisplay_">you</b> there.
Result: Hello <b class="xid:nodisplay">you</b> there.
Test 09: dynamic addition of the nodisplay order.
XHTML: Hello <b id="test09-original">you</b> there.
Result: Hello <b id="test09">you</b> there.
</body>
</html>