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

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

Issue 2617483006: [tools] Explicit timeout keyword in WaitForJavaScriptCondition (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | tools/perf/page_sets/blob_workshop.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from common.chrome_proxy_shared_page_state import ChromeProxySharedPageState 5 from common.chrome_proxy_shared_page_state import ChromeProxySharedPageState
6 from telemetry.page import page as page_module 6 from telemetry.page import page as page_module
7 from telemetry import story 7 from telemetry import story
8 8
9 9
10 class BlockOncePage(page_module.Page): 10 class BlockOncePage(page_module.Page):
(...skipping 18 matching lines...) Expand all
29 window.post_request_completed = true; 29 window.post_request_completed = true;
30 var viaProxyRequest = new XMLHttpRequest(); 30 var viaProxyRequest = new XMLHttpRequest();
31 viaProxyRequest.open("GET", 31 viaProxyRequest.open("GET",
32 "http://check.googlezip.net/image.png"); 32 "http://check.googlezip.net/image.png");
33 viaProxyRequest.send(); 33 viaProxyRequest.send();
34 }; 34 };
35 request.send(); 35 request.send();
36 })(); 36 })();
37 ''') 37 ''')
38 action_runner.WaitForJavaScriptCondition( 38 action_runner.WaitForJavaScriptCondition(
39 "window.post_request_completed == true", 30) 39 "window.post_request_completed == true", timeout_in_seconds=30)
40 40
41 class BlockOnceStorySet(story.StorySet): 41 class BlockOnceStorySet(story.StorySet):
42 42
43 """ Chrome proxy test sites """ 43 """ Chrome proxy test sites """
44 44
45 def __init__(self): 45 def __init__(self):
46 super(BlockOnceStorySet, self).__init__() 46 super(BlockOnceStorySet, self).__init__()
47 47
48 # Test block-once for a GET request. 48 # Test block-once for a GET request.
49 urls_list = [ 49 urls_list = [
50 'http://check.googlezip.net/blocksingle/', 50 'http://check.googlezip.net/blocksingle/',
51 ] 51 ]
52 52
53 for url in urls_list: 53 for url in urls_list:
54 self.AddStory(BlockOncePage(url, self)) 54 self.AddStory(BlockOncePage(url, self))
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/blob_workshop.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698