mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Correctly test if WebDriver ExecuteScript timeout is reached
Previously, the conversion assumed that the supplied timeout was in seconds rather than milliseconds.
This commit is contained in:
committed by
Tim Ledbetter
parent
ba36312864
commit
b688b5d9d4
Notes:
github-actions[bot]
2024-08-28 05:58:30 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/b688b5d9d4c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1209
@@ -332,7 +332,7 @@ ExecuteScriptResultSerialized execute_async_script(Web::Page& page, ByteString c
|
||||
auto start = MonotonicTime::now();
|
||||
|
||||
auto has_timed_out = [&] {
|
||||
return timeout.has_value() && (MonotonicTime::now() - start) > AK::Duration::from_seconds(static_cast<i64>(*timeout));
|
||||
return timeout.has_value() && (MonotonicTime::now() - start) > AK::Duration::from_milliseconds(static_cast<i64>(*timeout));
|
||||
};
|
||||
|
||||
// AD-HOC: An execution context is required for Promise creation hooks.
|
||||
|
||||
Reference in New Issue
Block a user