| 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/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 FILE_PATH_LITERAL("panels"); | 238 FILE_PATH_LITERAL("panels"); |
| 239 | 239 |
| 240 BasePanelBrowserTest::BasePanelBrowserTest() | 240 BasePanelBrowserTest::BasePanelBrowserTest() |
| 241 : InProcessBrowserTest(), | 241 : InProcessBrowserTest(), |
| 242 mock_display_settings_enabled_(true) { | 242 mock_display_settings_enabled_(true) { |
| 243 } | 243 } |
| 244 | 244 |
| 245 BasePanelBrowserTest::~BasePanelBrowserTest() { | 245 BasePanelBrowserTest::~BasePanelBrowserTest() { |
| 246 } | 246 } |
| 247 | 247 |
| 248 bool BasePanelBrowserTest::SkipTestIfIceWM() { | |
| 249 #if defined(OS_LINUX) && defined(USE_X11) | |
| 250 return ui::GuessWindowManager() == ui::WM_ICE_WM; | |
| 251 #else | |
| 252 return false; | |
| 253 #endif | |
| 254 } | |
| 255 | |
| 256 bool BasePanelBrowserTest::SkipTestIfCompizWM() { | |
| 257 #if defined(OS_LINUX) && defined(USE_X11) | |
| 258 return ui::GuessWindowManager() == ui::WM_COMPIZ; | |
| 259 #else | |
| 260 return false; | |
| 261 #endif | |
| 262 } | |
| 263 | |
| 264 void BasePanelBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 248 void BasePanelBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
| 265 command_line->AppendSwitch(switches::kEnablePanels); | 249 command_line->AppendSwitch(switches::kEnablePanels); |
| 266 } | 250 } |
| 267 | 251 |
| 268 void BasePanelBrowserTest::SetUpOnMainThread() { | 252 void BasePanelBrowserTest::SetUpOnMainThread() { |
| 269 InProcessBrowserTest::SetUpOnMainThread(); | 253 InProcessBrowserTest::SetUpOnMainThread(); |
| 270 | 254 |
| 271 // Setup the work area and desktop bar so that we have consistent testing | 255 // Setup the work area and desktop bar so that we have consistent testing |
| 272 // environment for all panel related tests. | 256 // environment for all panel related tests. |
| 273 if (mock_display_settings_enabled_) { | 257 if (mock_display_settings_enabled_) { |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 } | 597 } |
| 614 | 598 |
| 615 std::string BasePanelBrowserTest::MakePanelName(int index) { | 599 std::string BasePanelBrowserTest::MakePanelName(int index) { |
| 616 std::string panel_name("Panel"); | 600 std::string panel_name("Panel"); |
| 617 return panel_name + base::IntToString(index); | 601 return panel_name + base::IntToString(index); |
| 618 } | 602 } |
| 619 | 603 |
| 620 bool BasePanelBrowserTest::WmSupportWindowActivation() { | 604 bool BasePanelBrowserTest::WmSupportWindowActivation() { |
| 621 return true; | 605 return true; |
| 622 } | 606 } |
| OLD | NEW |