OLD | NEW |
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> |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 !!fullscreen_with_toolbar) << GetAndClearDebugLog(); | 746 !!fullscreen_with_toolbar) << GetAndClearDebugLog(); |
747 } | 747 } |
748 if (fullscreen_for_browser != FULLSCREEN_FOR_BROWSER_NO_EXPECTATION) { | 748 if (fullscreen_for_browser != FULLSCREEN_FOR_BROWSER_NO_EXPECTATION) { |
749 EXPECT_EQ(GetFullscreenController()->IsFullscreenForBrowser(), | 749 EXPECT_EQ(GetFullscreenController()->IsFullscreenForBrowser(), |
750 !!fullscreen_for_browser) << GetAndClearDebugLog(); | 750 !!fullscreen_for_browser) << GetAndClearDebugLog(); |
751 } | 751 } |
752 if (fullscreen_for_tab != FULLSCREEN_FOR_TAB_NO_EXPECTATION) { | 752 if (fullscreen_for_tab != FULLSCREEN_FOR_TAB_NO_EXPECTATION) { |
753 EXPECT_EQ(GetFullscreenController()->IsWindowFullscreenForTabOrPending(), | 753 EXPECT_EQ(GetFullscreenController()->IsWindowFullscreenForTabOrPending(), |
754 !!fullscreen_for_tab) << GetAndClearDebugLog(); | 754 !!fullscreen_for_tab) << GetAndClearDebugLog(); |
755 } | 755 } |
| 756 |
| 757 #if defined(OS_WIN) |
756 if (in_metro_snap != IN_METRO_SNAP_NO_EXPECTATION) { | 758 if (in_metro_snap != IN_METRO_SNAP_NO_EXPECTATION) { |
757 EXPECT_EQ(GetFullscreenController()->IsInMetroSnapMode(), | 759 EXPECT_EQ(GetFullscreenController()->IsInMetroSnapMode(), |
758 !!in_metro_snap) << GetAndClearDebugLog(); | 760 !!in_metro_snap) << GetAndClearDebugLog(); |
759 } | 761 } |
| 762 #endif // OS_WIN |
760 } | 763 } |
761 | 764 |
762 FullscreenController* FullscreenControllerStateTest::GetFullscreenController() { | 765 FullscreenController* FullscreenControllerStateTest::GetFullscreenController() { |
763 return GetBrowser()->exclusive_access_manager()->fullscreen_controller(); | 766 return GetBrowser()->exclusive_access_manager()->fullscreen_controller(); |
764 } | 767 } |
765 | 768 |
766 std::string FullscreenControllerStateTest::GetTransitionTableAsString() const { | 769 std::string FullscreenControllerStateTest::GetTransitionTableAsString() const { |
767 std::ostringstream output; | 770 std::ostringstream output; |
768 output << "transition_table_[NUM_STATES = " << NUM_STATES | 771 output << "transition_table_[NUM_STATES = " << NUM_STATES |
769 << "][NUM_EVENTS = " << NUM_EVENTS | 772 << "][NUM_EVENTS = " << NUM_EVENTS |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 << std::right << std::setw(2) | 806 << std::right << std::setw(2) |
804 << info.distance | 807 << info.distance |
805 << " }, // " | 808 << " }, // " |
806 << GetStateString(state2) << "\n"; | 809 << GetStateString(state2) << "\n"; |
807 } | 810 } |
808 output << "},\n"; | 811 output << "},\n"; |
809 } | 812 } |
810 output << "};"; | 813 output << "};"; |
811 return output.str(); | 814 return output.str(); |
812 } | 815 } |
OLD | NEW |