| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <title>CKEDITOR.dom.element</title> |
| 5 | <link rel="stylesheet" type="text/css" href="../../test.css" /> |
| 6 | <script type="text/javascript" src="../../../../ckeditor_source.js"></script> <!-- %REMOVE_LINE% |
| 7 | <script type="text/javascript" src="../../../ckeditor.js"></script> |
| 8 | %REMOVE_LINE% --> |
| 9 | <script type="text/javascript" src="../../test.js"></script> |
| 10 | <script type="text/javascript"> |
| 11 | //<![CDATA[ |
| 12 | |
| 13 | CKEDITOR.test.addTestCase( (function() |
| 14 | { |
| 15 | // Local reference to the "assert" object. |
| 16 | var assert = CKEDITOR.test.assert; |
| 17 | |
| 18 | return { |
| 19 | |
| 20 | test_hasAttribute_special: function() |
| 21 | { |
| 22 | var element = CKEDITOR.dom.element. |
| 23 | createFromHtml('<input type=\"checkbox\" checked=\"checked\" value=\"value\"/>' ); |
| 24 | assert.isTrue( element.hasAttribute( 'checked' ) , 'element attribute "checked" is not found.' ); |
| 25 | assert.isTrue( element.hasAttribute( 'value' ) , 'element attribute "value" is not found.' ); |
| 26 | }, |
| 27 | |
| 28 | test_hasAttribute_special: function() |
| 29 | { |
| 30 | var element = CKEDITOR.dom.element. |
| 31 | createFromHtml('<input type=\"checkbox\" />'); |
| 32 | element.setAttribute( 'checked', 'checked' ), |
| 33 | element.setAttribute( 'value', 'value' ); |
| 34 | |
| 35 | assert.isTrue( element.hasAttribute( 'checked' ) , 'element attribute "checked" is not found.' ); |
| 36 | assert.isTrue( element.hasAttribute( 'value' ) , 'element attribute "value" is not found.' ); |
| 37 | }, |
| 38 | |
| 39 | name : document.title |
| 40 | }; |
| 41 | })() ); |
| 42 | |
| 43 | //]]> |
| 44 | </script> |
| 45 | </head> |
| 46 | <body></body> |
| 47 | </html> |