mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
committed by
Tim Ledbetter
parent
ba36312864
commit
b688b5d9d4
@@ -332,7 +332,7 @@ ExecuteScriptResultSerialized execute_async_script(Web::Page& page, ByteString c
|
|||||||
auto start = MonotonicTime::now();
|
auto start = MonotonicTime::now();
|
||||||
|
|
||||||
auto has_timed_out = [&] {
|
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.
|
// AD-HOC: An execution context is required for Promise creation hooks.
|
||||||
|
|||||||
Reference in New Issue
Block a user