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

Side by Side Diff: chrome/browser/ui/fullscreen/fullscreen_controller_state_interactive_browsertest.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 "build/build_config.h" 5 #include "build/build_config.h"
6 #include "chrome/browser/ui/browser.h" 6 #include "chrome/browser/ui/browser.h"
7 #include "chrome/browser/ui/browser_tabstrip.h" 7 #include "chrome/browser/ui/browser_tabstrip.h"
8 #include "chrome/browser/ui/browser_window.h" 8 #include "chrome/browser/ui/browser_window.h"
9 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" 9 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
10 #include "chrome/browser/ui/fullscreen/fullscreen_controller_state_test.h" 10 #include "chrome/browser/ui/fullscreen/fullscreen_controller_state_test.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // state issues that would bleed over to other states. 47 // state issues that would bleed over to other states.
48 // I.E. for each state test all combinations of events E1, E2, E3. 48 // I.E. for each state test all combinations of events E1, E2, E3.
49 // 49 //
50 // This produces coverage for event sequences that may happen normally but 50 // This produces coverage for event sequences that may happen normally but
51 // would not be exposed by traversing to each state via TransitionToState(). 51 // would not be exposed by traversing to each state via TransitionToState().
52 // TransitionToState() always takes the same path even when multiple paths 52 // TransitionToState() always takes the same path even when multiple paths
53 // exist. 53 // exist.
54 IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, 54 IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest,
55 DISABLED_TransitionsForEachState) { 55 DISABLED_TransitionsForEachState) {
56 // A tab is needed for tab fullscreen. 56 // A tab is needed for tab fullscreen.
57 AddTabAtIndex(0, GURL(url::kAboutBlankURL), content::PAGE_TRANSITION_TYPED); 57 AddTabAtIndex(0, GURL(url::kAboutBlankURL), ui::PAGE_TRANSITION_TYPED);
58 TestTransitionsForEachState(); 58 TestTransitionsForEachState();
59 // Progress of test can be examined via LOG(INFO) << GetAndClearDebugLog(); 59 // Progress of test can be examined via LOG(INFO) << GetAndClearDebugLog();
60 } 60 }
61 61
62 62
63 // Individual tests for each pair of state and event --------------------------- 63 // Individual tests for each pair of state and event ---------------------------
64 64
65 // An "empty" test is included as part of each "TEST_EVENT" because it makes 65 // An "empty" test is included as part of each "TEST_EVENT" because it makes
66 // running the entire test suite less flaky on MacOS. All of the tests pass 66 // running the entire test suite less flaky on MacOS. All of the tests pass
67 // when run individually. 67 // when run individually.
68 #define TEST_EVENT(state, event) \ 68 #define TEST_EVENT(state, event) \
69 IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, \ 69 IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, \
70 DISABLED_##state##__##event##__Empty) {} \ 70 DISABLED_##state##__##event##__Empty) {} \
71 IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, \ 71 IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, \
72 DISABLED_##state##__##event) { \ 72 DISABLED_##state##__##event) { \
73 AddTabAtIndex( \ 73 AddTabAtIndex( \
74 0, GURL(url::kAboutBlankURL), content::PAGE_TRANSITION_TYPED); \ 74 0, GURL(url::kAboutBlankURL), ui::PAGE_TRANSITION_TYPED); \
75 ASSERT_NO_FATAL_FAILURE(TestStateAndEvent(state, event)) \ 75 ASSERT_NO_FATAL_FAILURE(TestStateAndEvent(state, event)) \
76 << GetAndClearDebugLog(); \ 76 << GetAndClearDebugLog(); \
77 } 77 }
78 // Progress of tests can be examined by inserting the following line: 78 // Progress of tests can be examined by inserting the following line:
79 // LOG(INFO) << GetAndClearDebugLog(); } 79 // LOG(INFO) << GetAndClearDebugLog(); }
80 80
81 #include "chrome/browser/ui/fullscreen/fullscreen_controller_state_tests.h" 81 #include "chrome/browser/ui/fullscreen/fullscreen_controller_state_tests.h"
82 82
83 83
84 // Specific one-off tests for known issues ------------------------------------- 84 // Specific one-off tests for known issues -------------------------------------
85 85
86 // Used manually to determine what happens on a platform. 86 // Used manually to determine what happens on a platform.
87 IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, 87 IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest,
88 DISABLED_ManualTest) { 88 DISABLED_ManualTest) {
89 // A tab is needed for tab fullscreen. 89 // A tab is needed for tab fullscreen.
90 AddTabAtIndex(0, GURL(url::kAboutBlankURL), content::PAGE_TRANSITION_TYPED); 90 AddTabAtIndex(0, GURL(url::kAboutBlankURL), ui::PAGE_TRANSITION_TYPED);
91 ASSERT_TRUE(InvokeEvent(TOGGLE_FULLSCREEN)) << GetAndClearDebugLog(); 91 ASSERT_TRUE(InvokeEvent(TOGGLE_FULLSCREEN)) << GetAndClearDebugLog();
92 ASSERT_TRUE(InvokeEvent(WINDOW_CHANGE)) << GetAndClearDebugLog(); 92 ASSERT_TRUE(InvokeEvent(WINDOW_CHANGE)) << GetAndClearDebugLog();
93 ASSERT_TRUE(InvokeEvent(TAB_FULLSCREEN_TRUE)) << GetAndClearDebugLog(); 93 ASSERT_TRUE(InvokeEvent(TAB_FULLSCREEN_TRUE)) << GetAndClearDebugLog();
94 ASSERT_TRUE(InvokeEvent(TOGGLE_FULLSCREEN)) << GetAndClearDebugLog(); 94 ASSERT_TRUE(InvokeEvent(TOGGLE_FULLSCREEN)) << GetAndClearDebugLog();
95 ASSERT_TRUE(InvokeEvent(WINDOW_CHANGE)) << GetAndClearDebugLog(); 95 ASSERT_TRUE(InvokeEvent(WINDOW_CHANGE)) << GetAndClearDebugLog();
96 96
97 // Wait, allowing human operator to observe the result. 97 // Wait, allowing human operator to observe the result.
98 scoped_refptr<content::MessageLoopRunner> message_loop 98 scoped_refptr<content::MessageLoopRunner> message_loop
99 = new content::MessageLoopRunner(); 99 = new content::MessageLoopRunner();
100 message_loop->Run(); 100 message_loop->Run();
101 } 101 }
102 102
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698