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

Side by Side Diff: chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc

Issue 1650483002: Refactor: Untangle Mac's ExclusiveAccessContext from BrowserWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename accessor Created 4 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/exclusive_access/fullscreen_controller_state_test.h" 5 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.h"
6 6
7 #include <memory.h> 7 #include <memory.h>
8 8
9 #include <iomanip> 9 #include <iomanip>
10 #include <iostream> 10 #include <iostream>
11 11
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "chrome/browser/fullscreen.h" 13 #include "chrome/browser/fullscreen.h"
14 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/browser_window.h" 15 #include "chrome/browser/ui/browser_window.h"
16 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
16 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" 17 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
17 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" 18 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h"
18 #include "chrome/browser/ui/tabs/tab_strip_model.h" 19 #include "chrome/browser/ui/tabs/tab_strip_model.h"
19 #include "content/public/browser/web_contents.h" 20 #include "content/public/browser/web_contents.h"
20 #include "content/public/common/url_constants.h" 21 #include "content/public/common/url_constants.h"
21 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
22 23
23 namespace { 24 namespace {
24 25
25 bool SupportsMacSystemFullscreen() { 26 bool SupportsMacSystemFullscreen() {
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 735
735 debugging_log_ << " Then,\n"; 736 debugging_log_ << " Then,\n";
736 ASSERT_TRUE(InvokeEvent(event)) << GetAndClearDebugLog(); 737 ASSERT_TRUE(InvokeEvent(event)) << GetAndClearDebugLog();
737 } 738 }
738 739
739 void FullscreenControllerStateTest::VerifyWindowStateExpectations( 740 void FullscreenControllerStateTest::VerifyWindowStateExpectations(
740 FullscreenWithToolbarExpectation fullscreen_with_toolbar, 741 FullscreenWithToolbarExpectation fullscreen_with_toolbar,
741 FullscreenForBrowserExpectation fullscreen_for_browser, 742 FullscreenForBrowserExpectation fullscreen_for_browser,
742 FullscreenForTabExpectation fullscreen_for_tab, 743 FullscreenForTabExpectation fullscreen_for_tab,
743 InMetroSnapExpectation in_metro_snap) { 744 InMetroSnapExpectation in_metro_snap) {
745 ExclusiveAccessContext* context =
746 GetBrowser()->window()->GetExclusiveAccessContext();
744 if (fullscreen_with_toolbar != FULLSCREEN_WITH_CHROME_NO_EXPECTATION && 747 if (fullscreen_with_toolbar != FULLSCREEN_WITH_CHROME_NO_EXPECTATION &&
745 GetBrowser()->window()->SupportsFullscreenWithToolbar()) { 748 context->SupportsFullscreenWithToolbar()) {
746 EXPECT_EQ(GetBrowser()->window()->IsFullscreenWithToolbar(), 749 EXPECT_EQ(context->IsFullscreenWithToolbar(), !!fullscreen_with_toolbar)
747 !!fullscreen_with_toolbar) << GetAndClearDebugLog(); 750 << GetAndClearDebugLog();
748 } 751 }
749 if (fullscreen_for_browser != FULLSCREEN_FOR_BROWSER_NO_EXPECTATION) { 752 if (fullscreen_for_browser != FULLSCREEN_FOR_BROWSER_NO_EXPECTATION) {
750 EXPECT_EQ(GetFullscreenController()->IsFullscreenForBrowser(), 753 EXPECT_EQ(GetFullscreenController()->IsFullscreenForBrowser(),
751 !!fullscreen_for_browser) << GetAndClearDebugLog(); 754 !!fullscreen_for_browser) << GetAndClearDebugLog();
752 } 755 }
753 if (fullscreen_for_tab != FULLSCREEN_FOR_TAB_NO_EXPECTATION) { 756 if (fullscreen_for_tab != FULLSCREEN_FOR_TAB_NO_EXPECTATION) {
754 EXPECT_EQ(GetFullscreenController()->IsWindowFullscreenForTabOrPending(), 757 EXPECT_EQ(GetFullscreenController()->IsWindowFullscreenForTabOrPending(),
755 !!fullscreen_for_tab) << GetAndClearDebugLog(); 758 !!fullscreen_for_tab) << GetAndClearDebugLog();
756 } 759 }
757 760
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 << std::right << std::setw(2) 810 << std::right << std::setw(2)
808 << info.distance 811 << info.distance
809 << " }, // " 812 << " }, // "
810 << GetStateString(state2) << "\n"; 813 << GetStateString(state2) << "\n";
811 } 814 }
812 output << "},\n"; 815 output << "},\n";
813 } 816 }
814 output << "};"; 817 output << "};";
815 return output.str(); 818 return output.str();
816 } 819 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698