diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-04 05:37:01 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-04 05:37:01 +0000 |
commit | 0fbb214b6345b8490e559c1a4f8f66d704df72d2 (patch) | |
tree | 8f02c9e27ad87a1610e9adcf306507b233292eca /chrome/views/view_unittest.cc | |
parent | 4c4d8d2b8aa8ae394d0f933700ddd9e682b141af (diff) | |
download | chromium_src-0fbb214b6345b8490e559c1a4f8f66d704df72d2.zip chromium_src-0fbb214b6345b8490e559c1a4f8f66d704df72d2.tar.gz chromium_src-0fbb214b6345b8490e559c1a4f8f66d704df72d2.tar.bz2 |
Take 2 at moving SupportsWindowFeature from BrowserView
to Browser.
Turns out the test regression was actually caused by r10806 which
removed an anonymous namespace causing the TestView class to collide
with the same class in render_widget_host_unittest.cc.
For now, fix by adding the TestView in the view unittest to the
anon namespace. shess is going to try to re-add the namespace to
render_widget_host_unittest.cc too.
TBR=pkasting
Review URL: http://codereview.chromium.org/40058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10873 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/view_unittest.cc')
-rw-r--r-- | chrome/views/view_unittest.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/chrome/views/view_unittest.cc b/chrome/views/view_unittest.cc index 94fa9e5..e26ff2f 100644 --- a/chrome/views/view_unittest.cc +++ b/chrome/views/view_unittest.cc @@ -14,6 +14,8 @@ #include "chrome/views/window.h" #include "testing/gtest/include/gtest/gtest.h" +using namespace views; + namespace { class ViewTest : public testing::Test { @@ -91,9 +93,6 @@ class EmptyWindow : public CWindowImpl<EmptyWindow, DISALLOW_EVIL_CONSTRUCTORS(EmptyWindow); }; */ -} - -using namespace views; //////////////////////////////////////////////////////////////////////////////// // @@ -102,7 +101,7 @@ using namespace views; //////////////////////////////////////////////////////////////////////////////// class TestView : public View { public: - TestView() { + TestView() : View(){ } virtual ~TestView() {} @@ -156,7 +155,7 @@ void TestView::DidChangeBounds(const gfx::Rect& previous, new_bounds_ = current; } -TEST_F(ViewTest, DISABLED_DidChangeBounds) { +TEST_F(ViewTest, DidChangeBounds) { TestView* v = new TestView(); gfx::Rect prev_rect(0, 0, 200, 200); @@ -189,7 +188,9 @@ void TestView::ViewHierarchyChanged(bool is_add, View *parent, View *child) { child_ = child; } -TEST_F(ViewTest, DISABLED_AddRemoveNotifications) { +} + +TEST_F(ViewTest, AddRemoveNotifications) { TestView* v1 = new TestView(); v1->SetBounds(0, 0, 300, 300); @@ -279,7 +280,7 @@ void TestView::OnMouseReleased(const MouseEvent& event, bool canceled) { location_.y = event.y(); } -TEST_F(ViewTest, DISABLED_MouseEvent) { +TEST_F(ViewTest, MouseEvent) { TestView* v1 = new TestView(); v1->SetBounds(0, 0, 300, 300); @@ -441,7 +442,7 @@ public: }; -TEST_F(ViewTest, DISABLED_RemoveNotification) { +TEST_F(ViewTest, RemoveNotification) { scoped_ptr<RemoveViewObserver> observer(new RemoveViewObserver); NotificationService::current()->AddObserver( @@ -552,7 +553,7 @@ gfx::Point ConvertPointToView(views::View* view, const gfx::Point& p) { } } -TEST_F(ViewTest, DISABLED_HitTestMasks) { +TEST_F(ViewTest, HitTestMasks) { views::WidgetWin window; views::RootView* root_view = window.GetRootView(); root_view->SetBounds(0, 0, 500, 500); @@ -616,7 +617,7 @@ class TestDialogView : public views::View, views::NativeButton* checkbox_; }; -TEST_F(ViewTest, DISABLED_DialogDefaultButtonTest) { +TEST_F(ViewTest, DialogDefaultButtonTest) { TestDialogView* dialog_view_ = new TestDialogView(); views::Window* window = views::Window::CreateChromeWindow(NULL, gfx::Rect(0, 0, 100, 100), |