def test_style_type(self): self.assertEquals( [html_linter.ConcernsSeparationMessage( line=1, column=1, tag='style'), html_linter.TypeAttributeMessage(line=1, column=8, tag='style')], html_linter.HTML5Linter('<style type="text/css">').messages )
def test_script_type(self): self.assertEquals( [html_linter.TypeAttributeMessage(line=1, column=9, tag='script')], html_linter.HTML5Linter( '<script type="text/javascript" src="foo.js">').messages) self.assertEquals([], html_linter.HTML5Linter( '<script src="foo.js">\n' + '<script type="foo" src="foo.foo">\n').messages)
def test_link_type(self): self.assertEquals( [html_linter.TypeAttributeMessage(line=1, column=7, tag='link')], html_linter.HTML5Linter( '<link type="text/css" href="foo.css">').messages) self.assertEquals([], html_linter.HTML5Linter( '<link href="foo.css">\n' + '<link type="foo" href="foo.foo">\n').messages)