def setUp(self):
   self.emma_dir = 'fake/dir/'
   self.parser = emma_coverage_stats._EmmaHtmlParser(self.emma_dir)
   self.simple_html = '<TR><TD CLASS="p">Test HTML</TD></TR>'
   self.index_html = (
     '<HTML>'
       '<BODY>'
         '<TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%">'
         '</TABLE>'
         '<TABLE CELLSPACING="0" WIDTH="100%">'
         '</TABLE>'
         '<TABLE CLASS="it" CELLSPACING="0">'
         '</TABLE>'
         '<TABLE CELLSPACING="0" WIDTH="100%">'
           '<TR>'
             '<TH CLASS="f">name</TH>'
             '<TH>class, %</TH>'
             '<TH>method, %</TH>'
             '<TH>block, %</TH>'
             '<TH>line, %</TH>'
           '</TR>'
           '<TR CLASS="o">'
             '<TD><A HREF="_files/0.html"'
             '>org.chromium.chrome.browser</A></TD>'
             '<TD CLASS="h">0%   (0/3)</TD>'
           '</TR>'
           '<TR>'
             '<TD><A HREF="_files/1.html"'
             '>org.chromium.chrome.browser.tabmodel</A></TD>'
             '<TD CLASS="h">0%   (0/8)</TD>'
           '</TR>'
         '</TABLE>'
         '<TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%">'
         '</TABLE>'
       '</BODY>'
     '</HTML>'
   )
   self.package_1_class_list_html = (
     '<HTML>'
       '<BODY>'
         '<TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%">'
         '</TABLE>'
         '<TABLE CELLSPACING="0" WIDTH="100%">'
         '</TABLE>'
         '<TABLE CELLSPACING="0" WIDTH="100%">'
           '<TR>'
             '<TH CLASS="f">name</TH>'
             '<TH>class, %</TH>'
             '<TH>method, %</TH>'
             '<TH>block, %</TH>'
             '<TH>line, %</TH>'
           '</TR>'
           '<TR CLASS="o">'
             '<TD><A HREF="1e.html">IntentHelper.java</A></TD>'
             '<TD CLASS="h">0%   (0/3)</TD>'
             '<TD CLASS="h">0%   (0/9)</TD>'
             '<TD CLASS="h">0%   (0/97)</TD>'
             '<TD CLASS="h">0%   (0/26)</TD>'
           '</TR>'
         '</TABLE>'
         '<TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%">'
         '</TABLE>'
       '</BODY>'
     '</HTML>'
   )
   self.package_2_class_list_html = (
     '<HTML>'
       '<BODY>'
         '<TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%">'
         '</TABLE>'
         '<TABLE CELLSPACING="0" WIDTH="100%">'
         '</TABLE>'
         '<TABLE CELLSPACING="0" WIDTH="100%">'
           '<TR>'
             '<TH CLASS="f">name</TH>'
             '<TH>class, %</TH>'
             '<TH>method, %</TH>'
             '<TH>block, %</TH>'
             '<TH>line, %</TH>'
           '</TR>'
           '<TR CLASS="o">'
             '<TD><A HREF="1f.html">ContentSetting.java</A></TD>'
             '<TD CLASS="h">0%   (0/1)</TD>'
           '</TR>'
           '<TR>'
             '<TD><A HREF="20.html">DevToolsServer.java</A></TD>'
           '</TR>'
           '<TR CLASS="o">'
             '<TD><A HREF="21.html">FileProviderHelper.java</A></TD>'
           '</TR>'
           '<TR>'
             '<TD><A HREF="22.html">ContextualMenuBar.java</A></TD>'
           '</TR>'
           '<TR CLASS="o">'
             '<TD><A HREF="23.html">AccessibilityUtil.java</A></TD>'
           '</TR>'
           '<TR>'
             '<TD><A HREF="24.html">NavigationPopup.java</A></TD>'
           '</TR>'
         '</TABLE>'
         '<TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%">'
         '</TABLE>'
       '</BODY>'
     '</HTML>'
   )
   self.partially_covered_tr_html = (
     '<TR CLASS="p">'
       '<TD CLASS="l" TITLE="78% line coverage (7 out of 9)">108</TD>'
       '<TD TITLE="78% line coverage (7 out of 9 instructions)">'
         'if (index &lt; 0 || index = mSelectors.size()) index = 0;</TD>'
     '</TR>'
   )
   self.covered_tr_html = (
     '<TR CLASS="c">'
       '<TD CLASS="l">110</TD>'
       '<TD>        if (mSelectors.get(index) != null) {</TD>'
     '</TR>'
   )
   self.not_executable_tr_html = (
     '<TR>'
       '<TD CLASS="l">109</TD>'
       '<TD> </TD>'
     '</TR>'
   )
   self.tr_with_extra_a_tag = (
     '<TR CLASS="z">'
       '<TD CLASS="l">'
         '<A name="1f">54</A>'
       '</TD>'
       '<TD>            }</TD>'
     '</TR>'
   )
 def testInit(self):
   emma_dir = self.emma_dir
   parser = emma_coverage_stats._EmmaHtmlParser(emma_dir)
   self.assertEqual(parser._base_dir, emma_dir)
   self.assertEqual(parser._emma_files_path, 'fake/dir/_files')
   self.assertEqual(parser._index_path, 'fake/dir/index.html')