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

Side by Side Diff: ui/views/view_unittest.cc

Issue 11829040: Fix the content_browsertests everywhere maybe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 7 years, 11 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 | « ui/views/test/views_test_base.h ('k') | ui/views/views.gyp » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/rand_util.h" 8 #include "base/rand_util.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 static const size_t kTotalViews = 2; 1913 static const size_t kTotalViews = 2;
1914 std::vector<NotificationInfo> notifications_; 1914 std::vector<NotificationInfo> notifications_;
1915 }; 1915 };
1916 1916
1917 class TestChangeNativeViewHierarchy { 1917 class TestChangeNativeViewHierarchy {
1918 public: 1918 public:
1919 explicit TestChangeNativeViewHierarchy(ViewTest *view_test) { 1919 explicit TestChangeNativeViewHierarchy(ViewTest *view_test) {
1920 view_test_ = view_test; 1920 view_test_ = view_test;
1921 native_host_ = new NativeViewHost(); 1921 native_host_ = new NativeViewHost();
1922 host_ = new Widget; 1922 host_ = new Widget;
1923 Widget::InitParams params(Widget::InitParams::TYPE_POPUP); 1923 Widget::InitParams params =
1924 view_test->CreateParams(Widget::InitParams::TYPE_POPUP);
1924 params.bounds = gfx::Rect(0, 0, 500, 300); 1925 params.bounds = gfx::Rect(0, 0, 500, 300);
1925 host_->Init(params); 1926 host_->Init(params);
1926 host_->GetRootView()->AddChildView(native_host_); 1927 host_->GetRootView()->AddChildView(native_host_);
1927 for (size_t i = 0; i < TestNativeViewHierarchy::kTotalViews; ++i) { 1928 for (size_t i = 0; i < TestNativeViewHierarchy::kTotalViews; ++i) {
1928 windows_[i] = new Widget; 1929 windows_[i] = new Widget;
1929 Widget::InitParams params(Widget::InitParams::TYPE_CONTROL); 1930 Widget::InitParams params(Widget::InitParams::TYPE_CONTROL);
1930 params.parent = host_->GetNativeView(); 1931 params.parent = host_->GetNativeView();
1931 params.bounds = gfx::Rect(0, 0, 500, 300); 1932 params.bounds = gfx::Rect(0, 0, 500, 300);
1932 windows_[i]->Init(params); 1933 windows_[i]->Init(params);
1933 root_views_[i] = windows_[i]->GetRootView(); 1934 root_views_[i] = windows_[i]->GetRootView();
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
3402 // Set to non default value. 3403 // Set to non default value.
3403 v->layer()->set_scale_content(false); 3404 v->layer()->set_scale_content(false);
3404 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer()); 3405 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer());
3405 ui::Layer* new_layer = v->layer(); 3406 ui::Layer* new_layer = v->layer();
3406 EXPECT_FALSE(new_layer->scale_content()); 3407 EXPECT_FALSE(new_layer->scale_content());
3407 } 3408 }
3408 3409
3409 #endif // USE_AURA 3410 #endif // USE_AURA
3410 3411
3411 } // namespace views 3412 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/views_test_base.h ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698