diff options
author | sclittle <sclittle@chromium.org> | 2014-12-16 12:04:45 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-16 20:05:17 +0000 |
commit | 465286f0666b87fa1fa97dbb6ff4df1d52712c53 (patch) | |
tree | 6f515ebc36805dba983d7903bcae050cfb6f6909 /tools/chrome_proxy | |
parent | 2865fb61212f41f2f1f605a018e6a8d3e53e6100 (diff) | |
download | chromium_src-465286f0666b87fa1fa97dbb6ff4df1d52712c53.zip chromium_src-465286f0666b87fa1fa97dbb6ff4df1d52712c53.tar.gz chromium_src-465286f0666b87fa1fa97dbb6ff4df1d52712c53.tar.bz2 |
Switch calls of PageSet.AddPage to AddUserStory in DRP telemetry tests
After https://codereview.chromium.org/800863003/, PageSet.AddPage has
been removed in favor of PageSet.AddUserStory. This sudden removal
caused all the chrome-proxy tests to fail.
This change makes the DRP telemetry tests use PageSet.AddUserStory
instead of AddPage.
BUG=442820
Review URL: https://codereview.chromium.org/801783005
Cr-Commit-Position: refs/heads/master@{#308650}
Diffstat (limited to 'tools/chrome_proxy')
11 files changed, 46 insertions, 45 deletions
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/block_once.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/block_once.py index 9e9fb10..f25b480 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/block_once.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/block_once.py @@ -24,4 +24,4 @@ class BlockOncePageSet(page_set_module.PageSet): ] for url in urls_list: - self.AddPage(BlockOncePage(url, self)) + self.AddUserStory(BlockOncePage(url, self)) diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/bypass.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/bypass.py index f8a764c..360367c 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/bypass.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/bypass.py @@ -26,4 +26,4 @@ class BypassPageSet(page_set_module.PageSet): ] for url in urls_list: - self.AddPage(BypassPage(url, self)) + self.AddUserStory(BypassPage(url, self)) diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/client_type.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/client_type.py index d9936b5..10dae71 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/client_type.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/client_type.py @@ -32,25 +32,25 @@ class ClientTypePageSet(page_set_module.PageSet): # order to determine the Chrome-Proxy client type value before running any # of the following pages, since there's no way to get the client type value # from a request that was bypassed. - self.AddPage(ClientTypePage( + self.AddUserStory(ClientTypePage( url='http://aws1.mdw.la/fw', page_set=self, bypass_for_client_type='none')) # Page that should cause a bypass for android chrome clients. - self.AddPage(ClientTypePage( + self.AddUserStory(ClientTypePage( url='http://check.googlezip.net/chrome-proxy-header/c=ANDROID', page_set=self, bypass_for_client_type='android')) # Page that should cause a bypass for android webview clients. - self.AddPage(ClientTypePage( + self.AddUserStory(ClientTypePage( url='http://check.googlezip.net/chrome-proxy-header/c=WEBVIEW', page_set=self, bypass_for_client_type='webview')) # Page that should cause a bypass for iOS clients. - self.AddPage(ClientTypePage( + self.AddUserStory(ClientTypePage( url='http://check.googlezip.net/chrome-proxy-header/c=IOS', page_set=self, bypass_for_client_type='ios')) diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/corsbypass.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/corsbypass.py index bb26412..4fc42bc 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/corsbypass.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/corsbypass.py @@ -26,4 +26,4 @@ class CorsBypassPageSet(page_set_module.PageSet): ] for url in urls_list: - self.AddPage(CorsBypassPage(url, self)) + self.AddUserStory(CorsBypassPage(url, self)) diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/explicit_bypass.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/explicit_bypass.py index c2b6d30..615b268 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/explicit_bypass.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/explicit_bypass.py @@ -42,7 +42,7 @@ class ExplicitBypassPageSet(page_set_module.PageSet): super(ExplicitBypassPageSet, self).__init__() # Test page for "Chrome-Proxy: bypass=0". - self.AddPage(ExplicitBypassPage( + self.AddUserStory(ExplicitBypassPage( url=measurements.GetResponseOverrideURL( respHeader='{"Chrome-Proxy":["bypass=0"],' '"Via":["1.1 Chrome-Compression-Proxy"]}'), @@ -52,7 +52,7 @@ class ExplicitBypassPageSet(page_set_module.PageSet): bypass_seconds_high=metrics.DEFAULT_BYPASS_MAX_SECONDS)) # Test page for "Chrome-Proxy: bypass=3600". - self.AddPage(ExplicitBypassPage( + self.AddUserStory(ExplicitBypassPage( url=measurements.GetResponseOverrideURL( respHeader='{"Chrome-Proxy":["bypass=3600"],' '"Via":["1.1 Chrome-Compression-Proxy"]}'), @@ -62,7 +62,7 @@ class ExplicitBypassPageSet(page_set_module.PageSet): bypass_seconds_high=3600)) # Test page for "Chrome-Proxy: block=0". - self.AddPage(ExplicitBypassPage( + self.AddUserStory(ExplicitBypassPage( url=measurements.GetResponseOverrideURL( respHeader='{"Chrome-Proxy":["block=0"],' '"Via":["1.1 Chrome-Compression-Proxy"]}'), @@ -72,7 +72,7 @@ class ExplicitBypassPageSet(page_set_module.PageSet): bypass_seconds_high=metrics.DEFAULT_BYPASS_MAX_SECONDS)) # Test page for "Chrome-Proxy: block=3600". - self.AddPage(ExplicitBypassPage( + self.AddUserStory(ExplicitBypassPage( url=measurements.GetResponseOverrideURL( respHeader='{"Chrome-Proxy":["block=3600"],' '"Via":["1.1 Chrome-Compression-Proxy"]}'), diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/fallback_viaheader.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/fallback_viaheader.py index e24ba2c..a1ec2ca 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/fallback_viaheader.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/fallback_viaheader.py @@ -24,4 +24,4 @@ class FallbackViaHeaderPageSet(page_set_module.PageSet): ] for url in urls_list: - self.AddPage(FallbackViaHeaderPage(url, self)) + self.AddUserStory(FallbackViaHeaderPage(url, self)) diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/http_to_direct_fallback.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/http_to_direct_fallback.py index dd3ba54..e33b287 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/http_to_direct_fallback.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/http_to_direct_fallback.py @@ -23,4 +23,4 @@ class HTTPToDirectFallbackPageSet(page_set_module.PageSet): ] for url in urls_list: - self.AddPage(HTTPToDirectFallbackPage(url, self)) + self.AddUserStory(HTTPToDirectFallbackPage(url, self)) diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py index b93949e..d6af6b1 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py @@ -29,4 +29,4 @@ class SafebrowsingPageSet(page_set_module.PageSet): super(SafebrowsingPageSet, self).__init__( archive_data_file='../data/chrome_proxy_safebrowsing.json') - self.AddPage(SafebrowsingPage('http://www.ianfette.org/', self)) + self.AddUserStory(SafebrowsingPage('http://www.ianfette.org/', self)) diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/smoke.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/smoke.py index 494d1fb..6b11d44 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/smoke.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/smoke.py @@ -104,9 +104,9 @@ class SmokePageSet(page_set_module.PageSet): super(SmokePageSet, self).__init__( archive_data_file='../data/chrome_proxy_smoke.json') - self.AddPage(Page1(self)) - self.AddPage(Page2(self)) - self.AddPage(Page3(self)) - self.AddPage(Page4(self)) - self.AddPage(Page5(self)) - self.AddPage(Page6(self)) + self.AddUserStory(Page1(self)) + self.AddUserStory(Page2(self)) + self.AddUserStory(Page3(self)) + self.AddUserStory(Page4(self)) + self.AddUserStory(Page5(self)) + self.AddUserStory(Page6(self)) diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/synthetic.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/synthetic.py index d80d278..e38da89 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/synthetic.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/synthetic.py @@ -27,4 +27,4 @@ class SyntheticPageSet(page_set_module.PageSet): ] for url in urls_list: - self.AddPage(SyntheticPage(url, self)) + self.AddUserStory(SyntheticPage(url, self)) diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/top_20.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/top_20.py index 813f0fb..22ec8a6 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/top_20.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/top_20.py @@ -21,70 +21,71 @@ class Top20PageSet(page_set_module.PageSet): archive_data_file='../data/chrome_proxy_top_20.json') # Why: top google property; a google tab is often open - self.AddPage(Top20Page('https://www.google.com/#hl=en&q=barack+obama', - self)) + self.AddUserStory(Top20Page('https://www.google.com/#hl=en&q=barack+obama', + self)) # Why: #3 (Alexa global) - self.AddPage(Top20Page('http://www.youtube.com', self)) + self.AddUserStory(Top20Page('http://www.youtube.com', self)) # Why: #18 (Alexa global), Picked an interesting post - self.AddPage(Top20Page( + self.AddUserStory(Top20Page( # pylint: disable=C0301 'http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-picks-for-august-2012/', self, 'Wordpress')) # Why: top social,Public profile - self.AddPage(Top20Page('http://www.facebook.com/barackobama', self, - 'Facebook')) + self.AddUserStory(Top20Page('http://www.facebook.com/barackobama', self, + 'Facebook')) # Why: #12 (Alexa global),Public profile - self.AddPage(Top20Page('http://www.linkedin.com/in/linustorvalds', self, - 'LinkedIn')) + self.AddUserStory(Top20Page('http://www.linkedin.com/in/linustorvalds', + self, 'LinkedIn')) # Why: #6 (Alexa) most visited worldwide,Picked an interesting page - self.AddPage(Top20Page('http://en.wikipedia.org/wiki/Wikipedia', self, - 'Wikipedia (1 tab)')) + self.AddUserStory(Top20Page('http://en.wikipedia.org/wiki/Wikipedia', self, + 'Wikipedia (1 tab)')) # Why: #8 (Alexa global),Picked an interesting page - self.AddPage(Top20Page('https://twitter.com/katyperry', self, 'Twitter')) + self.AddUserStory(Top20Page('https://twitter.com/katyperry', self, + 'Twitter')) # Why: #37 (Alexa global) - self.AddPage(Top20Page('http://pinterest.com', self, 'Pinterest')) + self.AddUserStory(Top20Page('http://pinterest.com', self, 'Pinterest')) # Why: #1 sports - self.AddPage(Top20Page('http://espn.go.com', self, 'ESPN')) + self.AddUserStory(Top20Page('http://espn.go.com', self, 'ESPN')) # Why: #1 news worldwide (Alexa global) - self.AddPage(Top20Page('http://news.yahoo.com', self)) + self.AddUserStory(Top20Page('http://news.yahoo.com', self)) # Why: #2 news worldwide - self.AddPage(Top20Page('http://www.cnn.com', self)) + self.AddUserStory(Top20Page('http://www.cnn.com', self)) # Why: #7 (Alexa news); #27 total time spent,Picked interesting page - self.AddPage(Top20Page( + self.AddUserStory(Top20Page( 'http://www.weather.com/weather/right-now/Mountain+View+CA+94043', self, 'Weather.com')) # Why: #1 world commerce website by visits; #3 commerce in the US by time # spent - self.AddPage(Top20Page('http://www.amazon.com', self)) + self.AddUserStory(Top20Page('http://www.amazon.com', self)) # Why: #1 commerce website by time spent by users in US - self.AddPage(Top20Page('http://www.ebay.com', self)) + self.AddUserStory(Top20Page('http://www.ebay.com', self)) # Why: #1 games according to Alexa (with actual games in it) - self.AddPage(Top20Page('http://games.yahoo.com', self)) + self.AddUserStory(Top20Page('http://games.yahoo.com', self)) # Why: #1 Alexa recreation - self.AddPage(Top20Page('http://booking.com', self)) + self.AddUserStory(Top20Page('http://booking.com', self)) # Why: #1 Alexa reference - self.AddPage(Top20Page('http://answers.yahoo.com', self)) + self.AddUserStory(Top20Page('http://answers.yahoo.com', self)) # Why: #1 Alexa sports - self.AddPage(Top20Page('http://sports.yahoo.com/', self)) + self.AddUserStory(Top20Page('http://sports.yahoo.com/', self)) # Why: top tech blog - self.AddPage(Top20Page('http://techcrunch.com', self)) + self.AddUserStory(Top20Page('http://techcrunch.com', self)) - self.AddPage(Top20Page('http://www.nytimes.com', self)) + self.AddUserStory(Top20Page('http://www.nytimes.com', self)) |