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

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

Issue 655413002: Convert ARRAYSIZE_UNSAFE -> arraysize in chrome/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 <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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 int command_id; 519 int command_id;
520 int expected_index; 520 int expected_index;
521 int expected_count; 521 int expected_count;
522 } kTestCases[] = { 522 } kTestCases[] = {
523 { SimpleMenuDelegate::IDC_MENU_ITEM_1, 0, 3 }, 523 { SimpleMenuDelegate::IDC_MENU_ITEM_1, 0, 3 },
524 { SimpleMenuDelegate::IDC_MENU_ITEM_2, 1, 3 }, 524 { SimpleMenuDelegate::IDC_MENU_ITEM_2, 1, 3 },
525 { SimpleMenuDelegate::IDC_MENU_INVISIBLE, 0, 3 }, 525 { SimpleMenuDelegate::IDC_MENU_INVISIBLE, 0, 3 },
526 { SimpleMenuDelegate::IDC_MENU_ITEM_3, 2, 3 }, 526 { SimpleMenuDelegate::IDC_MENU_ITEM_3, 2, 3 },
527 }; 527 };
528 528
529 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) { 529 for (size_t i = 0; i < arraysize(kTestCases); ++i) {
530 int index = 0; 530 int index = 0;
531 int count = 0; 531 int count = 0;
532 532
533 AccessibilityEventRouterViews::RecursiveGetMenuItemIndexAndCount( 533 AccessibilityEventRouterViews::RecursiveGetMenuItemIndexAndCount(
534 menu_container, 534 menu_container,
535 menu->GetMenuItemByID(kTestCases[i].command_id), 535 menu->GetMenuItemByID(kTestCases[i].command_id),
536 &index, 536 &index,
537 &count); 537 &count);
538 EXPECT_EQ(kTestCases[i].expected_index, index) << "Case " << i; 538 EXPECT_EQ(kTestCases[i].expected_index, index) << "Case " << i;
539 EXPECT_EQ(kTestCases[i].expected_count, count) << "Case " << i; 539 EXPECT_EQ(kTestCases[i].expected_count, count) << "Case " << i;
540 } 540 }
541 } 541 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model_unittest.cc ('k') | chrome/browser/ui/views/tabs/stacked_tab_strip_layout_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698