Truly independent web browser
Tests/LibWebView: Let a frame show the new page's hover in hover test
Andreas Kling9efc83ada299
diff --git a/Tests/LibWebView/TestLinkHoverStatus.cpp b/Tests/LibWebView/TestLinkHoverStatus.cppindex 23631c5edc8..7770db591a9 100644--- a/Tests/LibWebView/TestLinkHoverStatus.cpp+++ b/Tests/LibWebView/TestLinkHoverStatus.cpp@@ -127,10 +127,9 @@ TEST_CASE(link_hover_status)view->load_html("<!DOCTYPE html><a href=\"https://example.org/\" style=\"position:fixed;left:0;top:0;width:400px;height:300px\">Link</a>"sv);Core::EventLoop::current().spin_until([&]() { return loads_finished >= 3; });VERIFY(unhovers_reported == 4);- VERIFY(!hovered_url.has_value());- VERIFY(hovers_reported == 4);- // The new document's link at the same spot is a fresh target at the pointer's next move.+ // The new document's link at the same spot is a fresh target: the frame that shows it moves the hover to it where+ // that frame lands ahead of the load, and the pointer's next move does otherwise.move_mouse_to(*view, { 20, 20 });Core::EventLoop::current().spin_until([&]() { return hovers_reported >= 5; });VERIFY(hovered_url.has_value());@@ -151,7 +150,6 @@ function navigate_frame() { frame.srcdoc = frame.getAttribute("srcdoc") + "<!--Core::EventLoop::current().spin_until([&]() { return loads_finished >= 4; });// The pointer rested on the previous page's link, so that page's replacement reported the unhover.VERIFY(unhovers_reported == 5);- VERIFY(!hovered_url.has_value());// The iframe's own handler reports its link. And the iframe navigating underneath the pointer replaces the document// that link is in, so it reports the unhover, with the pointer resting.