mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00: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:
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
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue