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

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

Issue 10536094: TabContentsWrapper -> TabContents, part 44. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « no previous file | chrome/browser/ui/panels/old_panel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/base_panel_browser_test.h" 5 #include "chrome/browser/ui/panels/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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type()); 401 EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type());
402 // The panel is first created as docked panel, which ignores the specified 402 // The panel is first created as docked panel, which ignores the specified
403 // origin in |bounds|. We need to reposition the panel after it becomes 403 // origin in |bounds|. We need to reposition the panel after it becomes
404 // detached. 404 // detached.
405 panel->SetPanelBounds(bounds); 405 panel->SetPanelBounds(bounds);
406 WaitForBoundsAnimationFinished(panel); 406 WaitForBoundsAnimationFinished(panel);
407 return panel; 407 return panel;
408 } 408 }
409 409
410 void BasePanelBrowserTest::CreateTestTabContents(Browser* browser) { 410 void BasePanelBrowserTest::CreateTestTabContents(Browser* browser) {
411 TabContentsWrapper* tab_contents = 411 TabContents* tab_contents = new TabContents(
412 new TabContentsWrapper( 412 WebContentsTester::CreateTestWebContents(browser->profile(), NULL));
413 WebContentsTester::CreateTestWebContents(browser->profile(), NULL));
414 browser->AddTab(tab_contents, content::PAGE_TRANSITION_LINK); 413 browser->AddTab(tab_contents, content::PAGE_TRANSITION_LINK);
415 } 414 }
416 415
417 scoped_refptr<Extension> BasePanelBrowserTest::CreateExtension( 416 scoped_refptr<Extension> BasePanelBrowserTest::CreateExtension(
418 const FilePath::StringType& path, 417 const FilePath::StringType& path,
419 Extension::Location location, 418 Extension::Location location,
420 const DictionaryValue& extra_value) { 419 const DictionaryValue& extra_value) {
421 #if defined(OS_WIN) 420 #if defined(OS_WIN)
422 FilePath full_path(FILE_PATH_LITERAL("c:\\")); 421 FilePath full_path(FILE_PATH_LITERAL("c:\\"));
423 #else 422 #else
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 } 482 }
484 483
485 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { 484 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) {
486 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); 485 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position);
487 } 486 }
488 487
489 std::string BasePanelBrowserTest::MakePanelName(int index) { 488 std::string BasePanelBrowserTest::MakePanelName(int index) {
490 std::string panel_name("Panel"); 489 std::string panel_name("Panel");
491 return panel_name + base::IntToString(index); 490 return panel_name + base::IntToString(index);
492 } 491 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/old_panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698