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

Side by Side Diff: chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc

Issue 103493005: Rename View::set_focusable and View::set_accessibility_focusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a few missing files Created 7 years 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
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 <string> 5 #include <string>
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/accessibility/accessibility_extension_api.h" 10 #include "chrome/browser/accessibility/accessibility_extension_api.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 const char kOldNameASCII[] = "OldName"; 322 const char kOldNameASCII[] = "OldName";
323 const char kNewNameASCII[] = "NewName"; 323 const char kNewNameASCII[] = "NewName";
324 324
325 // Create a toolbar with a button. 325 // Create a toolbar with a button.
326 views::View* contents = new ViewWithNameAndRole( 326 views::View* contents = new ViewWithNameAndRole(
327 ASCIIToUTF16(kContentsNameASCII), 327 ASCIIToUTF16(kContentsNameASCII),
328 ui::AccessibilityTypes::ROLE_CLIENT); 328 ui::AccessibilityTypes::ROLE_CLIENT);
329 ViewWithNameAndRole* child = new ViewWithNameAndRole( 329 ViewWithNameAndRole* child = new ViewWithNameAndRole(
330 ASCIIToUTF16(kOldNameASCII), 330 ASCIIToUTF16(kOldNameASCII),
331 ui::AccessibilityTypes::ROLE_PUSHBUTTON); 331 ui::AccessibilityTypes::ROLE_PUSHBUTTON);
332 child->set_focusable(true); 332 child->SetFocusable(true);
333 contents->AddChildView(child); 333 contents->AddChildView(child);
334 334
335 // Put the view in a window. 335 // Put the view in a window.
336 views::Widget* window = CreateWindowWithContents(contents); 336 views::Widget* window = CreateWindowWithContents(contents);
337 337
338 // Set focus to the child view. 338 // Set focus to the child view.
339 control_event_count_ = 0; 339 control_event_count_ = 0;
340 child->RequestFocus(); 340 child->RequestFocus();
341 341
342 // Change the child's name after the focus notification. 342 // Change the child's name after the focus notification.
(...skipping 15 matching lines...) Expand all
358 const char kContentsNameASCII[] = "Contents"; 358 const char kContentsNameASCII[] = "Contents";
359 const char kNameASCII[] = "OldName"; 359 const char kNameASCII[] = "OldName";
360 360
361 // Create a toolbar with a button. 361 // Create a toolbar with a button.
362 views::View* contents = new ViewWithNameAndRole( 362 views::View* contents = new ViewWithNameAndRole(
363 ASCIIToUTF16(kContentsNameASCII), 363 ASCIIToUTF16(kContentsNameASCII),
364 ui::AccessibilityTypes::ROLE_CLIENT); 364 ui::AccessibilityTypes::ROLE_CLIENT);
365 ViewWithNameAndRole* child = new ViewWithNameAndRole( 365 ViewWithNameAndRole* child = new ViewWithNameAndRole(
366 ASCIIToUTF16(kNameASCII), 366 ASCIIToUTF16(kNameASCII),
367 ui::AccessibilityTypes::ROLE_PUSHBUTTON); 367 ui::AccessibilityTypes::ROLE_PUSHBUTTON);
368 child->set_focusable(true); 368 child->SetFocusable(true);
369 contents->AddChildView(child); 369 contents->AddChildView(child);
370 370
371 // Put the view in a window. 371 // Put the view in a window.
372 views::Widget* window = CreateWindowWithContents(contents); 372 views::Widget* window = CreateWindowWithContents(contents);
373 373
374 // Set focus to the child view. 374 // Set focus to the child view.
375 control_event_count_ = 0; 375 control_event_count_ = 0;
376 child->RequestFocus(); 376 child->RequestFocus();
377 377
378 // Delete the child! 378 // Delete the child!
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 505
506 AccessibilityEventRouterViews::RecursiveGetMenuItemIndexAndCount( 506 AccessibilityEventRouterViews::RecursiveGetMenuItemIndexAndCount(
507 menu_container, 507 menu_container,
508 menu->GetMenuItemByID(kTestCases[i].command_id), 508 menu->GetMenuItemByID(kTestCases[i].command_id),
509 &index, 509 &index,
510 &count); 510 &count);
511 EXPECT_EQ(kTestCases[i].expected_index, index) << "Case " << i; 511 EXPECT_EQ(kTestCases[i].expected_index, index) << "Case " << i;
512 EXPECT_EQ(kTestCases[i].expected_count, count) << "Case " << i; 512 EXPECT_EQ(kTestCases[i].expected_count, count) << "Case " << i;
513 } 513 }
514 } 514 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/wimax_config_view.cc ('k') | chrome/browser/ui/views/autofill/autofill_dialog_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698