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

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: address review comment 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
« no previous file with comments | « chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a80d4f05ff41942a802edab0f2468c33a76f3a12..8c306f57b3a019722928c65fdb3a98e4660c8e6c 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
@@ -200,15 +200,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;
}
@@ -217,22 +217,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;
@@ -241,8 +240,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;
}
}
« no previous file with comments | « chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698