OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 private: | 157 private: |
158 DISALLOW_COPY_AND_ASSIGN(PreferencesPrivateApiTest); | 158 DISALLOW_COPY_AND_ASSIGN(PreferencesPrivateApiTest); |
159 }; | 159 }; |
160 | 160 |
161 void | 161 void |
162 PreferencesPrivateApiTest::TestGetSyncCategoriesWithoutPassphraseFunction() { | 162 PreferencesPrivateApiTest::TestGetSyncCategoriesWithoutPassphraseFunction() { |
163 scoped_refptr<PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction> | 163 scoped_refptr<PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction> |
164 function( | 164 function( |
165 new PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction); | 165 new PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction); |
166 ASSERT_TRUE(extension_function_test_utils::RunFunction( | 166 ASSERT_TRUE(extension_function_test_utils::RunFunction( |
167 function, | 167 function.get(), "[]", browser_, extension_function_test_utils::NONE)); |
168 "[]", | |
169 browser_, | |
170 extension_function_test_utils::NONE)); | |
171 EXPECT_FALSE(service_->initialized_state_violation()); | 168 EXPECT_FALSE(service_->initialized_state_violation()); |
172 | 169 |
173 const base::ListValue* result = function->GetResultList(); | 170 const base::ListValue* result = function->GetResultList(); |
174 EXPECT_EQ(1u, result->GetSize()); | 171 EXPECT_EQ(1u, result->GetSize()); |
175 | 172 |
176 const base::ListValue* categories = NULL; | 173 const base::ListValue* categories = NULL; |
177 ASSERT_TRUE(result->GetList(0, &categories)); | 174 ASSERT_TRUE(result->GetList(0, &categories)); |
178 EXPECT_NE(categories->end(), | 175 EXPECT_NE(categories->end(), |
179 categories->Find(base::StringValue(bookmarks::kBookmarksFileName))); | 176 categories->Find(base::StringValue(bookmarks::kBookmarksFileName))); |
180 EXPECT_NE(categories->end(), | 177 EXPECT_NE(categories->end(), |
(...skipping 13 matching lines...) Expand all Loading... |
194 | 191 |
195 // Verifies that we wait for the sync service to be ready before checking | 192 // Verifies that we wait for the sync service to be ready before checking |
196 // encryption status. | 193 // encryption status. |
197 IN_PROC_BROWSER_TEST_F(PreferencesPrivateApiTest, | 194 IN_PROC_BROWSER_TEST_F(PreferencesPrivateApiTest, |
198 GetSyncCategoriesWithoutPassphraseAsynchronous) { | 195 GetSyncCategoriesWithoutPassphraseAsynchronous) { |
199 service_->set_sync_initialized(false); | 196 service_->set_sync_initialized(false); |
200 TestGetSyncCategoriesWithoutPassphraseFunction(); | 197 TestGetSyncCategoriesWithoutPassphraseFunction(); |
201 } | 198 } |
202 | 199 |
203 } // namespace | 200 } // namespace |
OLD | NEW |