Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/pass_through.py

Issue 1151753003: Integration test for Chrome-Proxy: pass-through directive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@loFiSnackbar
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from telemetry.page import page as page_module
6 from telemetry.page import page_set as page_set_module
7
8 class PassThroughPage(page_module.Page):
9 """
10 A test page for the chrome proxy pass-through tests.
11 """
12
13 def __init__(self, url, page_set):
14 super(PassThroughPage, self).__init__(url=url, page_set=page_set)
15
16 def RunNavigateSteps(self, action_runner):
17 super(PassThroughPage, self).RunNavigateSteps(action_runner)
18 action_runner.ExecuteJavaScript('''
19 (function() {
20 var request = new XMLHttpRequest();
21 request.open("GET", "http://aws1.mdw.la/fw/buddy.jpg");
sclittle 2015/05/21 01:54:24 Also, don't hardcode the url here, just use |self.
sclittle 2015/05/21 01:54:25 Please use something off of check.googlezip.net, w
megjablon 2015/05/21 19:03:07 Done.
22 request.setRequestHeader("Chrome-Proxy","pass-through");
sclittle 2015/05/21 01:54:25 nit: add space after comma
Not at Google. Contact bengr 2015/05/21 18:29:00 For this test to be meaningful, "Chrome-Proxy: pas
sclittle 2015/05/21 18:43:05 @kundaji: IIRC the "Chrome-Proxy: pass-through" r
Not at Google. Contact bengr 2015/05/21 18:53:54 You are right: I forgot that Telemetry does not al
megjablon 2015/05/21 19:03:07 Done.
23 request.send(null);
24 })();''')
25 action_runner.Wait(1)
26
27
28 class PassThroughPageSet(page_set_module.PageSet):
29 """ Chrome proxy test sites """
30
31 def __init__(self):
32 super(PassThroughPageSet, self).__init__()
33
34 urls_list = [
35 'http://aws1.mdw.la/fw/buddy.jpg',
sclittle 2015/05/21 01:54:25 same here, use http://check.googlezip.net/image.pn
megjablon 2015/05/21 19:03:07 Done.
36 ]
37
38 for url in urls_list:
39 self.AddUserStory(PassThroughPage(url, self))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698