OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/browsing_data/hosted_apps_counter.h" | 5 #include "chrome/browser/browsing_data/hosted_apps_counter.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/guid.h" | 13 #include "base/guid.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/test/base/testing_profile.h" | 15 #include "chrome/test/base/testing_profile.h" |
16 #include "components/browsing_data/browsing_data_utils.h" | 16 #include "components/browsing_data/core/browsing_data_utils.h" |
17 #include "components/browsing_data/pref_names.h" | 17 #include "components/browsing_data/core/pref_names.h" |
18 #include "components/crx_file/id_util.h" | 18 #include "components/crx_file/id_util.h" |
19 #include "components/prefs/pref_service.h" | 19 #include "components/prefs/pref_service.h" |
20 #include "extensions/browser/extension_registry.h" | 20 #include "extensions/browser/extension_registry.h" |
21 #include "extensions/common/extension_builder.h" | 21 #include "extensions/common/extension_builder.h" |
22 #include "extensions/common/value_builder.h" | 22 #include "extensions/common/value_builder.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 using extensions::DictionaryBuilder; | 27 using extensions::DictionaryBuilder; |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 EXPECT_EQ("App 2", GetExamples().back()); | 231 EXPECT_EQ("App 2", GetExamples().back()); |
232 | 232 |
233 AddHostedAppWithName("App 3"); | 233 AddHostedAppWithName("App 3"); |
234 counter.Restart(); | 234 counter.Restart(); |
235 EXPECT_EQ(2u, GetExamples().size()); | 235 EXPECT_EQ(2u, GetExamples().size()); |
236 EXPECT_EQ("App 1", GetExamples().front()); | 236 EXPECT_EQ("App 1", GetExamples().front()); |
237 EXPECT_EQ("App 2", GetExamples().back()); | 237 EXPECT_EQ("App 2", GetExamples().back()); |
238 } | 238 } |
239 | 239 |
240 } // namespace | 240 } // namespace |
OLD | NEW |