OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> |
| 6 |
5 #include <string> | 7 #include <string> |
6 #include <vector> | 8 #include <vector> |
7 | 9 |
8 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
9 #include "base/time/time.h" | 11 #include "base/time/time.h" |
10 #include "chrome/browser/safe_browsing/protocol_parser.h" | 12 #include "chrome/browser/safe_browsing/protocol_parser.h" |
11 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 13 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
13 | 15 |
14 namespace safe_browsing { | 16 namespace safe_browsing { |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 EXPECT_FALSE(chunks[0]->IsAdd()); | 695 EXPECT_FALSE(chunks[0]->IsAdd()); |
694 EXPECT_TRUE(chunks[0]->IsSub()); | 696 EXPECT_TRUE(chunks[0]->IsSub()); |
695 EXPECT_TRUE(chunks[2]->IsPrefix()); | 697 EXPECT_TRUE(chunks[2]->IsPrefix()); |
696 EXPECT_FALSE(chunks[2]->IsFullHash()); | 698 EXPECT_FALSE(chunks[2]->IsFullHash()); |
697 ASSERT_EQ(1U, chunks[2]->PrefixCount()); | 699 ASSERT_EQ(1U, chunks[2]->PrefixCount()); |
698 EXPECT_EQ(0x70707070U, chunks[2]->PrefixAt(0)); // pppp | 700 EXPECT_EQ(0x70707070U, chunks[2]->PrefixAt(0)); // pppp |
699 EXPECT_EQ(11, chunks[2]->AddChunkNumberAt(0)); | 701 EXPECT_EQ(11, chunks[2]->AddChunkNumberAt(0)); |
700 } | 702 } |
701 | 703 |
702 } // namespace safe_browsing | 704 } // namespace safe_browsing |
OLD | NEW |