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

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

Issue 666063002: [Android] Upstream ChromeNativePreferences as PrefServiceBridge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.preferences;
6
7 import android.test.suitebuilder.annotation.SmallTest;
8
9 import org.chromium.base.ThreadUtils;
10 import org.chromium.base.test.util.Feature;
11 import org.chromium.chrome.shell.ChromeShellTestBase;
12
13 /**
14 * Test for PrefServiceBridge
15 */
16 public class PrefServiceBridgeTest extends ChromeShellTestBase {
17 /**
18 * Test the x-auto-login setting.
19 */
20 @SmallTest
21 @Feature({"Preferences", "Main"})
22 public void testAutologinEnabled() {
23 ThreadUtils.runOnUiThreadBlocking(new Runnable() {
24 @Override
25 public void run() {
26 PrefServiceBridge prefs = PrefServiceBridge.getInstance();
27
28 boolean autologinEnabled = prefs.isAutologinEnabled();
29
30 // Make sure the value doesn't change
31 prefs.setAutologinEnabled(autologinEnabled);
32 assertEquals(autologinEnabled, prefs.isAutologinEnabled());
33
34 // Try flipping the value
35 autologinEnabled = !autologinEnabled;
36 prefs.setAutologinEnabled(autologinEnabled);
37 assertEquals(autologinEnabled, prefs.isAutologinEnabled());
38 }
39 });
40 }
41
42 @Override
43 protected void setUp() throws Exception {
44 super.setUp();
45 launchChromeShellWithBlankPage();
46 }
47 }
OLDNEW
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698