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

Unified Diff: ui/views/widget/native_widget_aura_unittest.cc

Issue 9535025: Remove the singleton instance get/delete methods from RootWindow (yay) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/test/views_test_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_aura_unittest.cc
===================================================================
--- ui/views/widget/native_widget_aura_unittest.cc (revision 124527)
+++ ui/views/widget/native_widget_aura_unittest.cc (working copy)
@@ -28,29 +28,29 @@
class NativeWidgetAuraTest : public testing::Test {
public:
- NativeWidgetAuraTest() : root_window_(NULL) {}
+ NativeWidgetAuraTest() {}
virtual ~NativeWidgetAuraTest() {}
// testing::Test overrides:
virtual void SetUp() OVERRIDE {
- root_window_ = aura::RootWindow::GetInstance();
+ root_window_.reset(new aura::RootWindow);
root_window_->SetBounds(gfx::Rect(0, 0, 640, 480));
root_window_->SetHostSize(gfx::Size(640, 480));
test_stacking_client_.reset(
- new aura::test::TestStackingClient(root_window_));
+ new aura::test::TestStackingClient(root_window_.get()));
}
virtual void TearDown() OVERRIDE {
- test_stacking_client_.reset();
- aura::RootWindow::DeleteInstance();
message_loop_.RunAllPending();
+ test_stacking_client_.reset();
+ root_window_.reset();
}
protected:
- aura::RootWindow* root_window() { return root_window_; }
+ aura::RootWindow* root_window() { return root_window_.get(); }
private:
MessageLoopForUI message_loop_;
- aura::RootWindow* root_window_;
+ scoped_ptr<aura::RootWindow> root_window_;
scoped_ptr<aura::test::TestStackingClient> test_stacking_client_;
DISALLOW_COPY_AND_ASSIGN(NativeWidgetAuraTest);
@@ -154,7 +154,6 @@
params.show_state = ui::SHOW_STATE_MAXIMIZED;
params.bounds = gfx::Rect(10, 10, 100, 200);
widget->Init(params);
- aura::RootWindow::DeleteInstance();
EXPECT_FALSE(widget->did_size_change_more_than_once());
widget->CloseNow();
}
« no previous file with comments | « ui/views/test/views_test_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698