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" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
13 #include "chrome/browser/extensions/extension_service.h" | 13 #include "chrome/browser/extensions/extension_service.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/browser_tabstrip.h" |
16 #include "chrome/browser/ui/panels/native_panel.h" | 17 #include "chrome/browser/ui/panels/native_panel.h" |
17 #include "chrome/browser/ui/panels/panel_manager.h" | 18 #include "chrome/browser/ui/panels/panel_manager.h" |
18 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" | 19 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" |
19 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 20 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
20 #include "chrome/common/chrome_notification_types.h" | 21 #include "chrome/common/chrome_notification_types.h" |
21 #include "chrome/common/chrome_paths.h" | 22 #include "chrome/common/chrome_paths.h" |
22 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
23 #include "chrome/common/extensions/extension_manifest_constants.h" | 24 #include "chrome/common/extensions/extension_manifest_constants.h" |
24 #include "chrome/common/string_ordinal.h" | 25 #include "chrome/common/string_ordinal.h" |
25 #include "chrome/test/base/ui_test_utils.h" | 26 #include "chrome/test/base/ui_test_utils.h" |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 | 390 |
390 // static | 391 // static |
391 NativePanelTesting* BasePanelBrowserTest::CreateNativePanelTesting( | 392 NativePanelTesting* BasePanelBrowserTest::CreateNativePanelTesting( |
392 Panel* panel) { | 393 Panel* panel) { |
393 return panel->native_panel()->CreateNativePanelTesting(); | 394 return panel->native_panel()->CreateNativePanelTesting(); |
394 } | 395 } |
395 | 396 |
396 void BasePanelBrowserTest::CreateTestTabContents(Browser* browser) { | 397 void BasePanelBrowserTest::CreateTestTabContents(Browser* browser) { |
397 TabContents* tab_contents = new TabContents( | 398 TabContents* tab_contents = new TabContents( |
398 WebContentsTester::CreateTestWebContents(browser->profile(), NULL)); | 399 WebContentsTester::CreateTestWebContents(browser->profile(), NULL)); |
399 browser->AddTab(tab_contents, content::PAGE_TRANSITION_LINK); | 400 chrome::AddTab(browser, tab_contents, content::PAGE_TRANSITION_LINK); |
400 } | 401 } |
401 | 402 |
402 scoped_refptr<Extension> BasePanelBrowserTest::CreateExtension( | 403 scoped_refptr<Extension> BasePanelBrowserTest::CreateExtension( |
403 const FilePath::StringType& path, | 404 const FilePath::StringType& path, |
404 Extension::Location location, | 405 Extension::Location location, |
405 const DictionaryValue& extra_value) { | 406 const DictionaryValue& extra_value) { |
406 #if defined(OS_WIN) | 407 #if defined(OS_WIN) |
407 FilePath full_path(FILE_PATH_LITERAL("c:\\")); | 408 FilePath full_path(FILE_PATH_LITERAL("c:\\")); |
408 #else | 409 #else |
409 FilePath full_path(FILE_PATH_LITERAL("/")); | 410 FilePath full_path(FILE_PATH_LITERAL("/")); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 } | 469 } |
469 | 470 |
470 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { | 471 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { |
471 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); | 472 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); |
472 } | 473 } |
473 | 474 |
474 std::string BasePanelBrowserTest::MakePanelName(int index) { | 475 std::string BasePanelBrowserTest::MakePanelName(int index) { |
475 std::string panel_name("Panel"); | 476 std::string panel_name("Panel"); |
476 return panel_name + base::IntToString(index); | 477 return panel_name + base::IntToString(index); |
477 } | 478 } |
OLD | NEW |