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/test/base/in_process_browser_test.h" | 5 #include "chrome/test/base/in_process_browser_test.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 FilePath()); | 228 FilePath()); |
229 | 229 |
230 const extensions::Extension* extension = InstallExtension(path_v1_, 1); | 230 const extensions::Extension* extension = InstallExtension(path_v1_, 1); |
231 | 231 |
232 std::vector<ExtensionBasicInfo> extension_infos; | 232 std::vector<ExtensionBasicInfo> extension_infos; |
233 extension_infos.push_back(ExtensionBasicInfo(extension)); | 233 extension_infos.push_back(ExtensionBasicInfo(extension)); |
234 | 234 |
235 ExtensionService* extension_service = | 235 ExtensionService* extension_service = |
236 browser()->profile()->GetExtensionService(); | 236 browser()->profile()->GetExtensionService(); |
237 | 237 |
238 CrxInstaller* crx_installer = NULL; | 238 extensions::CrxInstaller* crx_installer = NULL; |
239 | 239 |
240 // Create an observer to wait for the update to finish. | 240 // Create an observer to wait for the update to finish. |
241 ui_test_utils::WindowedNotificationObserver windowed_observer( | 241 ui_test_utils::WindowedNotificationObserver windowed_observer( |
242 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 242 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
243 content::Source<CrxInstaller>(crx_installer)); | 243 content::Source<extensions::CrxInstaller>(crx_installer)); |
244 ASSERT_TRUE(extension_service-> | 244 ASSERT_TRUE(extension_service-> |
245 UpdateExtension(extension->id(), path_v2_, GURL(), &crx_installer)); | 245 UpdateExtension(extension->id(), path_v2_, GURL(), &crx_installer)); |
246 windowed_observer.Wait(); | 246 windowed_observer.Wait(); |
247 | 247 |
248 extension = extension_service->GetExtensionById( | 248 extension = extension_service->GetExtensionById( |
249 extension_infos[0].id, false); // don't include disabled extensions. | 249 extension_infos[0].id, false); // don't include disabled extensions. |
250 | 250 |
251 // The total series of events for this process will be: | 251 // The total series of events for this process will be: |
252 // Extension Install - install version 1 | 252 // Extension Install - install version 1 |
253 // Extension Install - install version 2 | 253 // Extension Install - install version 2 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 std::string previous_version; | 305 std::string previous_version; |
306 std::string current_version; | 306 std::string current_version; |
307 | 307 |
308 ASSERT_TRUE(value->GetString("previousVersion", &previous_version)); | 308 ASSERT_TRUE(value->GetString("previousVersion", &previous_version)); |
309 ASSERT_EQ(kOldVersion, previous_version); | 309 ASSERT_EQ(kOldVersion, previous_version); |
310 ASSERT_TRUE(value->GetString("currentVersion", ¤t_version)); | 310 ASSERT_TRUE(value->GetString("currentVersion", ¤t_version)); |
311 ASSERT_EQ(version_string, current_version); | 311 ASSERT_EQ(version_string, current_version); |
312 } | 312 } |
313 | 313 |
314 } // namespace performance_monitor | 314 } // namespace performance_monitor |
OLD | NEW |