| 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 "chrome/renderer/safe_browsing/phishing_url_feature_extractor.h" | 5 #include "components/safe_browsing/renderer/phishing_url_feature_extractor.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 #include "chrome/renderer/safe_browsing/features.h" | 9 #include "components/safe_browsing/renderer/features.h" |
| 10 #include "chrome/renderer/safe_browsing/test_utils.h" | 10 #include "components/safe_browsing/renderer/test_utils.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 using ::testing::ElementsAre; | 15 using ::testing::ElementsAre; |
| 16 | 16 |
| 17 namespace safe_browsing { | 17 namespace safe_browsing { |
| 18 | 18 |
| 19 class PhishingUrlFeatureExtractorTest : public ::testing::Test { | 19 class PhishingUrlFeatureExtractorTest : public ::testing::Test { |
| 20 protected: | 20 protected: |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 EXPECT_THAT(long_tokens, | 120 EXPECT_THAT(long_tokens, |
| 121 ElementsAre("This", "pretty", "unusual", "path", "indeed")); | 121 ElementsAre("This", "pretty", "unusual", "path", "indeed")); |
| 122 | 122 |
| 123 long_tokens.clear(); | 123 long_tokens.clear(); |
| 124 full = "...i-am_re/al&ly\\b,r,o|k=e:n///up%20"; | 124 full = "...i-am_re/al&ly\\b,r,o|k=e:n///up%20"; |
| 125 SplitStringIntoLongAlphanumTokens(full, &long_tokens); | 125 SplitStringIntoLongAlphanumTokens(full, &long_tokens); |
| 126 EXPECT_THAT(long_tokens, ElementsAre()); | 126 EXPECT_THAT(long_tokens, ElementsAre()); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace safe_browsing | 129 } // namespace safe_browsing |
| OLD | NEW |