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/panels/base_panel_browser_test.h" | 5 #include "chrome/browser/ui/panels/base_panel_browser_test.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 bool BasePanelBrowserTest::SkipTestIfCompizWM() { | 212 bool BasePanelBrowserTest::SkipTestIfCompizWM() { |
213 #if defined(OS_LINUX) | 213 #if defined(OS_LINUX) |
214 return ui::GuessWindowManager() == ui::WM_COMPIZ; | 214 return ui::GuessWindowManager() == ui::WM_COMPIZ; |
215 #else | 215 #else |
216 return false; | 216 return false; |
217 #endif | 217 #endif |
218 } | 218 } |
219 | 219 |
220 void BasePanelBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 220 void BasePanelBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
221 EnableDOMAutomation(); | |
222 command_line->AppendSwitch(switches::kEnablePanels); | 221 command_line->AppendSwitch(switches::kEnablePanels); |
223 } | 222 } |
224 | 223 |
225 void BasePanelBrowserTest::SetUpOnMainThread() { | 224 void BasePanelBrowserTest::SetUpOnMainThread() { |
226 InProcessBrowserTest::SetUpOnMainThread(); | 225 InProcessBrowserTest::SetUpOnMainThread(); |
227 | 226 |
228 // Setup the work area and desktop bar so that we have consistent testing | 227 // Setup the work area and desktop bar so that we have consistent testing |
229 // environment for all panel related tests. | 228 // environment for all panel related tests. |
230 PanelManager* panel_manager = PanelManager::GetInstance(); | 229 PanelManager* panel_manager = PanelManager::GetInstance(); |
231 if (mock_display_settings_enabled_) { | 230 if (mock_display_settings_enabled_) { |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 } | 467 } |
469 | 468 |
470 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { | 469 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { |
471 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); | 470 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); |
472 } | 471 } |
473 | 472 |
474 std::string BasePanelBrowserTest::MakePanelName(int index) { | 473 std::string BasePanelBrowserTest::MakePanelName(int index) { |
475 std::string panel_name("Panel"); | 474 std::string panel_name("Panel"); |
476 return panel_name + base::IntToString(index); | 475 return panel_name + base::IntToString(index); |
477 } | 476 } |
OLD | NEW |