OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.util; | 5 package org.chromium.chrome.browser.util; |
6 | 6 |
7 import android.support.test.filters.SmallTest; | 7 import android.support.test.filters.SmallTest; |
8 import android.test.InstrumentationTestCase; | 8 |
| 9 import org.junit.Assert; |
| 10 import org.junit.Test; |
| 11 import org.junit.runner.RunWith; |
9 | 12 |
10 import org.chromium.base.test.util.Feature; | 13 import org.chromium.base.test.util.Feature; |
| 14 import org.chromium.chrome.test.ChromeJUnit4ClassRunner; |
11 | 15 |
12 public class HashUtilTest extends InstrumentationTestCase { | 16 @RunWith(ChromeJUnit4ClassRunner.class) |
13 | 17 public class HashUtilTest { |
| 18 @Test |
14 @SmallTest | 19 @SmallTest |
15 @Feature({"Sync", "Omaha"}) | 20 @Feature({"Sync", "Omaha"}) |
16 public void testMd5HashGivesCorrectString() { | 21 public void testMd5HashGivesCorrectString() { |
17 assertEquals("8e8cd7e8797678284984aa304e779ba5", | 22 Assert.assertEquals("8e8cd7e8797678284984aa304e779ba5", |
18 HashUtil.getMd5Hash(new HashUtil.Params("Chrome for Android"))); | 23 HashUtil.getMd5Hash(new HashUtil.Params("Chrome for Android"))); |
19 // WARNING: The expected value for this must NEVER EVER change. Ever. | 24 // WARNING: The expected value for this must NEVER EVER change. Ever. |
20 // See http://crbug.com/179565. | 25 // See http://crbug.com/179565. |
21 assertEquals("6aa987da27016dade54b24ff5b846111", | 26 Assert.assertEquals("6aa987da27016dade54b24ff5b846111", |
22 HashUtil.getMd5Hash(new HashUtil.Params("Chrome for Android").wi
thSalt("mySalt"))); | 27 HashUtil.getMd5Hash(new HashUtil.Params("Chrome for Android").wi
thSalt("mySalt"))); |
23 } | 28 } |
24 } | 29 } |
OLD | NEW |