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

Unified Diff: views/view_unittest.cc

Issue 8598024: Now that we are doing a hard-cut-over to Aura, remove a bunch of *Views based classes that are ob... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « views/view.cc ('k') | views/view_wayland.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view_unittest.cc
===================================================================
--- views/view_unittest.cc (revision 110826)
+++ views/view_unittest.cc (working copy)
@@ -2949,54 +2949,6 @@
EXPECT_TRUE(v2->layer()->IsDrawn());
}
-// TODO(sky): reenable once focus issues are straightened out so that this
-// doesn't crash.
-TEST_F(ViewLayerTest, DISABLED_NativeWidgetView) {
- View* content_view = new View;
- widget()->SetContentsView(content_view);
- View* view = new View;
- content_view->AddChildView(view);
- view->SetBounds(10, 20, 300, 400);
-
- views_delegate().set_default_parent_view(view);
- Widget::SetPureViews(true);
- scoped_ptr<Widget> child_widget(new Widget);
- Widget::InitParams params(Widget::InitParams::TYPE_WINDOW);
- params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.bounds = gfx::Rect(1, 2, 100, 200);
- child_widget->Init(params);
-
- // NativeWidgetView should have been added to view.
- ASSERT_EQ(1, view->child_count());
- View* widget_view_host = view->child_at(0);
- ASSERT_TRUE(widget_view_host->layer() != NULL);
- EXPECT_EQ(gfx::Rect(11, 22, 100, 200), widget_view_host->layer()->bounds());
-
- View* widget_content_view = new View;
- child_widget->SetContentsView(widget_content_view);
- View* child_view = new View;
- child_view->SetPaintToLayer(true);
- child_view->SetBounds(5, 6, 10, 11);
- widget_content_view->AddChildView(child_view);
-
- ASSERT_TRUE(child_view->layer() != NULL);
- EXPECT_EQ(gfx::Rect(5, 6, 10, 11), child_view->layer()->bounds());
-
- widget_view_host->SetPaintToLayer(false);
- EXPECT_TRUE(widget_view_host->layer() == NULL);
-
- ASSERT_TRUE(child_view->layer() != NULL);
- EXPECT_EQ(gfx::Rect(16, 28, 10, 11), child_view->layer()->bounds());
-
- widget_view_host->SetPaintToLayer(true);
- ASSERT_TRUE(widget_view_host->layer() != NULL);
- EXPECT_EQ(gfx::Rect(11, 22, 100, 200), widget_view_host->layer()->bounds());
- ASSERT_TRUE(child_view->layer() != NULL);
- EXPECT_EQ(gfx::Rect(5, 6, 10, 11), child_view->layer()->bounds());
-
- child_widget->CloseNow();
-}
-
class PaintTrackingView : public View {
public:
PaintTrackingView() : painted_(false) {
« no previous file with comments | « views/view.cc ('k') | views/view_wayland.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698