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
3// found in the LICENSE file.
4
5package org.chromium.chrome.browser.util;
6
7import android.test.InstrumentationTestCase;
8import android.test.suitebuilder.annotation.SmallTest;
9
10import org.chromium.base.test.util.Feature;
11
12public class HashUtilTest extends InstrumentationTestCase {
13
14    @SmallTest
15    @Feature({"Sync", "Omaha"})
16    public void testMd5HashGivesCorrectString() {
17        assertEquals("8e8cd7e8797678284984aa304e779ba5",
18                HashUtil.getMd5Hash(new HashUtil.Params("Chrome for Android")));
19        // WARNING: The expected value for this must NEVER EVER change. Ever.
20        // See http://crbug.com/179565.
21        assertEquals("6aa987da27016dade54b24ff5b846111",
22                HashUtil.getMd5Hash(new HashUtil.Params("Chrome for Android").withSalt("mySalt")));
23    }
24}
25