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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/util/HashUtilTest.java

Issue 12313075: [sync] Upstream the Android ProfileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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/util/HashUtilTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/util/HashUtilTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/util/HashUtilTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..c2778134d7826cf297a3172131dd8daf6284acf0
--- /dev/null
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/util/HashUtilTest.java
@@ -0,0 +1,24 @@
+// 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.util;
+
+import android.test.InstrumentationTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import org.chromium.base.test.util.Feature;
+
+public class HashUtilTest extends InstrumentationTestCase {
+
+ @SmallTest
+ @Feature({"Sync", "Omaha"})
+ public void testMd5HashGivesCorrectString() {
+ assertEquals("8e8cd7e8797678284984aa304e779ba5",
+ HashUtil.getMd5Hash(new HashUtil.Params("Chrome for Android")));
+ // WARNING: The expected value for this must NEVER EVER change. Ever.
+ // See http://crbug.com/179565.
+ assertEquals("6aa987da27016dade54b24ff5b846111",
+ HashUtil.getMd5Hash(new HashUtil.Params("Chrome for Android").withSalt("mySalt")));
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698