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

Side by Side Diff: chrome/browser/safe_browsing/prefix_set_unittest.cc

Issue 7048007: Move scoped_temp_dir and scoped_native_library back from base/memory to base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unknwn Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/safe_browsing/prefix_set.h" 5 #include "chrome/browser/safe_browsing/prefix_set.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/md5.h" 11 #include "base/md5.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/scoped_temp_dir.h"
14 #include "base/rand_util.h" 13 #include "base/rand_util.h"
14 #include "base/scoped_temp_dir.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "testing/platform_test.h" 16 #include "testing/platform_test.h"
17 17
18 namespace { 18 namespace {
19 19
20 class PrefixSetTest : public PlatformTest { 20 class PrefixSetTest : public PlatformTest {
21 protected: 21 protected:
22 // Constants for the v1 format. 22 // Constants for the v1 format.
23 static const size_t kMagicOffset = 0 * sizeof(uint32); 23 static const size_t kMagicOffset = 0 * sizeof(uint32);
24 static const size_t kVersionOffset = 1 * sizeof(uint32); 24 static const size_t kVersionOffset = 1 * sizeof(uint32);
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 if (delta > 0xFFFF) { 447 if (delta > 0xFFFF) {
448 EXPECT_FALSE(prefix_set.IsDeltaAt(i)); 448 EXPECT_FALSE(prefix_set.IsDeltaAt(i));
449 } else { 449 } else {
450 ASSERT_TRUE(prefix_set.IsDeltaAt(i)); 450 ASSERT_TRUE(prefix_set.IsDeltaAt(i));
451 EXPECT_EQ(delta, prefix_set.DeltaAt(i)); 451 EXPECT_EQ(delta, prefix_set.DeltaAt(i));
452 } 452 }
453 } 453 }
454 } 454 }
455 455
456 } // namespace 456 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698