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

Side by Side Diff: content/browser/accessibility/browser_accessibility_win_unittest.cc

Issue 2692173003: Implemented SetSelection for the Web content on Windows. (Closed)
Patch Set: Fixed another compilation error on Windows. Created 3 years, 10 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
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 "content/browser/accessibility/browser_accessibility_win.h" 5 #include "content/browser/accessibility/browser_accessibility_win.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 EXPECT_EQ(S_OK, hr); 1269 EXPECT_EQ(S_OK, hr);
1270 EXPECT_EQ(0, n_selections); 1270 EXPECT_EQ(0, n_selections);
1271 hr = text_field_accessible->get_nSelections(&n_selections); 1271 hr = text_field_accessible->get_nSelections(&n_selections);
1272 EXPECT_EQ(S_OK, hr); 1272 EXPECT_EQ(S_OK, hr);
1273 EXPECT_EQ(1, n_selections); 1273 EXPECT_EQ(1, n_selections);
1274 1274
1275 // Test get_selection. 1275 // Test get_selection.
1276 hr = combo_box_accessible->get_selection( 1276 hr = combo_box_accessible->get_selection(
1277 0L /* selection_index */, &selection_start, &selection_end); 1277 0L /* selection_index */, &selection_start, &selection_end);
1278 EXPECT_EQ(E_INVALIDARG, hr); // No selections available. 1278 EXPECT_EQ(E_INVALIDARG, hr); // No selections available.
1279 // Invalid in_args should not modify out_args.
1280 EXPECT_EQ(-2, selection_start);
1281 EXPECT_EQ(-2, selection_end);
1282 hr = text_field_accessible->get_selection( 1279 hr = text_field_accessible->get_selection(
1283 0L /* selection_index */, &selection_start, &selection_end); 1280 0L /* selection_index */, &selection_start, &selection_end);
1284 EXPECT_EQ(S_OK, hr); 1281 EXPECT_EQ(S_OK, hr);
1285 EXPECT_EQ(1, selection_start); 1282 EXPECT_EQ(1, selection_start);
1286 EXPECT_EQ(2, selection_end); 1283 EXPECT_EQ(2, selection_end);
1287 1284
1288 manager.reset(); 1285 manager.reset();
1289 ASSERT_EQ(0, CountedBrowserAccessibility::num_instances()); 1286 ASSERT_EQ(0, CountedBrowserAccessibility::num_instances());
1290 } 1287 }
1291 1288
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2461 std::vector<AXEventNotificationDetails> events = {event}; 2458 std::vector<AXEventNotificationDetails> events = {event};
2462 manager->OnAccessibilityEvents(events); 2459 manager->OnAccessibilityEvents(events);
2463 2460
2464 EXPECT_HRESULT_SUCCEEDED(ax_child1->get_nRelations(&n_relations)); 2461 EXPECT_HRESULT_SUCCEEDED(ax_child1->get_nRelations(&n_relations));
2465 EXPECT_EQ(2, n_relations); 2462 EXPECT_EQ(2, n_relations);
2466 EXPECT_HRESULT_SUCCEEDED(ax_child2->get_nRelations(&n_relations)); 2463 EXPECT_HRESULT_SUCCEEDED(ax_child2->get_nRelations(&n_relations));
2467 EXPECT_EQ(2, n_relations); 2464 EXPECT_EQ(2, n_relations);
2468 } 2465 }
2469 2466
2470 } // namespace content 2467 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_win.cc ('k') | ui/accessibility/ax_position.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698