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

Side by Side Diff: tools/perf/benchmarks/blink_perf.py

Issue 1521943002: Use iframe in blink_perf.pywebsocket perf tests to remove --disable-web-security (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated DEPS. Created 5 years 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 | « third_party/WebKit/PerformanceTests/Pywebsocket/resources/util_performance_test.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 import os 5 import os
6 6
7 from core import path_util 7 from core import path_util
8 from core import perf_benchmark 8 from core import perf_benchmark
9 9
10 from telemetry import benchmark 10 from telemetry import benchmark
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 self._blink_perf_js += '\nwindow.fullFrameMeasurement = true;' 118 self._blink_perf_js += '\nwindow.fullFrameMeasurement = true;'
119 119
120 def CustomizeBrowserOptions(self, options): 120 def CustomizeBrowserOptions(self, options):
121 super(_BlinkPerfFullFrameMeasurement, self).CustomizeBrowserOptions( 121 super(_BlinkPerfFullFrameMeasurement, self).CustomizeBrowserOptions(
122 options) 122 options)
123 # Full layout measurement needs content_shell with internals testing API. 123 # Full layout measurement needs content_shell with internals testing API.
124 assert 'content-shell' in options.browser_type 124 assert 'content-shell' in options.browser_type
125 options.AppendExtraBrowserArgs(['--expose-internals-for-testing']) 125 options.AppendExtraBrowserArgs(['--expose-internals-for-testing'])
126 126
127 127
128 class _BlinkPerfPywebsocketMeasurement(_BlinkPerfMeasurement):
129 def CustomizeBrowserOptions(self, options):
130 super(_BlinkPerfPywebsocketMeasurement, self).CustomizeBrowserOptions(
131 options)
132 # Cross-origin accesses are needed to run benchmarks spanning two servers,
133 # the Telemetry's HTTP server and the pywebsocket server.
134 options.AppendExtraBrowserArgs(['--disable-web-security'])
135
136
137 class _SharedPywebsocketPageState(shared_page_state.SharedPageState): 128 class _SharedPywebsocketPageState(shared_page_state.SharedPageState):
138 """Runs a pywebsocket server.""" 129 """Runs a pywebsocket server."""
139 def __init__(self, test, finder_options, user_story_set): 130 def __init__(self, test, finder_options, user_story_set):
140 super(_SharedPywebsocketPageState, self).__init__( 131 super(_SharedPywebsocketPageState, self).__init__(
141 test, finder_options, user_story_set) 132 test, finder_options, user_story_set)
142 self.platform.StartLocalServer(pywebsocket_server.PywebsocketServer()) 133 self.platform.StartLocalServer(pywebsocket_server.PywebsocketServer())
143 134
144 135
145 class BlinkPerfBindings(perf_benchmark.PerfBenchmark): 136 class BlinkPerfBindings(perf_benchmark.PerfBenchmark):
146 tag = 'bindings' 137 tag = 'bindings'
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 # Disabled on reference builds due to https://crbug.com/530374 325 # Disabled on reference builds due to https://crbug.com/530374
335 @benchmark.Disabled('win', 'chromeos', 'reference') 326 @benchmark.Disabled('win', 'chromeos', 'reference')
336 class BlinkPerfPywebsocket(perf_benchmark.PerfBenchmark): 327 class BlinkPerfPywebsocket(perf_benchmark.PerfBenchmark):
337 ''' 328 '''
338 The blink_perf.pywebsocket tests measure turn-around-time of 10MB 329 The blink_perf.pywebsocket tests measure turn-around-time of 10MB
339 send/receive for XHR, Fetch API and WebSocket. 330 send/receive for XHR, Fetch API and WebSocket.
340 We might ignore <10% regressions, because the tests are noisy and such 331 We might ignore <10% regressions, because the tests are noisy and such
341 regressions are often unreproducible (https://crbug.com/549017). 332 regressions are often unreproducible (https://crbug.com/549017).
342 ''' 333 '''
343 tag = 'pywebsocket' 334 tag = 'pywebsocket'
344 test = _BlinkPerfPywebsocketMeasurement 335 test = _BlinkPerfMeasurement
345 336
346 @classmethod 337 @classmethod
347 def Name(cls): 338 def Name(cls):
348 return 'blink_perf.pywebsocket' 339 return 'blink_perf.pywebsocket'
349 340
350 def CreateStorySet(self, options): 341 def CreateStorySet(self, options):
351 path = os.path.join(BLINK_PERF_BASE_DIR, 'Pywebsocket') 342 path = os.path.join(BLINK_PERF_BASE_DIR, 'Pywebsocket')
352 return CreateStorySetFromPath(path, SKIPPED_FILE, 343 return CreateStorySetFromPath(path, SKIPPED_FILE,
353 shared_page_state_class=_SharedPywebsocketPageState) 344 shared_page_state_class=_SharedPywebsocketPageState)
354 345
355 @classmethod 346 @classmethod
356 def ShouldDisable(cls, possible_browser): 347 def ShouldDisable(cls, possible_browser):
357 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 348 return cls.IsSvelte(possible_browser) # http://crbug.com/551950
OLDNEW
« no previous file with comments | « third_party/WebKit/PerformanceTests/Pywebsocket/resources/util_performance_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698