OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h" | 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/ui/layout_constants.h" | 10 #include "chrome/browser/ui/layout_constants.h" |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 gfx::Rect avatar_bounds(new_avatar_button_->bounds()); | 330 gfx::Rect avatar_bounds(new_avatar_button_->bounds()); |
331 EXPECT_EQ(CaptionLeft() - avatar_width, avatar_bounds.x()); | 331 EXPECT_EQ(CaptionLeft() - avatar_width, avatar_bounds.x()); |
332 EXPECT_EQ(CaptionY(), avatar_bounds.y()); | 332 EXPECT_EQ(CaptionY(), avatar_bounds.y()); |
333 EXPECT_EQ(avatar_width, avatar_bounds.width()); | 333 EXPECT_EQ(avatar_width, avatar_bounds.width()); |
334 EXPECT_EQ(kCaptionButtonHeight, avatar_bounds.height()); | 334 EXPECT_EQ(kCaptionButtonHeight, avatar_bounds.height()); |
335 } | 335 } |
336 | 336 |
337 views::Widget* widget_; | 337 views::Widget* widget_; |
338 views::View* root_view_; | 338 views::View* root_view_; |
339 OBFVL* layout_manager_; | 339 OBFVL* layout_manager_; |
340 scoped_ptr<TestLayoutDelegate> delegate_; | 340 std::unique_ptr<TestLayoutDelegate> delegate_; |
341 | 341 |
342 // Widgets: | 342 // Widgets: |
343 views::ImageButton* minimize_button_; | 343 views::ImageButton* minimize_button_; |
344 views::ImageButton* maximize_button_; | 344 views::ImageButton* maximize_button_; |
345 views::ImageButton* restore_button_; | 345 views::ImageButton* restore_button_; |
346 views::ImageButton* close_button_; | 346 views::ImageButton* close_button_; |
347 | 347 |
348 TabIconView* tab_icon_view_; | 348 TabIconView* tab_icon_view_; |
349 views::Label* window_title_; | 349 views::Label* window_title_; |
350 | 350 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 435 |
436 for (int i = 0; i < 2; ++i) { | 436 for (int i = 0; i < 2; ++i) { |
437 root_view_->Layout(); | 437 root_view_->Layout(); |
438 SCOPED_TRACE(i == 0 ? "Window is restored" : "Window is maximized"); | 438 SCOPED_TRACE(i == 0 ? "Window is restored" : "Window is maximized"); |
439 ExpectCaptionButtons(false, 0); | 439 ExpectCaptionButtons(false, 0); |
440 ExpectTabStripAndMinimumSize(false); | 440 ExpectTabStripAndMinimumSize(false); |
441 ExpectAvatar(); | 441 ExpectAvatar(); |
442 delegate_->set_maximized(true); | 442 delegate_->set_maximized(true); |
443 } | 443 } |
444 } | 444 } |
OLD | NEW |