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

Side by Side Diff: ui/views/accessibility/native_view_accessibility_win_unittest.cc

Issue 282133005: Removes unnecessary views::Widget::InitParams::top_level (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/message_center/views/toast_contents_view.cc ('k') | ui/views/examples/examples_window.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <oleacc.h> 5 #include <oleacc.h>
6 6
7 #include "base/win/scoped_bstr.h" 7 #include "base/win/scoped_bstr.h"
8 #include "base/win/scoped_comptr.h" 8 #include "base/win/scoped_comptr.h"
9 #include "base/win/scoped_variant.h" 9 #include "base/win/scoped_variant.h"
10 #include "third_party/iaccessible2/ia2_api_all.h" 10 #include "third_party/iaccessible2/ia2_api_all.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 widget.GetRootView()->GetNativeViewAccessible()); 121 widget.GetRootView()->GetNativeViewAccessible());
122 122
123 LONG child_count = 0; 123 LONG child_count = 0;
124 ASSERT_EQ(S_OK, root_view_accessible->get_accChildCount(&child_count)); 124 ASSERT_EQ(S_OK, root_view_accessible->get_accChildCount(&child_count));
125 ASSERT_EQ(1L, child_count); 125 ASSERT_EQ(1L, child_count);
126 126
127 Widget owned_widget; 127 Widget owned_widget;
128 Widget::InitParams owned_init_params = 128 Widget::InitParams owned_init_params =
129 CreateParams(Widget::InitParams::TYPE_POPUP); 129 CreateParams(Widget::InitParams::TYPE_POPUP);
130 owned_init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 130 owned_init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
131 owned_init_params.child = false;
132 owned_init_params.parent = widget.GetNativeView(); 131 owned_init_params.parent = widget.GetNativeView();
133 owned_widget.Init(owned_init_params); 132 owned_widget.Init(owned_init_params);
134 owned_widget.Show(); 133 owned_widget.Show();
135 134
136 ASSERT_EQ(S_OK, root_view_accessible->get_accChildCount(&child_count)); 135 ASSERT_EQ(S_OK, root_view_accessible->get_accChildCount(&child_count));
137 ASSERT_EQ(2L, child_count); 136 ASSERT_EQ(2L, child_count);
138 } 137 }
139 138
140 TEST_F(NativeViewAcccessibilityWinTest, RetrieveAllAlerts) { 139 TEST_F(NativeViewAcccessibilityWinTest, RetrieveAllAlerts) {
141 Widget widget; 140 Widget widget;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 delete infobar; 195 delete infobar;
197 ASSERT_EQ(S_OK, root_view_accessible->get_relationTargetsOfType( 196 ASSERT_EQ(S_OK, root_view_accessible->get_relationTargetsOfType(
198 alerts_bstr, 0, &targets, &n_targets)); 197 alerts_bstr, 0, &targets, &n_targets));
199 ASSERT_EQ(1, n_targets); 198 ASSERT_EQ(1, n_targets);
200 ASSERT_TRUE(infobar2_accessible.IsSameObject(targets[0])); 199 ASSERT_TRUE(infobar2_accessible.IsSameObject(targets[0]));
201 CoTaskMemFree(targets); 200 CoTaskMemFree(targets);
202 } 201 }
203 202
204 } // namespace test 203 } // namespace test
205 } // namespace views 204 } // namespace views
OLDNEW
« no previous file with comments | « ui/message_center/views/toast_contents_view.cc ('k') | ui/views/examples/examples_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698