def test_script_with_obsolete_language(self): self.assertEquals( [html_linter.ConcernsSeparationMessage( line=1, column=1, tag='script'), html_linter.InvalidAttributeMessage( line=1, column=9, attribute='language')], html_linter.HTML5Linter( '<script language="foo"></script>').messages ) self.assertEquals( [html_linter.InvalidAttributeMessage( line=1, column=22, attribute='language')], html_linter.HTML5Linter( '<script src="foo.js" language="utf-8"></script>').messages )
def test_inline_script_with_charset(self): self.assertEquals([ html_linter.ConcernsSeparationMessage( line=1, column=1, tag='script'), html_linter.InvalidAttributeMessage( line=1, column=9, attribute='charset') ], html_linter.HTML5Linter( '<script charset="utf-8"></script>').messages) self.assertEquals( [], html_linter.HTML5Linter( '<script src="foo.js" charset="utf-8"></script>').messages)
def test_a_tag_with_name_attribute(self): self.assertEquals([ html_linter.InvalidAttributeMessage( line=1, column=4, attribute='name') ], html_linter.HTML5Linter('<a name="foo">').messages)