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; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import android.Manifest; | 7 import android.Manifest; |
8 import android.app.Dialog; | 8 import android.app.Dialog; |
9 import android.content.Intent; | 9 import android.content.Intent; |
10 import android.content.pm.PackageManager; | 10 import android.content.pm.PackageManager; |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
207 | 207 |
208 TextViewWithClickableSpans statusView = | 208 TextViewWithClickableSpans statusView = |
209 (TextViewWithClickableSpans) dialog.findViewById(R.id.status); | 209 (TextViewWithClickableSpans) dialog.findViewById(R.id.status); |
210 final View items = dialog.findViewById(R.id.items); | 210 final View items = dialog.findViewById(R.id.items); |
211 final Button button = (Button) dialog.findViewById(R.id.positive); | 211 final Button button = (Button) dialog.findViewById(R.id.positive); |
212 final View progress = dialog.findViewById(R.id.progress); | 212 final View progress = dialog.findViewById(R.id.progress); |
213 | 213 |
214 ThreadUtils.runOnUiThreadBlocking(new Runnable() { | 214 ThreadUtils.runOnUiThreadBlocking(new Runnable() { |
215 @Override | 215 @Override |
216 public void run() { | 216 public void run() { |
217 mChooserDialog.addOrUpdateDevice("id-1", "Name 1"); | 217 mChooserDialog.addOrUpdateDevice("id-1", "Name 1", -1 /* No rssi */); |
juncai
2016/08/26 19:37:48
maybe change the comment to be something more desc
ortuno
2016/09/12 05:11:28
Done.
| |
218 mChooserDialog.addOrUpdateDevice("id-2", "Name 2"); | 218 mChooserDialog.addOrUpdateDevice("id-2", "Name 2", -1 /* No rssi */); |
219 } | 219 } |
220 }); | 220 }); |
221 | 221 |
222 // After adding items to the dialog, the help message should be showing, | 222 // After adding items to the dialog, the help message should be showing, |
223 // the progress spinner should disappear, the Commit button should still | 223 // the progress spinner should disappear, the Commit button should still |
224 // be disabled (since nothing's selected), and the list view should | 224 // be disabled (since nothing's selected), and the list view should |
225 // show. | 225 // show. |
226 assertEquals(removeLinkTags(getActivity().getString(R.string.bluetooth_n ot_seeing_it)), | 226 assertEquals(removeLinkTags(getActivity().getString(R.string.bluetooth_n ot_seeing_it)), |
227 statusView.getText().toString()); | 227 statusView.getText().toString()); |
228 assertFalse(button.isEnabled()); | 228 assertFalse(button.isEnabled()); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
397 } | 397 } |
398 | 398 |
399 public boolean mSystemLocationSettingsEnabled = true; | 399 public boolean mSystemLocationSettingsEnabled = true; |
400 | 400 |
401 @Override | 401 @Override |
402 public boolean isSystemLocationSettingEnabled() { | 402 public boolean isSystemLocationSettingEnabled() { |
403 return mSystemLocationSettingsEnabled; | 403 return mSystemLocationSettingsEnabled; |
404 } | 404 } |
405 } | 405 } |
406 } | 406 } |
OLD | NEW |