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
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