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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/identity/UniqueIdentificationGeneratorFactoryTest.java

Issue 1139643006: Rename chrome/android/javatests to javatests_shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/identity/UniqueIdentificationGeneratorFactoryTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/identity/UniqueIdentificationGeneratorFactoryTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/identity/UniqueIdentificationGeneratorFactoryTest.java
deleted file mode 100644
index b2d30a299039b9cc1c5cb5f3b322f6ca9583bacc..0000000000000000000000000000000000000000
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/identity/UniqueIdentificationGeneratorFactoryTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.identity;
-
-import android.test.InstrumentationTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import org.chromium.base.test.util.Feature;
-
-import javax.annotation.Nullable;
-
-public class UniqueIdentificationGeneratorFactoryTest extends InstrumentationTestCase {
-
- @SmallTest
- @Feature({"ChromeToMobile", "Omaha", "Sync"})
- public void testSetAndGetGenerator() {
- UniqueIdentificationGeneratorFactory.clearGeneratorMapForTest();
- UniqueIdentificationGenerator gen = new TestGenerator();
- UniqueIdentificationGeneratorFactory.registerGenerator("generator", gen, false);
- assertEquals(gen, UniqueIdentificationGeneratorFactory.getInstance("generator"));
- }
-
- @SmallTest
- @Feature({"ChromeToMobile", "Omaha", "Sync"})
- public void testForceCanOverrideGenerator() {
- UniqueIdentificationGeneratorFactory.clearGeneratorMapForTest();
- UniqueIdentificationGenerator gen1 = new TestGenerator();
- UniqueIdentificationGenerator gen2 = new TestGenerator();
- UniqueIdentificationGenerator gen3 = new TestGenerator();
- UniqueIdentificationGeneratorFactory.registerGenerator("generator", gen1, false);
- assertEquals(gen1, UniqueIdentificationGeneratorFactory.getInstance("generator"));
- UniqueIdentificationGeneratorFactory.registerGenerator("generator", gen2, false);
- assertEquals(gen1, UniqueIdentificationGeneratorFactory.getInstance("generator"));
- UniqueIdentificationGeneratorFactory.registerGenerator("generator", gen3, true);
- assertEquals(gen3, UniqueIdentificationGeneratorFactory.getInstance("generator"));
- }
-
- @SmallTest
- @Feature({"ChromeToMobile", "Omaha", "Sync"})
- public void testGeneratorNotFoundThrows() {
- UniqueIdentificationGeneratorFactory.clearGeneratorMapForTest();
- UniqueIdentificationGenerator generator = null;
- try {
- generator = UniqueIdentificationGeneratorFactory.getInstance("generator");
- fail("The generator does not exist, so factory should throw an error.");
- } catch (RuntimeException e) {
- assertEquals(null, generator);
- }
- }
-
- private static class TestGenerator implements UniqueIdentificationGenerator {
- @Override
- public String getUniqueId(@Nullable String salt) {
- return null;
- }
- }
-}

Powered by Google App Engine
This is Rietveld 408576698