mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Added async performance test
This commit is contained in:
parent
363f590019
commit
7aa3350d45
9 changed files with 122 additions and 17 deletions
|
@ -71,7 +71,7 @@ def generate_placeholder(testcase):
|
|||
return [timings]
|
||||
|
||||
|
||||
def run_gecko_test(testcase, timeout):
|
||||
def run_gecko_test(testcase, timeout, is_async):
|
||||
with create_gecko_session() as driver:
|
||||
driver.set_page_load_timeout(timeout)
|
||||
try:
|
||||
|
@ -97,6 +97,16 @@ def run_gecko_test(testcase, timeout):
|
|||
print("Failed to get a valid timing measurement.")
|
||||
return generate_placeholder(testcase)
|
||||
|
||||
if is_async:
|
||||
# TODO: the timeout is hardcoded
|
||||
driver.implicitly_wait(5) # sec
|
||||
driver.find_element_by_id("GECKO_TEST_DONE")
|
||||
timings.update(json.loads(
|
||||
driver.execute_script(
|
||||
"return JSON.stringify(window.customTimers)"
|
||||
)
|
||||
))
|
||||
|
||||
return [timings]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue