LibWeb: Disable caret blinking in test mode
If we want to test whether or not we're drawing the caret, we need to prevent it from blinking or otherwise all tests we're going to write that look at the display list will turn out to be flaky.
This commit is contained in:
parent
b29591244e
commit
a69df4d25b
1 changed files with 4 additions and 1 deletions
|
|
@ -6726,7 +6726,10 @@ GC::Ptr<DOM::Position> Document::cursor_position() const
|
|||
void Document::reset_cursor_blink_cycle()
|
||||
{
|
||||
m_cursor_blink_state = true;
|
||||
m_cursor_blink_timer->restart();
|
||||
|
||||
// In testing mode, disable timed blinking so we can deterministically generate display lists.
|
||||
if (!HTML::Window::in_test_mode())
|
||||
m_cursor_blink_timer->restart();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/document-sequences.html#doc-container-document
|
||||
|
|
|
|||
Loading…
Reference in a new issue