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 package org.chromium.chrome.browser.payments; | 5 package org.chromium.chrome.browser.payments; |
6 | 6 |
7 import android.test.suitebuilder.annotation.MediumTest; | 7 import android.test.suitebuilder.annotation.MediumTest; |
8 | 8 |
9 import org.chromium.base.test.util.Feature; | 9 import org.chromium.base.test.util.Feature; |
10 import org.chromium.chrome.R; | 10 import org.chromium.chrome.R; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 * are shown. They should be ordered by frecency and complete contact detail
s should be | 78 * are shown. They should be ordered by frecency and complete contact detail
s should be |
79 * suggested first. | 79 * suggested first. |
80 */ | 80 */ |
81 @MediumTest | 81 @MediumTest |
82 @Feature({"Payments"}) | 82 @Feature({"Payments"}) |
83 public void testContactDetailsSuggestionOrdering() | 83 public void testContactDetailsSuggestionOrdering() |
84 throws InterruptedException, ExecutionException, TimeoutException { | 84 throws InterruptedException, ExecutionException, TimeoutException { |
85 triggerUIAndWait(mReadyToPay); | 85 triggerUIAndWait(mReadyToPay); |
86 clickInContactInfoAndWait(R.id.payments_section, mReadyForInput); | 86 clickInContactInfoAndWait(R.id.payments_section, mReadyForInput); |
87 assertEquals(4, getNumberOfContactDetailSuggestions()); | 87 assertEquals(4, getNumberOfContactDetailSuggestions()); |
88 assertEquals("555 123-4567\nlisa@simpson.com", getContactDetailsSuggesti
onLabel(0)); | 88 assertEquals("Lisa Simpson\n555 123-4567\nlisa@simpson.com", |
89 assertEquals("555 123-4567\nmaggie@simpson.com", getContactDetailsSugges
tionLabel(1)); | 89 getContactDetailsSuggestionLabel(0)); |
90 assertEquals("bart@simpson.com", getContactDetailsSuggestionLabel(2)); | 90 assertEquals("Maggie Simpson\n555 123-4567\nmaggie@simpson.com", |
91 assertEquals("homer@simpson.com", getContactDetailsSuggestionLabel(3)); | 91 getContactDetailsSuggestionLabel(1)); |
| 92 assertEquals("Bart Simpson\nbart@simpson.com", getContactDetailsSuggesti
onLabel(2)); |
| 93 assertEquals("Homer Simpson\nhomer@simpson.com", getContactDetailsSugges
tionLabel(3)); |
92 } | 94 } |
93 } | 95 } |
OLD | NEW |