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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java

Issue 2271413002: bluetooth: Implement RSSI indicator on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-impl-rssi-tx-power
Patch Set: Clean up Created 4 years, 3 months 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 unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698