mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01:00
Tests: Report view's test path instead of URL in test-web
When a test is active in a test-web view, show the relative path to the test instead of the view's URL. This gives a better starting point for debugging than whatever the last loaded URL happened to be. If no test is active, we still show the view's URL.
This commit is contained in:
parent
bf3fa13773
commit
f9888b0641
|
|
@ -803,14 +803,14 @@ static void handle_signal(int signal)
|
|||
|
||||
auto now = UnixDateTime::now();
|
||||
WebView::ViewImplementation::for_each_view([&](WebView::ViewImplementation const& view) {
|
||||
dbg("- View {}: {} ", view.view_id(), view.url());
|
||||
dbg("- View {}: ", view.view_id());
|
||||
|
||||
auto maybe_test = s_test_by_view.get(&view);
|
||||
if (maybe_test.has_value()) {
|
||||
auto const& test = *maybe_test.release_value();
|
||||
dbgln("(duration: {})", human_readable_time(now - test.start_time));
|
||||
dbgln("{} (duration: {})", test.relative_path, human_readable_time(now - test.start_time));
|
||||
} else {
|
||||
dbgln("(no active test)");
|
||||
dbgln("{} (no active test)", view.url());
|
||||
}
|
||||
|
||||
return IterationDecision::Continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user