OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/prefs/pref_service_factory.h" | 10 #include "base/prefs/pref_service_factory.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 } | 55 } |
56 | 56 |
57 virtual bool IsAppListVisible() const OVERRIDE { | 57 virtual bool IsAppListVisible() const OVERRIDE { |
58 return !!showing_for_profile_; | 58 return !!showing_for_profile_; |
59 } | 59 } |
60 | 60 |
61 virtual gfx::NativeWindow GetAppListWindow() OVERRIDE { | 61 virtual gfx::NativeWindow GetAppListWindow() OVERRIDE { |
62 return NULL; | 62 return NULL; |
63 } | 63 } |
64 | 64 |
| 65 virtual app_list::AppListView* GetAppListView() OVERRIDE { return NULL; } |
| 66 |
65 virtual AppListControllerDelegate* GetControllerDelegate() OVERRIDE { | 67 virtual AppListControllerDelegate* GetControllerDelegate() OVERRIDE { |
66 return NULL; | 68 return NULL; |
67 } | 69 } |
68 | 70 |
69 private: | 71 private: |
70 Profile* showing_for_profile_; | 72 Profile* showing_for_profile_; |
71 }; | 73 }; |
72 | 74 |
73 class AppListServiceUnitTest : public testing::Test { | 75 class AppListServiceUnitTest : public testing::Test { |
74 public: | 76 public: |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 EXPECT_EQ(AppListService::ENABLE_FOR_APP_INSTALL, | 226 EXPECT_EQ(AppListService::ENABLE_FOR_APP_INSTALL, |
225 local_state_->GetInteger(prefs::kAppListEnableMethod)); | 227 local_state_->GetInteger(prefs::kAppListEnableMethod)); |
226 EXPECT_NE(0, local_state_->GetInt64(prefs::kAppListEnableTime)); | 228 EXPECT_NE(0, local_state_->GetInt64(prefs::kAppListEnableTime)); |
227 | 229 |
228 // An auto-show here should update the enable method to prevent recording it | 230 // An auto-show here should update the enable method to prevent recording it |
229 // as ENABLE_FOR_APP_INSTALL. | 231 // as ENABLE_FOR_APP_INSTALL. |
230 service_->AutoShowForProfile(profile1_.get()); | 232 service_->AutoShowForProfile(profile1_.get()); |
231 EXPECT_EQ(AppListService::ENABLE_SHOWN_UNDISCOVERED, | 233 EXPECT_EQ(AppListService::ENABLE_SHOWN_UNDISCOVERED, |
232 local_state_->GetInteger(prefs::kAppListEnableMethod)); | 234 local_state_->GetInteger(prefs::kAppListEnableMethod)); |
233 } | 235 } |
OLD | NEW |