Chromium Code Reviews| Index: chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java |
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java |
| index 5ab4b84d03ca0395976442aefd36eeb216e801d5..e397d55e91f149a8c0300a5bd140b51789af4200 100644 |
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java |
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java |
| @@ -148,6 +148,15 @@ public class BluetoothChooserDialogTest extends ChromeActivityTestCaseBase<Chrom |
| return message.replaceAll("</?link>", ""); |
| } |
| + /** |
| + * The messages include <link1> ... </link1>, <link2> ... </link2> sections |
| + * that are used to create clickable spans. For testing the messages, this |
| + * function returns the raw string without the tags. |
| + */ |
| + private static String removeMultipleLinkTags(String message) { |
|
newt (away)
2016/03/17 01:53:20
Why not combine this into the method above?
juncai
2016/03/17 18:21:35
Done.
|
| + return message.replaceAll("</?link1>", "").replaceAll("</?link2>", ""); |
| + } |
| + |
| @SmallTest |
| public void testCancel() throws InterruptedException { |
| ItemChooserDialog itemChooser = mChooserDialog.mItemChooserDialog; |
| @@ -202,7 +211,8 @@ public class BluetoothChooserDialogTest extends ChromeActivityTestCaseBase<Chrom |
| // the progress spinner should disappear, the Commit button should still |
| // be disabled (since nothing's selected), and the list view should |
| // show. |
| - assertEquals(removeLinkTags(getActivity().getString(R.string.bluetooth_not_seeing_it)), |
| + assertEquals(removeMultipleLinkTags(getActivity().getString( |
| + R.string.bluetooth_not_seeing_it_idle_some_found)), |
| statusView.getText().toString()); |
| assertFalse(button.isEnabled()); |
| assertEquals(View.VISIBLE, items.getVisibility()); |