02_lib_cgi_add_html5_header_tag.patch

add <header> tag and some tests - Marcus Stollsteimer, 10/05/2012 10:22 PM

Download (1.16 KB)

View differences:

lib/cgi/html.rb (Arbeitskopie)
1035 1035
      extend TagMaker
1036 1036
      methods = ""
1037 1037
      # - -
1038
      for element in %w[ SECTION NAV ARTICLE ASIDE HGROUP
1038
      for element in %w[ SECTION NAV ARTICLE ASIDE HGROUP HEADER
1039 1039
        FOOTER FIGURE FIGCAPTION S TIME U MARK RUBY BDI IFRAME
1040 1040
        VIDEO AUDIO CANVAS DATALIST OUTPUT PROGRESS METER DETAILS
1041 1041
        SUMMARY MENU DIALOG I B SMALL EM STRONG DFN CODE SAMP KBD
test/cgi/test_cgi_tag_helper.rb (Arbeitskopie)
338 338
  end
339 339
=end
340 340

  
341
  def test_cgi_tag_helper_html5
342
    @environ = {
343
      'REQUEST_METHOD' => 'GET',
344
    }
345
    ENV.update(@environ)
346
    ## html5
347
    cgi = CGI.new('html5')
348
    assert_equal('<HEADER></HEADER>',cgi.header)
349
    assert_equal('<FOOTER></FOOTER>',cgi.footer)
350
    assert_equal('<ARTICLE></ARTICLE>',cgi.article)
351
    assert_equal('<SECTION></SECTION>',cgi.section)
352
  end
353

  
341 354
end