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

Side by Side Diff: chrome/browser/ui/fullscreen_controller_test.cc

Issue 10378061: Exit tabbed fullscreen mode on navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: respond to comments, remove flaky reload test Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/fullscreen_controller_test.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/fullscreen_controller_test.h" 5 #include "chrome/browser/ui/fullscreen_controller_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "chrome/browser/ui/fullscreen_controller.h" 10 #include "chrome/browser/ui/fullscreen_controller.h"
11 #include "chrome/common/chrome_switches.h" 11 #include "chrome/common/chrome_switches.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 #include "content/public/test/test_navigation_observer.h"
13 14
14 using content::WebContents; 15 using content::WebContents;
15 16
16 const char FullscreenControllerTest::kFullscreenMouseLockHTML[] = 17 const char FullscreenControllerTest::kFullscreenMouseLockHTML[] =
17 "files/fullscreen_mouselock/fullscreen_mouselock.html"; 18 "files/fullscreen_mouselock/fullscreen_mouselock.html";
18 19
19 void FullscreenControllerTest::SetUpCommandLine(CommandLine* command_line) { 20 void FullscreenControllerTest::SetUpCommandLine(CommandLine* command_line) {
20 InProcessBrowserTest::SetUpCommandLine(command_line); 21 InProcessBrowserTest::SetUpCommandLine(command_line);
21 command_line->AppendSwitch(switches::kEnablePointerLock); 22 command_line->AppendSwitch(switches::kEnablePointerLock);
22 } 23 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 FullscreenExitBubbleType type = 108 FullscreenExitBubbleType type =
108 browser()->fullscreen_controller_->GetFullscreenExitBubbleType(); 109 browser()->fullscreen_controller_->GetFullscreenExitBubbleType();
109 browser()->OnAcceptFullscreenPermission(fullscreen_tab->GetURL(), type); 110 browser()->OnAcceptFullscreenPermission(fullscreen_tab->GetURL(), type);
110 } 111 }
111 112
112 void FullscreenControllerTest::DenyCurrentFullscreenOrMouseLockRequest() { 113 void FullscreenControllerTest::DenyCurrentFullscreenOrMouseLockRequest() {
113 FullscreenExitBubbleType type = 114 FullscreenExitBubbleType type =
114 browser()->fullscreen_controller_->GetFullscreenExitBubbleType(); 115 browser()->fullscreen_controller_->GetFullscreenExitBubbleType();
115 browser()->OnDenyFullscreenPermission(type); 116 browser()->OnDenyFullscreenPermission(type);
116 } 117 }
118
119 void FullscreenControllerTest::AddTabAtIndexAndWait(int index, const GURL& url,
120 content::PageTransition transition) {
121 content::TestNavigationObserver observer(
122 content::NotificationService::AllSources(), NULL, 1);
123
124 AddTabAtIndex(index, url, transition);
125
126 observer.Wait();
127 }
128
129 void FullscreenControllerTest::GoBack() {
130 content::TestNavigationObserver observer(
131 content::NotificationService::AllSources(), NULL, 1);
132
133 browser()->GoBack(CURRENT_TAB);
134
135 observer.Wait();
136 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/fullscreen_controller_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698