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

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

Issue 2478923002: Ensure that Chrome is visible in the dialog by default (Closed)
Patch Set: review 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 8b083e680322106c1ec74113c68d402cd719316a..0dc721dd41ae1ac66f9290f1fb52a01792a2ac62 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
@@ -148,15 +148,15 @@ TEST(ArcNavigationThrottleTest, TestIsSwapElementsNeeded) {
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);
- EXPECT_FALSE(ArcNavigationThrottle::IsSwapElementsNeededForTesting(
- handlers, &indices))
+ EXPECT_FALSE(
+ ArcNavigationThrottle::IsSwapElementsNeeded(handlers, &indices))
<< i;
// When Chrome is within the first |kMaxAppResults| elements, swap is
// unnecessary.
handlers = CreateArray(i, i - 1);
- EXPECT_FALSE(ArcNavigationThrottle::IsSwapElementsNeededForTesting(
- handlers, &indices))
+ EXPECT_FALSE(
+ ArcNavigationThrottle::IsSwapElementsNeeded(handlers, &indices))
<< i;
}
@@ -165,22 +165,21 @@ TEST(ArcNavigationThrottleTest, TestIsSwapElementsNeeded) {
// When Chrome is within the first |kMaxAppResults| elements, swap is
// unnecessary.
mojo::Array<mojom::IntentHandlerInfoPtr> handlers = CreateArray(i, 0);
- EXPECT_FALSE(ArcNavigationThrottle::IsSwapElementsNeededForTesting(
- handlers, &indices))
+ EXPECT_FALSE(
+ ArcNavigationThrottle::IsSwapElementsNeeded(handlers, &indices))
<< i;
// When Chrome is the |kMaxAppResults|-th element, swap is unnecessary.
handlers = CreateArray(i, ArcNavigationThrottle::kMaxAppResults - 1);
- EXPECT_FALSE(ArcNavigationThrottle::IsSwapElementsNeededForTesting(
- handlers, &indices))
+ EXPECT_FALSE(
+ ArcNavigationThrottle::IsSwapElementsNeeded(handlers, &indices))
<< i;
// When Chrome is not within the first |kMaxAppResults| elements, swap is
// necessary.
handlers = CreateArray(i, i - 1);
indices.first = indices.second = 0;
- EXPECT_TRUE(ArcNavigationThrottle::IsSwapElementsNeededForTesting(handlers,
- &indices))
+ EXPECT_TRUE(ArcNavigationThrottle::IsSwapElementsNeeded(handlers, &indices))
<< i;
EXPECT_EQ(ArcNavigationThrottle::kMaxAppResults - 1u, indices.first) << i;
EXPECT_EQ(i - 1, indices.second) << i;
@@ -189,8 +188,8 @@ 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);
- EXPECT_FALSE(ArcNavigationThrottle::IsSwapElementsNeededForTesting(
- handlers, &indices))
+ EXPECT_FALSE(
+ ArcNavigationThrottle::IsSwapElementsNeeded(handlers, &indices))
<< i;
}
}

Powered by Google App Engine
This is Rietveld 408576698