Esempio n. 1
0
 def AddStories(self, labels, urls, cache_temperatures, traffic_settings):
   for url in urls:
     for temp in cache_temperatures:
       for traffic in traffic_settings:
         self.AddStory(page_cycler_story.PageCyclerStory(url, self,
             shared_page_state_class=shared_page_state.SharedMobilePageState,
             cache_temperature=temp, traffic_setting=traffic, labels=labels))
Esempio n. 2
0
    def AddStories(self, tags, urls, cache_temperatures, traffic_settings):
        for url, name in urls:
            for temp in cache_temperatures:
                for traffic in traffic_settings:
                    page_name = name
                    if temp == cache_temperature_module.COLD:
                        page_name += '_cold'
                        tags.append('cache_temperature_cold')
                    elif temp == cache_temperature_module.WARM:
                        page_name += '_warm'
                        tags.append('cache_temperature_warm')
                    elif temp == cache_temperature_module.HOT:
                        page_name += '_hot'
                        tags.append('cache_temperature_hot')
                    elif temp == cache_temperature_module.ANY:
                        pass
                    else:
                        raise NotImplementedError

                    if traffic == traffic_setting_module.REGULAR_3G:
                        page_name += '_3g'

                    self.AddStory(
                        page_cycler_story.PageCyclerStory(
                            url,
                            self,
                            name=page_name,
                            shared_page_state_class=shared_page_state.
                            SharedMobilePageState,
                            cache_temperature=temp,
                            traffic_setting=traffic,
                            tags=tags))
  def AddStories(self, tags, urls, cache_temperatures):
    for url, name in urls:
      for temp in cache_temperatures:
        if temp == cache_temperature_module.COLD:
          page_name = name + '_cold'
          tags.append('cache_temperature_cold')
        elif temp == cache_temperature_module.WARM:
          page_name = name + '_warm'
          tags.append('cache_temperature_warm')
        else:
          raise NotImplementedError

        page_tags = tags[:]

        if page_name in ABRIDGED_STORY_NAMES:
          page_tags.append(ABRIDGED.name)

        self.AddStory(
            page_cycler_story.PageCyclerStory(
                url,
                self,
                shared_page_state_class=shared_page_state.
                SharedDesktopPageState,
                cache_temperature=temp,
                tags=page_tags,
                name=page_name,
                perform_final_navigation=True))
Esempio n. 4
0
 def AddStories(self, tags, urls, cache_temperatures):
     for url, name in urls:
         for temp in cache_temperatures:
             self.AddStory(
                 page_cycler_story.PageCyclerStory(
                     url,
                     self,
                     shared_page_state_class=shared_page_state.
                     SharedMobilePageState,
                     cache_temperature=temp,
                     tags=tags,
                     name=name))
Esempio n. 5
0
 def AddStories(self, tags, urls, cache_temperatures):
     for url, name in urls:
         for temp in cache_temperatures:
             if temp == cache_temperature_module.COLD:
                 page_name = name + '_cold'
                 tags.append('cache_temperature_cold')
             elif temp == cache_temperature_module.WARM:
                 page_name = name + '_warm'
                 tags.append('cache_temperature_warm')
             else:
                 raise NotImplementedError
             self.AddStory(
                 page_cycler_story.PageCyclerStory(
                     url,
                     self,
                     shared_page_state_class=shared_page_state.
                     SharedDesktopPageState,
                     cache_temperature=temp,
                     tags=tags,
                     name=page_name))