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

Side by Side Diff: ash/frame/default_header_painter_unittest.cc

Issue 441803004: Introduce new WebApp header style for hosted apps and fizzy apps on ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/frame/default_header_painter.h" 5 #include "ash/frame/default_header_painter.h"
6 6
7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
8 #include "ash/frame/header_painter_util.h"
8 #include "ash/shell.h" 9 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
10 #include "ash/wm/window_state.h" 11 #include "ash/wm/window_state.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "grit/ash_resources.h" 13 #include "grit/ash_resources.h"
13 #include "ui/gfx/font_list.h" 14 #include "ui/gfx/font_list.h"
14 #include "ui/views/widget/widget.h" 15 #include "ui/views/widget/widget.h"
15 #include "ui/views/window/non_client_view.h" 16 #include "ui/views/window/non_client_view.h"
16 17
17 using ash::HeaderPainter; 18 using ash::HeaderPainter;
(...skipping 21 matching lines...) Expand all
39 ash::FrameCaptionButtonContainerView container(w.get(), 40 ash::FrameCaptionButtonContainerView container(w.get(),
40 ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); 41 ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
41 views::View window_icon; 42 views::View window_icon;
42 window_icon.SetBounds(0, 0, 16, 16); 43 window_icon.SetBounds(0, 0, 16, 16);
43 w->SetBounds(gfx::Rect(0, 0, 500, 500)); 44 w->SetBounds(gfx::Rect(0, 0, 500, 500));
44 w->Show(); 45 w->Show();
45 46
46 DefaultHeaderPainter painter; 47 DefaultHeaderPainter painter;
47 painter.Init(w.get(), 48 painter.Init(w.get(),
48 w->non_client_view()->frame_view(), 49 w->non_client_view()->frame_view(),
49 &window_icon,
50 &container); 50 &container);
51 painter.UpdateLeftHeaderView(&window_icon,
52 HeaderPainterUtil::GetDefaultIconSize());
51 painter.LayoutHeader(); 53 painter.LayoutHeader();
52 gfx::Rect title_bounds = painter.GetTitleBounds(); 54 gfx::Rect title_bounds = painter.GetTitleBounds();
53 EXPECT_EQ(window_icon.bounds().CenterPoint().y(), 55 EXPECT_EQ(window_icon.bounds().CenterPoint().y(),
54 title_bounds.CenterPoint().y()); 56 title_bounds.CenterPoint().y());
55 } 57 }
56 58
57 } // namespace ash 59 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698