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

Unified Diff: chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc

Issue 2498223002: arc: enable use_new_wrapper_types for intent_helper.mojom (Closed)
Patch Set: rebase Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc
diff --git a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc
index 8c306f57b3a019722928c65fdb3a98e4660c8e6c..520947ff21f1d8e408f56be6445c46236aa742e3 100644
--- a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc
+++ b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc
@@ -16,9 +16,9 @@ namespace {
// Creates an array with |num_elements| handlers and makes |chrome_index|-th
// handler "Chrome". If Chrome is not necessary, set |chrome_index| to
// |num_elements|.
-mojo::Array<mojom::IntentHandlerInfoPtr> CreateArray(size_t num_elements,
+std::vector<mojom::IntentHandlerInfoPtr> CreateArray(size_t num_elements,
size_t chrome_index) {
- mojo::Array<mojom::IntentHandlerInfoPtr> handlers;
+ std::vector<mojom::IntentHandlerInfoPtr> handlers;
for (size_t i = 0; i < num_elements; ++i) {
mojom::IntentHandlerInfoPtr handler = mojom::IntentHandlerInfo::New();
handler->name = "Name";
@@ -109,7 +109,7 @@ TEST(ArcNavigationThrottleTest, TestFindPreferredApp) {
3u, ArcNavigationThrottle::FindPreferredAppForTesting(CreateArray(3, 2)));
// Add a preferred app and call the function.
for (size_t i = 0; i < 3; ++i) {
- mojo::Array<mojom::IntentHandlerInfoPtr> handlers = CreateArray(3, 0);
+ std::vector<mojom::IntentHandlerInfoPtr> handlers = CreateArray(3, 0);
handlers[i]->is_preferred = true;
EXPECT_EQ(i, ArcNavigationThrottle::FindPreferredAppForTesting(handlers))
<< i;
@@ -199,7 +199,7 @@ TEST(ArcNavigationThrottleTest, TestIsSwapElementsNeeded) {
std::pair<size_t, size_t> indices;
for (size_t i = 1; i <= ArcNavigationThrottle::kMaxAppResults; ++i) {
// When Chrome is the first element, swap is unnecessary.
- mojo::Array<mojom::IntentHandlerInfoPtr> handlers = CreateArray(i, 0);
+ std::vector<mojom::IntentHandlerInfoPtr> handlers = CreateArray(i, 0);
EXPECT_FALSE(
ArcNavigationThrottle::IsSwapElementsNeeded(handlers, &indices))
<< i;
@@ -216,7 +216,7 @@ TEST(ArcNavigationThrottleTest, TestIsSwapElementsNeeded) {
i < ArcNavigationThrottle::kMaxAppResults * 2; ++i) {
// When Chrome is within the first |kMaxAppResults| elements, swap is
// unnecessary.
- mojo::Array<mojom::IntentHandlerInfoPtr> handlers = CreateArray(i, 0);
+ std::vector<mojom::IntentHandlerInfoPtr> handlers = CreateArray(i, 0);
EXPECT_FALSE(
ArcNavigationThrottle::IsSwapElementsNeeded(handlers, &indices))
<< i;
@@ -239,7 +239,7 @@ TEST(ArcNavigationThrottleTest, TestIsSwapElementsNeeded) {
for (size_t i = 0; i <= ArcNavigationThrottle::kMaxAppResults * 2; ++i) {
// When Chrome does not exist in |handlers|, swap is unnecessary.
- mojo::Array<mojom::IntentHandlerInfoPtr> handlers = CreateArray(i, i);
+ std::vector<mojom::IntentHandlerInfoPtr> handlers = CreateArray(i, i);
EXPECT_FALSE(
ArcNavigationThrottle::IsSwapElementsNeeded(handlers, &indices))
<< i;

Powered by Google App Engine
This is Rietveld 408576698