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

Unified Diff: chrome/renderer/safe_browsing/murmurhash3_util_unittest.cc

Issue 7866011: Switch to the new client-side phishing model that uses Murmurhash for word hashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile problems and add another test Created 9 years, 3 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/renderer/safe_browsing/murmurhash3_util_unittest.cc
diff --git a/chrome/renderer/safe_browsing/murmurhash3_util_unittest.cc b/chrome/renderer/safe_browsing/murmurhash3_util_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f550041e41481c83658bbf143f6933fd7ade9078
--- /dev/null
+++ b/chrome/renderer/safe_browsing/murmurhash3_util_unittest.cc
@@ -0,0 +1,19 @@
+// Copyright (c) 2011 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.
+//
+// Unit test to verify basic operation of murmurhash3.
+
+#include "chrome/renderer/safe_browsing/murmurhash3_util.h"
+
+#include <string>
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace safe_browsing {
+
+TEST(MurmurHash3UtilTest, MurmurHash3String) {
+ EXPECT_EQ(893017187U, MurmurHash3String("abcd", 1234U));
+ EXPECT_EQ(3322282861U, MurmurHash3String("abcde", 56789U));
+}
+
+} // namespace safe_browsing
« no previous file with comments | « chrome/renderer/safe_browsing/murmurhash3_util.cc ('k') | chrome/renderer/safe_browsing/phishing_classifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698