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

Side by Side Diff: ui/views/test/views_test_base.h

Issue 8869005: Revert EnableClose() removal and related crash fixes. I don't understand the crashes here, and th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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) 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 #ifndef UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ 5 #ifndef UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ 6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 17 matching lines...) Expand all
28 28
29 void RunPendingMessages(); 29 void RunPendingMessages();
30 30
31 protected: 31 protected:
32 TestViewsDelegate& views_delegate() const { return *views_delegate_.get(); } 32 TestViewsDelegate& views_delegate() const { return *views_delegate_.get(); }
33 33
34 void set_views_delegate(TestViewsDelegate* views_delegate) { 34 void set_views_delegate(TestViewsDelegate* views_delegate) {
35 views_delegate_.reset(views_delegate); 35 views_delegate_.reset(views_delegate);
36 } 36 }
37 37
38 MessageLoop* message_loop() { return &message_loop_; }
39
40 private: 38 private:
41 MessageLoopForUI message_loop_; 39 MessageLoopForUI message_loop_;
42 scoped_ptr<TestViewsDelegate> views_delegate_; 40 scoped_ptr<TestViewsDelegate> views_delegate_;
43 bool setup_called_; 41 bool setup_called_;
44 bool teardown_called_; 42 bool teardown_called_;
45 43
46 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase); 44 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase);
47 }; 45 };
48 46
49 } // namespace views 47 } // namespace views
50 48
51 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ 49 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698