OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "chrome/browser/chromeos/arc/arc_navigation_throttle.h" | 7 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" |
8 #include "components/arc/intent_helper/arc_intent_helper_bridge.h" | 8 #include "components/arc/intent_helper/arc_intent_helper_bridge.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
11 | 11 |
12 namespace arc { | 12 namespace arc { |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Creates an array with |num_elements| handlers and makes |chrome_index|-th | 16 // Creates an array with |num_elements| handlers and makes |chrome_index|-th |
17 // handler "Chrome". If Chrome is not necessary, set |chrome_index| to | 17 // handler "Chrome". If Chrome is not necessary, set |chrome_index| to |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 for (size_t i = 0; i <= ArcNavigationThrottle::kMaxAppResults * 2; ++i) { | 177 for (size_t i = 0; i <= ArcNavigationThrottle::kMaxAppResults * 2; ++i) { |
178 // When Chrome does not exist in |handlers|, swap is unnecessary. | 178 // When Chrome does not exist in |handlers|, swap is unnecessary. |
179 mojo::Array<mojom::IntentHandlerInfoPtr> handlers = CreateArray(i, i); | 179 mojo::Array<mojom::IntentHandlerInfoPtr> handlers = CreateArray(i, i); |
180 EXPECT_FALSE(ArcNavigationThrottle::IsSwapElementsNeededForTesting( | 180 EXPECT_FALSE(ArcNavigationThrottle::IsSwapElementsNeededForTesting( |
181 handlers, &indices)) | 181 handlers, &indices)) |
182 << i; | 182 << i; |
183 } | 183 } |
184 } | 184 } |
185 | 185 |
186 } // namespace arc | 186 } // namespace arc |
OLD | NEW |