| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/storage/durable_storage_permission_context.h" | 5 #include "chrome/browser/storage/durable_storage_permission_context.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 9 |
| 9 using bookmarks::BookmarkModel; | 10 using bookmarks::BookmarkModel; |
| 10 | 11 |
| 11 class BookmarksOriginTest : public ::testing::Test { | 12 class BookmarksOriginTest : public ::testing::Test { |
| 12 protected: | 13 protected: |
| 13 static std::vector<BookmarkModel::URLAndTitle> MakeBookmarks( | 14 static std::vector<BookmarkModel::URLAndTitle> MakeBookmarks( |
| 14 const std::string urls[], | 15 const std::string urls[], |
| 15 const int array_size) { | 16 const int array_size) { |
| 16 std::vector<BookmarkModel::URLAndTitle> bookmarks; | 17 std::vector<BookmarkModel::URLAndTitle> bookmarks; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 41 std::string urls[] = { | 42 std::string urls[] = { |
| 42 "http://www.google.com/", | 43 "http://www.google.com/", |
| 43 "https://www.google.com/", | 44 "https://www.google.com/", |
| 44 }; | 45 }; |
| 45 std::vector<BookmarkModel::URLAndTitle> bookmarks = | 46 std::vector<BookmarkModel::URLAndTitle> bookmarks = |
| 46 MakeBookmarks(urls, arraysize(urls)); | 47 MakeBookmarks(urls, arraysize(urls)); |
| 47 GURL looking_for("https://dogs.com"); | 48 GURL looking_for("https://dogs.com"); |
| 48 EXPECT_FALSE(DurableStoragePermissionContext::IsOriginBookmarked( | 49 EXPECT_FALSE(DurableStoragePermissionContext::IsOriginBookmarked( |
| 49 bookmarks, looking_for)); | 50 bookmarks, looking_for)); |
| 50 } | 51 } |
| OLD | NEW |