| 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/browser_view_layout.h" | 5 #include "chrome/browser/ui/views/frame/browser_view_layout.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "chrome/browser/ui/views/frame/browser_view.h" | 8 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 8 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h" | 9 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h" |
| 9 #include "chrome/browser/ui/views/frame/contents_layout_manager.h" | 10 #include "chrome/browser/ui/views/frame/contents_layout_manager.h" |
| 10 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 11 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
| 11 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" | 12 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" |
| 12 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 13 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 13 #include "chrome/test/base/browser_with_test_window_test.h" | 14 #include "chrome/test/base/browser_with_test_window_test.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 16 |
| 16 class MockBrowserViewLayoutDelegate : public BrowserViewLayoutDelegate { | 17 class MockBrowserViewLayoutDelegate : public BrowserViewLayoutDelegate { |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 const int kBottom = 500; | 251 const int kBottom = 500; |
| 251 EXPECT_EQ(kBottom, layout()->LayoutDownloadShelf(kBottom)); | 252 EXPECT_EQ(kBottom, layout()->LayoutDownloadShelf(kBottom)); |
| 252 | 253 |
| 253 // Download shelf layout moves up the bottom edge and sets visibility. | 254 // Download shelf layout moves up the bottom edge and sets visibility. |
| 254 delegate()->set_download_shelf_needs_layout(true); | 255 delegate()->set_download_shelf_needs_layout(true); |
| 255 download_shelf->SetVisible(false); | 256 download_shelf->SetVisible(false); |
| 256 EXPECT_EQ(450, layout()->LayoutDownloadShelf(kBottom)); | 257 EXPECT_EQ(450, layout()->LayoutDownloadShelf(kBottom)); |
| 257 EXPECT_TRUE(download_shelf->visible()); | 258 EXPECT_TRUE(download_shelf->visible()); |
| 258 EXPECT_EQ("0,450 0x50", download_shelf->bounds().ToString()); | 259 EXPECT_EQ("0,450 0x50", download_shelf->bounds().ToString()); |
| 259 } | 260 } |
| OLD | NEW |