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/browser/extensions/api/bookmarks/bookmark_api_helpers.h" | 5 #include "chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 11 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
12 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" | 12 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" |
13 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" | 13 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" |
14 #include "chrome/browser/extensions/api/bookmarks/bookmark_api_constants.h" | 14 #include "chrome/browser/extensions/api/bookmarks/bookmark_api_constants.h" |
15 #include "chrome/common/extensions/api/bookmarks.h" | 15 #include "chrome/common/extensions/api/bookmarks.h" |
16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
17 #include "components/bookmarks/browser/bookmark_model.h" | 17 #include "components/bookmarks/browser/bookmark_model.h" |
18 #include "components/bookmarks/test/bookmark_test_helpers.h" | 18 #include "components/bookmarks/test/bookmark_test_helpers.h" |
19 #include "content/public/test/test_browser_thread_bundle.h" | 19 #include "content/public/test/test_browser_thread_bundle.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 | 21 |
22 using bookmarks::BookmarkModel; | 22 using bookmarks::BookmarkModel; |
| 23 using bookmarks::BookmarkNode; |
23 | 24 |
24 namespace extensions { | 25 namespace extensions { |
25 | 26 |
26 namespace keys = bookmark_api_constants; | 27 namespace keys = bookmark_api_constants; |
27 using api::bookmarks::BookmarkTreeNode; | 28 using api::bookmarks::BookmarkTreeNode; |
28 | 29 |
29 namespace bookmark_api_helpers { | 30 namespace bookmark_api_helpers { |
30 | 31 |
31 class ExtensionBookmarksTest : public testing::Test { | 32 class ExtensionBookmarksTest : public testing::Test { |
32 public: | 33 public: |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 string_value.clear(); | 230 string_value.clear(); |
230 EXPECT_FALSE(dictionary_value->GetString("some_key1", &string_value)); | 231 EXPECT_FALSE(dictionary_value->GetString("some_key1", &string_value)); |
231 EXPECT_EQ("", string_value); | 232 EXPECT_EQ("", string_value); |
232 EXPECT_TRUE(dictionary_value->GetString("some_key2", &string_value)); | 233 EXPECT_TRUE(dictionary_value->GetString("some_key2", &string_value)); |
233 EXPECT_EQ("some_value2", string_value); | 234 EXPECT_EQ("some_value2", string_value); |
234 | 235 |
235 } | 236 } |
236 | 237 |
237 } // namespace bookmark_api_helpers | 238 } // namespace bookmark_api_helpers |
238 } // namespace extensions | 239 } // namespace extensions |
OLD | NEW |