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

Side by Side Diff: chrome/browser/ui/views/frame/immersive_mode_controller_ash_browsertest.cc

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for realz Created 7 years, 1 month 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/immersive_mode_controller.h" 5 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/ui/browser_commands.h" 8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/browser/ui/views/frame/browser_view.h" 9 #include "chrome/browser/ui/views/frame/browser_view.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 #include "content/public/browser/web_contents_view.h" 12 #include "content/public/browser/web_contents_view.h"
13 #include "ui/aura/window.h" 13 #include "ui/aura/window.h"
14 14
15 namespace {
16
17 // Returns the bounds of |view| in widget coordinates.
18 gfx::Rect GetRectInWidget(views::View* view) {
19 return view->ConvertRectToWidget(view->GetLocalBounds());
20 }
21
22 } // namespace
23
24 // TODO(jamescook): If immersive mode becomes popular on CrOS, consider porting 15 // TODO(jamescook): If immersive mode becomes popular on CrOS, consider porting
25 // it to other Aura platforms (win_aura, linux_aura). http://crbug.com/163931 16 // it to other Aura platforms (win_aura, linux_aura). http://crbug.com/163931
26 #if defined(OS_CHROMEOS) 17 #if defined(OS_CHROMEOS)
27 18
28 class ImmersiveModeControllerAshTest : public InProcessBrowserTest { 19 class ImmersiveModeControllerAshTest : public InProcessBrowserTest {
29 public: 20 public:
30 ImmersiveModeControllerAshTest() : browser_view_(NULL), controller_(NULL) {} 21 ImmersiveModeControllerAshTest() : browser_view_(NULL), controller_(NULL) {}
31 virtual ~ImmersiveModeControllerAshTest() {} 22 virtual ~ImmersiveModeControllerAshTest() {}
32 23
33 BrowserView* browser_view() { return browser_view_; } 24 BrowserView* browser_view() { return browser_view_; }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 EXPECT_TRUE(window->hit_test_bounds_override_outer_touch().top() > 0); 68 EXPECT_TRUE(window->hit_test_bounds_override_outer_touch().top() > 0);
78 69
79 // Disabling immersive mode resets the top touch insets to 0. 70 // Disabling immersive mode resets the top touch insets to 0.
80 chrome::ToggleFullscreenMode(browser()); 71 chrome::ToggleFullscreenMode(browser());
81 ASSERT_FALSE(browser_view()->IsFullscreen()); 72 ASSERT_FALSE(browser_view()->IsFullscreen());
82 ASSERT_FALSE(controller()->IsEnabled()); 73 ASSERT_FALSE(controller()->IsEnabled());
83 EXPECT_TRUE(window->hit_test_bounds_override_outer_touch().top() == 0); 74 EXPECT_TRUE(window->hit_test_bounds_override_outer_touch().top() == 0);
84 } 75 }
85 76
86 #endif // defined(OS_CHROMEOS) 77 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698