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

Side by Side Diff: ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc

Issue 11416251: Desktop aura: Continue threading context through views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix erroneously removed line from NWWin tests. Created 8 years 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/views/controls/tabbed_pane/tabbed_pane.h" 9 #include "ui/views/controls/tabbed_pane/tabbed_pane.h"
10 #include "ui/views/test/views_test_base.h" 10 #include "ui/views/test/views_test_base.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual void SetUp() OVERRIDE; 48 virtual void SetUp() OVERRIDE;
49 49
50 scoped_ptr<Widget> widget_; 50 scoped_ptr<Widget> widget_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(TabbedPaneTest); 52 DISALLOW_COPY_AND_ASSIGN(TabbedPaneTest);
53 }; 53 };
54 54
55 void TabbedPaneTest::SetUp() { 55 void TabbedPaneTest::SetUp() {
56 ViewsTestBase::SetUp(); 56 ViewsTestBase::SetUp();
57 widget_.reset(new Widget()); 57 widget_.reset(new Widget());
58 Widget::InitParams params(Widget::InitParams::TYPE_POPUP); 58 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP);
59 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
60 params.bounds = gfx::Rect(0, 0, 100, 100); 59 params.bounds = gfx::Rect(0, 0, 100, 100);
61 widget_->Init(params); 60 widget_->Init(params);
62 tabbed_pane_ = new TabbedPane(); 61 tabbed_pane_ = new TabbedPane();
63 // In order to properly initialize the |TabbedPane| it must be added to a 62 // In order to properly initialize the |TabbedPane| it must be added to a
64 // parent view (see the ViewHierarchyChanged method of the |TabbedPane|). 63 // parent view (see the ViewHierarchyChanged method of the |TabbedPane|).
65 widget_->GetRootView()->AddChildView(tabbed_pane_); 64 widget_->GetRootView()->AddChildView(tabbed_pane_);
66 65
67 #if defined(OS_WIN) && !defined(USE_AURA) 66 #if defined(OS_WIN) && !defined(USE_AURA)
68 tabbed_pane_win_ = new TabbedPane(); 67 tabbed_pane_win_ = new TabbedPane();
69 tabbed_pane_win_->set_use_native_win_control(true); 68 tabbed_pane_win_->set_use_native_win_control(true);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // TODO(markusheintz): Once replacing NativeTabbedPaneWin with 173 // TODO(markusheintz): Once replacing NativeTabbedPaneWin with
175 // NativeTabbedPaneView is completed (http://crbug.com/138059), then the 174 // NativeTabbedPaneView is completed (http://crbug.com/138059), then the
176 // TestAddRemove method should be inlined here again and the "ifdef" part 175 // TestAddRemove method should be inlined here again and the "ifdef" part
177 // should be deleted. 176 // should be deleted.
178 #if defined(OS_WIN) && !defined(USE_AURA) 177 #if defined(OS_WIN) && !defined(USE_AURA)
179 TestAddRemove(tabbed_pane_win_); 178 TestAddRemove(tabbed_pane_win_);
180 #endif 179 #endif
181 } 180 }
182 181
183 } // namespace views 182 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/scrollbar/scrollbar_unittest.cc ('k') | ui/views/controls/textfield/native_textfield_views_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698