| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/mac/scoped_nsautorelease_pool.h" | 8 #include "base/mac/scoped_nsautorelease_pool.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/panels/panel_manager.h" | 13 #include "chrome/browser/ui/panels/panel_manager.h" |
| 14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/test/base/ui_test_utils.h" | 16 #include "chrome/test/base/ui_test_utils.h" |
| 17 #include "content/browser/tab_contents/test_tab_contents.h" | 17 #include "content/browser/tab_contents/test_tab_contents.h" |
| 18 #include "content/common/url_constants.h" | 18 #include "content/common/url_constants.h" |
| 19 | 19 |
| 20 #if defined(OS_MACOSX) | 20 #if defined(OS_MACOSX) |
| 21 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" | 21 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" |
| 22 #endif | 22 #endif |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 const int kTestingWorkAreaWidth = 800; | 26 const int kTestingWorkAreaWidth = 800; |
| 27 const int kTestingWorkAreaHeight = 600; | 27 const int kTestingWorkAreaHeight = 600; |
| 28 const int kDefaultAutoHidingDesktopBarThickness = 40; | 28 const int kDefaultAutoHidingDesktopBarThickness = 40; |
| 29 const int kDefaultPanelWidth = 150; | |
| 30 const int kDefaultPanelHeight = 120; | |
| 31 | 29 |
| 32 struct MockDesktopBar { | 30 struct MockDesktopBar { |
| 33 bool auto_hiding_enabled; | 31 bool auto_hiding_enabled; |
| 34 AutoHidingDesktopBar::Visibility visibility; | 32 AutoHidingDesktopBar::Visibility visibility; |
| 35 int thickness; | 33 int thickness; |
| 36 }; | 34 }; |
| 37 | 35 |
| 38 class MockAutoHidingDesktopBarImpl : | 36 class MockAutoHidingDesktopBarImpl : |
| 39 public BasePanelBrowserTest::MockAutoHidingDesktopBar { | 37 public BasePanelBrowserTest::MockAutoHidingDesktopBar { |
| 40 public: | 38 public: |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 std::string error; | 261 std::string error; |
| 264 scoped_refptr<Extension> extension = Extension::Create( | 262 scoped_refptr<Extension> extension = Extension::Create( |
| 265 full_path, location, *input_value, | 263 full_path, location, *input_value, |
| 266 Extension::STRICT_ERROR_CHECKS, &error); | 264 Extension::STRICT_ERROR_CHECKS, &error); |
| 267 EXPECT_TRUE(extension.get()); | 265 EXPECT_TRUE(extension.get()); |
| 268 EXPECT_STREQ("", error.c_str()); | 266 EXPECT_STREQ("", error.c_str()); |
| 269 browser()->GetProfile()->GetExtensionService()->OnLoadSingleExtension( | 267 browser()->GetProfile()->GetExtensionService()->OnLoadSingleExtension( |
| 270 extension.get(), false); | 268 extension.get(), false); |
| 271 return extension; | 269 return extension; |
| 272 } | 270 } |
| OLD | NEW |