diff options
Diffstat (limited to 'views/view_unittest.cc')
-rw-r--r-- | views/view_unittest.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/views/view_unittest.cc b/views/view_unittest.cc index 613c522..bad592b 100644 --- a/views/view_unittest.cc +++ b/views/view_unittest.cc @@ -1186,6 +1186,34 @@ TEST_F(DefaultButtonTest, DialogDefaultButtonTest) { } #endif +//////////////////////////////////////////////////////////////////////////////// +// View hierachy / Visibility changes +//////////////////////////////////////////////////////////////////////////////// +/* +TEST_F(ViewTest, ChangeVisibility) { +#if defined(OS_LINUX) + // Make CRITICAL messages fatal + // TODO(oshima): we probably should enable this for entire tests on linux. + g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); +#endif + scoped_ptr<views::Widget> window(CreateWidget()); + window->Init(NULL, gfx::Rect(0, 0, 500, 300)); + views::RootView* root_view = window->GetRootView(); + NativeButton* native = new NativeButton(NULL, L"Native"); + + root_view->SetContentsView(native); + native->SetVisible(true); + + root_view->RemoveChildView(native); + native->SetVisible(false); + // Change visibility to true with no widget. + native->SetVisible(true); + + root_view->SetContentsView(native); + native->SetVisible(true); +} +*/ + #if defined(OS_LINUX) class TestViewWithControls : public View { public: |