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

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

Issue 11795004: Continue threading context through unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/child_modal_window.cc ('k') | ui/views/widget/widget_unittest.cc » ('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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 tmp_rect.setEmpty(); 833 tmp_rect.setEmpty();
834 CheckRect(v4->last_clip_, tmp_rect); 834 CheckRect(v4->last_clip_, tmp_rect);
835 835
836 window.DestroyWindow(); 836 window.DestroyWindow();
837 } 837 }
838 */ 838 */
839 839
840 TEST_F(ViewTest, RemoveNotification) { 840 TEST_F(ViewTest, RemoveNotification) {
841 ViewStorage* vs = ViewStorage::GetInstance(); 841 ViewStorage* vs = ViewStorage::GetInstance();
842 Widget* widget = new Widget; 842 Widget* widget = new Widget;
843 widget->Init(Widget::InitParams(Widget::InitParams::TYPE_POPUP)); 843 widget->Init(CreateParams(Widget::InitParams::TYPE_POPUP));
844 View* root_view = widget->GetRootView(); 844 View* root_view = widget->GetRootView();
845 845
846 View* v1 = new View; 846 View* v1 = new View;
847 int s1 = vs->CreateStorageID(); 847 int s1 = vs->CreateStorageID();
848 vs->StoreView(s1, v1); 848 vs->StoreView(s1, v1);
849 root_view->AddChildView(v1); 849 root_view->AddChildView(v1);
850 View* v11 = new View; 850 View* v11 = new View;
851 int s11 = vs->CreateStorageID(); 851 int s11 = vs->CreateStorageID();
852 vs->StoreView(s11, v11); 852 vs->StoreView(s11, v11);
853 v1->AddChildView(v11); 853 v1->AddChildView(v11);
(...skipping 2550 matching lines...) Expand 10 before | Expand all | Expand 10 after
3404 // Set to non default value. 3404 // Set to non default value.
3405 v->layer()->set_scale_content(false); 3405 v->layer()->set_scale_content(false);
3406 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer()); 3406 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer());
3407 ui::Layer* new_layer = v->layer(); 3407 ui::Layer* new_layer = v->layer();
3408 EXPECT_FALSE(new_layer->scale_content()); 3408 EXPECT_FALSE(new_layer->scale_content());
3409 } 3409 }
3410 3410
3411 #endif // USE_AURA 3411 #endif // USE_AURA
3412 3412
3413 } // namespace views 3413 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/child_modal_window.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698