def testSnappingSimplePage(self):
     self.platform.SetHTTPServerDirectories(path.GetUnittestDataDir())
     html_file_path = os.path.join(path.GetUnittestDataDir(),
                                   'green_rect.html')
     url = self.platform.http_server.UrlOf(html_file_path)
     outfile = StringIO.StringIO()
     snap_page_util.SnapPage(self.finder_options,
                             url,
                             interactive=False,
                             snapshot_file=outfile)
     self.assertIn('id="green"', outfile.getvalue())
 def _SnapWithDummyValuesExceptPath(self, snapshot_path):
     snap_page_util.SnapPage(self.finder_options,
                             'url',
                             interactive=False,
                             snapshot_path=snapshot_path,
                             enable_browser_log=False)