Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1021)

Unified Diff: ui/views/window/dialog_delegate_unittest.cc

Issue 2861533003: Backfill some UI tests. (Closed)
Patch Set: fix silent merge conflict Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/window/dialog_client_view_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_delegate_unittest.cc
diff --git a/ui/views/window/dialog_delegate_unittest.cc b/ui/views/window/dialog_delegate_unittest.cc
index 59e46551ee5e8186d6a2d29e9030995ae016f0e7..f4993bd35e418ef5f3343e844bda799bd1cc212f 100644
--- a/ui/views/window/dialog_delegate_unittest.cc
+++ b/ui/views/window/dialog_delegate_unittest.cc
@@ -289,6 +289,19 @@ TEST_F(DialogTest, HitTest_WithTitle) {
}
}
+TEST_F(DialogTest, HitTest_CloseButton) {
+ const NonClientView* view = dialog()->GetWidget()->non_client_view();
+ dialog()->set_show_close_button(true);
+ BubbleFrameView* frame = static_cast<BubbleFrameView*>(view->frame_view());
+ frame->ResetWindowControls();
+
+ const gfx::Rect close_button_bounds =
+ frame->GetCloseButtonForTest()->bounds();
+ EXPECT_EQ(HTCLOSE,
+ frame->NonClientHitTest(gfx::Point(close_button_bounds.x() + 4,
+ close_button_bounds.y() + 4)));
+}
+
TEST_F(DialogTest, BoundsAccommodateTitle) {
TestDialog* dialog2(new TestDialog());
dialog2->set_title(base::ASCIIToUTF16("Title"));
« no previous file with comments | « ui/views/window/dialog_client_view_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698