| 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_test.h" | 5 #include "chrome/browser/ui/exclusive_access/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_commands.h" | 9 #include "chrome/browser/ui/browser_commands.h" |
| 10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
| 11 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" | 11 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
| 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
| 14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 15 #include "content/public/test/test_navigation_observer.h" | 15 #include "content/public/test/test_navigation_observer.h" |
| 16 | 16 |
| 17 using content::WebContents; | 17 using content::WebContents; |
| 18 | 18 |
| 19 const char FullscreenControllerTest::kFullscreenMouseLockHTML[] = | 19 const char FullscreenControllerTest::kFullscreenMouseLockHTML[] = |
| 20 "files/fullscreen_mouselock/fullscreen_mouselock.html"; | 20 "/fullscreen_mouselock/fullscreen_mouselock.html"; |
| 21 | 21 |
| 22 void FullscreenControllerTest::RequestToLockMouse( | 22 void FullscreenControllerTest::RequestToLockMouse( |
| 23 bool user_gesture, | 23 bool user_gesture, |
| 24 bool last_unlocked_by_target) { | 24 bool last_unlocked_by_target) { |
| 25 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); | 25 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); |
| 26 browser()->RequestToLockMouse(tab, user_gesture, | 26 browser()->RequestToLockMouse(tab, user_gesture, |
| 27 last_unlocked_by_target); | 27 last_unlocked_by_target); |
| 28 } | 28 } |
| 29 | 29 |
| 30 FullscreenController* FullscreenControllerTest::GetFullscreenController() { | 30 FullscreenController* FullscreenControllerTest::GetFullscreenController() { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 void FullscreenControllerTest::Reload() { | 97 void FullscreenControllerTest::Reload() { |
| 98 content::TestNavigationObserver observer( | 98 content::TestNavigationObserver observer( |
| 99 browser()->tab_strip_model()->GetActiveWebContents(), 1); | 99 browser()->tab_strip_model()->GetActiveWebContents(), 1); |
| 100 chrome::Reload(browser(), CURRENT_TAB); | 100 chrome::Reload(browser(), CURRENT_TAB); |
| 101 observer.Wait(); | 101 observer.Wait(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void FullscreenControllerTest::SetPrivilegedFullscreen(bool is_privileged) { | 104 void FullscreenControllerTest::SetPrivilegedFullscreen(bool is_privileged) { |
| 105 GetFullscreenController()->SetPrivilegedFullscreenForTesting(is_privileged); | 105 GetFullscreenController()->SetPrivilegedFullscreenForTesting(is_privileged); |
| 106 } | 106 } |
| OLD | NEW |