Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(726)

Side by Side Diff: chrome/browser/ui/panels/old_base_panel_browser_test.cc

Issue 10551002: TabContentsWrapper -> TabContents, part 56. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Not killing GetSelectedWebContents yet Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/old_base_panel_browser_test.h" 5 #include "chrome/browser/ui/panels/old_base_panel_browser_test.h"
6 6
7 #include "chrome/browser/ui/browser_list.h" 7 #include "chrome/browser/ui/browser_list.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "chrome/browser/extensions/extension_service.h" 15 #include "chrome/browser/extensions/extension_service.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/panels/native_panel.h" 18 #include "chrome/browser/ui/panels/native_panel.h"
19 #include "chrome/browser/ui/panels/panel_browser_window.h" 19 #include "chrome/browser/ui/panels/panel_browser_window.h"
20 #include "chrome/browser/ui/panels/panel_manager.h" 20 #include "chrome/browser/ui/panels/panel_manager.h"
21 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" 21 #include "chrome/browser/ui/panels/panel_mouse_watcher.h"
22 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 22 #include "chrome/browser/ui/tab_contents/tab_contents.h"
23 #include "chrome/common/chrome_notification_types.h" 23 #include "chrome/common/chrome_notification_types.h"
24 #include "chrome/common/chrome_paths.h" 24 #include "chrome/common/chrome_paths.h"
25 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
26 #include "chrome/common/extensions/extension_manifest_constants.h" 26 #include "chrome/common/extensions/extension_manifest_constants.h"
27 #include "chrome/common/string_ordinal.h" 27 #include "chrome/common/string_ordinal.h"
28 #include "chrome/test/base/ui_test_utils.h" 28 #include "chrome/test/base/ui_test_utils.h"
29 #include "content/public/browser/notification_service.h" 29 #include "content/public/browser/notification_service.h"
30 #include "content/public/common/url_constants.h" 30 #include "content/public/common/url_constants.h"
31 #include "content/public/test/web_contents_tester.h" 31 #include "content/public/test/web_contents_tester.h"
32 32
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type()); 391 EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type());
392 // The panel is first created as docked panel, which ignores the specified 392 // The panel is first created as docked panel, which ignores the specified
393 // origin in |bounds|. We need to reposition the panel after it becomes 393 // origin in |bounds|. We need to reposition the panel after it becomes
394 // detached. 394 // detached.
395 panel->SetPanelBounds(bounds); 395 panel->SetPanelBounds(bounds);
396 WaitForBoundsAnimationFinished(panel); 396 WaitForBoundsAnimationFinished(panel);
397 return panel; 397 return panel;
398 } 398 }
399 399
400 void OldBasePanelBrowserTest::CreateTestTabContents(Browser* browser) { 400 void OldBasePanelBrowserTest::CreateTestTabContents(Browser* browser) {
401 TabContentsWrapper* tab_contents = 401 TabContents* tab_contents = new TabContents(
402 new TabContentsWrapper( 402 WebContentsTester::CreateTestWebContents(browser->profile(), NULL));
403 WebContentsTester::CreateTestWebContents(browser->profile(), NULL));
404 browser->AddTab(tab_contents, content::PAGE_TRANSITION_LINK); 403 browser->AddTab(tab_contents, content::PAGE_TRANSITION_LINK);
405 } 404 }
406 405
407 scoped_refptr<Extension> OldBasePanelBrowserTest::CreateExtension( 406 scoped_refptr<Extension> OldBasePanelBrowserTest::CreateExtension(
408 const FilePath::StringType& path, 407 const FilePath::StringType& path,
409 Extension::Location location, 408 Extension::Location location,
410 const DictionaryValue& extra_value) { 409 const DictionaryValue& extra_value) {
411 #if defined(OS_WIN) 410 #if defined(OS_WIN)
412 FilePath full_path(FILE_PATH_LITERAL("c:\\")); 411 FilePath full_path(FILE_PATH_LITERAL("c:\\"));
413 #else 412 #else
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 } 473 }
475 474
476 void OldBasePanelBrowserTest::MoveMouse(const gfx::Point& position) { 475 void OldBasePanelBrowserTest::MoveMouse(const gfx::Point& position) {
477 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); 476 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position);
478 } 477 }
479 478
480 std::string OldBasePanelBrowserTest::MakePanelName(int index) { 479 std::string OldBasePanelBrowserTest::MakePanelName(int index) {
481 std::string panel_name("Panel"); 480 std::string panel_name("Panel");
482 return panel_name + base::IntToString(index); 481 return panel_name + base::IntToString(index);
483 } 482 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view_browsertest.cc ('k') | chrome/browser/ui/panels/old_panel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698