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

Side by Side Diff: chrome/browser/tabs/tab_strip_model_unittest.cc

Issue 6575009: Move files out of chrome\browser\renderer_host\test alongside their source. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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) 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 #include "base/stl_util-inl.h" 12 #include "base/stl_util-inl.h"
13 #include "base/string_number_conversions.h" 13 #include "base/string_number_conversions.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "chrome/browser/defaults.h" 16 #include "chrome/browser/defaults.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/profiles/profile_manager.h" 18 #include "chrome/browser/profiles/profile_manager.h"
19 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
20 #include "chrome/browser/tab_contents/navigation_controller.h"
21 #include "chrome/browser/tab_contents/navigation_entry.h"
22 #include "chrome/browser/tab_contents/tab_contents.h"
23 #include "chrome/browser/tabs/tab_strip_model.h" 19 #include "chrome/browser/tabs/tab_strip_model.h"
24 #include "chrome/browser/tabs/tab_strip_model_delegate.h" 20 #include "chrome/browser/tabs/tab_strip_model_delegate.h"
25 #include "chrome/browser/tabs/tab_strip_model_order_controller.h" 21 #include "chrome/browser/tabs/tab_strip_model_order_controller.h"
26 #include "chrome/browser/ui/browser.h" 22 #include "chrome/browser/ui/browser.h"
27 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 23 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
28 #include "chrome/browser/webui/new_tab_ui.h" 24 #include "chrome/browser/webui/new_tab_ui.h"
29 #include "chrome/common/extensions/extension.h" 25 #include "chrome/common/extensions/extension.h"
30 #include "chrome/common/notification_details.h" 26 #include "chrome/common/notification_details.h"
31 #include "chrome/common/notification_observer_mock.h" 27 #include "chrome/common/notification_observer_mock.h"
32 #include "chrome/common/notification_registrar.h" 28 #include "chrome/common/notification_registrar.h"
33 #include "chrome/common/notification_source.h" 29 #include "chrome/common/notification_source.h"
34 #include "chrome/common/property_bag.h" 30 #include "chrome/common/property_bag.h"
35 #include "chrome/common/url_constants.h" 31 #include "chrome/common/url_constants.h"
36 #include "chrome/test/testing_profile.h" 32 #include "chrome/test/testing_profile.h"
33 #include "content/browser/renderer_host/test_render_view_host.h"
34 #include "content/browser/tab_contents/navigation_controller.h"
35 #include "content/browser/tab_contents/navigation_entry.h"
36 #include "content/browser/tab_contents/tab_contents.h"
37 #include "testing/gtest/include/gtest/gtest.h" 37 #include "testing/gtest/include/gtest/gtest.h"
38 #include "ui/base/system_monitor/system_monitor.h" 38 #include "ui/base/system_monitor/system_monitor.h"
39 39
40 using testing::_; 40 using testing::_;
41 41
42 namespace { 42 namespace {
43 43
44 // Class used to delete a TabContents when another TabContents is destroyed. 44 // Class used to delete a TabContents when another TabContents is destroyed.
45 class DeleteTabContentsOnDestroyedObserver : public NotificationObserver { 45 class DeleteTabContentsOnDestroyedObserver : public NotificationObserver {
46 public: 46 public:
(...skipping 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 TabStripModel strip(&delegate, profile()); 1891 TabStripModel strip(&delegate, profile());
1892 TabContentsWrapper* contents1 = CreateTabContents(); 1892 TabContentsWrapper* contents1 = CreateTabContents();
1893 TabContentsWrapper* contents2 = CreateTabContents(); 1893 TabContentsWrapper* contents2 = CreateTabContents();
1894 strip.AppendTabContents(contents1, true); 1894 strip.AppendTabContents(contents1, true);
1895 strip.AppendTabContents(contents2, true); 1895 strip.AppendTabContents(contents2, true);
1896 // DeleteTabContentsOnDestroyedObserver deletes contents1 when contents2 sends 1896 // DeleteTabContentsOnDestroyedObserver deletes contents1 when contents2 sends
1897 // out notification that it is being destroyed. 1897 // out notification that it is being destroyed.
1898 DeleteTabContentsOnDestroyedObserver observer(contents2, contents1); 1898 DeleteTabContentsOnDestroyedObserver observer(contents2, contents1);
1899 strip.CloseAllTabs(); 1899 strip.CloseAllTabs();
1900 } 1900 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_contents_unittest.cc ('k') | chrome/browser/translate/translate_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698