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

Side by Side Diff: views/view_unittest.cc

Issue 7534002: Shell of implementation for embedded windows. At this point this is (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/all.gyp ('k') | views/widget/widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <map> 5 #include <map>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 2380 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 2391
2392 virtual ~ViewLayerTest() { 2392 virtual ~ViewLayerTest() {
2393 } 2393 }
2394 2394
2395 virtual void SetUp() OVERRIDE { 2395 virtual void SetUp() OVERRIDE {
2396 old_use_acceleration_ = View::get_use_acceleration_when_possible(); 2396 old_use_acceleration_ = View::get_use_acceleration_when_possible();
2397 View::set_use_acceleration_when_possible(true); 2397 View::set_use_acceleration_when_possible(true);
2398 2398
2399 TestTexture::reset_live_count(); 2399 TestTexture::reset_live_count();
2400 2400
2401 Widget::set_compositor_factory(&TestCreateCompositor); 2401 Widget::set_compositor_factory_for_testing(&TestCreateCompositor);
2402 widget_ = new Widget; 2402 widget_ = new Widget;
2403 Widget::InitParams params(Widget::InitParams::TYPE_POPUP); 2403 Widget::InitParams params(Widget::InitParams::TYPE_POPUP);
2404 params.bounds = gfx::Rect(50, 50, 200, 200); 2404 params.bounds = gfx::Rect(50, 50, 200, 200);
2405 widget_->Init(params); 2405 widget_->Init(params);
2406 } 2406 }
2407 2407
2408 virtual void TearDown() OVERRIDE { 2408 virtual void TearDown() OVERRIDE {
2409 View::set_use_acceleration_when_possible(old_use_acceleration_); 2409 View::set_use_acceleration_when_possible(old_use_acceleration_);
2410 widget_->CloseNow(); 2410 widget_->CloseNow();
2411 Widget::set_compositor_factory(NULL); 2411 Widget::set_compositor_factory_for_testing(NULL);
2412 Widget::SetPureViews(false); 2412 Widget::SetPureViews(false);
2413 } 2413 }
2414 2414
2415 Widget* widget() { return widget_; } 2415 Widget* widget() { return widget_; }
2416 2416
2417 private: 2417 private:
2418 Widget* widget_; 2418 Widget* widget_;
2419 bool old_use_acceleration_; 2419 bool old_use_acceleration_;
2420 }; 2420 };
2421 2421
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
2671 EXPECT_EQ(gfx::Rect(11, 22, 100, 200), widget_view_host->layer()->bounds()); 2671 EXPECT_EQ(gfx::Rect(11, 22, 100, 200), widget_view_host->layer()->bounds());
2672 ASSERT_TRUE(child_view->layer() != NULL); 2672 ASSERT_TRUE(child_view->layer() != NULL);
2673 EXPECT_EQ(gfx::Rect(5, 6, 10, 11), child_view->layer()->bounds()); 2673 EXPECT_EQ(gfx::Rect(5, 6, 10, 11), child_view->layer()->bounds());
2674 2674
2675 child_widget->CloseNow(); 2675 child_widget->CloseNow();
2676 } 2676 }
2677 2677
2678 #endif // VIEWS_COMPOSITOR 2678 #endif // VIEWS_COMPOSITOR
2679 2679
2680 } // namespace views 2680 } // namespace views
OLDNEW
« no previous file with comments | « build/all.gyp ('k') | views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698