| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/mac/scoped_nsobject.h" | 6 #include "base/mac/scoped_nsobject.h" |
| 7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/sync/glue/device_info.h" | 10 #include "chrome/browser/sync/glue/device_info.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 new syncer::SyncErrorFactoryMock)); | 81 new syncer::SyncErrorFactoryMock)); |
| 82 } | 82 } |
| 83 | 83 |
| 84 virtual scoped_ptr<browser_sync::DeviceInfo> GetLocalDeviceInfo() | 84 virtual scoped_ptr<browser_sync::DeviceInfo> GetLocalDeviceInfo() |
| 85 const OVERRIDE { | 85 const OVERRIDE { |
| 86 return scoped_ptr<browser_sync::DeviceInfo>( | 86 return scoped_ptr<browser_sync::DeviceInfo>( |
| 87 new browser_sync::DeviceInfo(GetLocalSyncCacheGUID(), | 87 new browser_sync::DeviceInfo(GetLocalSyncCacheGUID(), |
| 88 "Test Machine", | 88 "Test Machine", |
| 89 "Chromium 10k", | 89 "Chromium 10k", |
| 90 "Chrome 10k", | 90 "Chrome 10k", |
| 91 sync_pb::SyncEnums_DeviceType_TYPE_LINUX)); | 91 sync_pb::SyncEnums_DeviceType_TYPE_LINUX, |
| 92 "device_id")); |
| 92 } | 93 } |
| 93 | 94 |
| 94 virtual std::string GetLocalSyncCacheGUID() const OVERRIDE { | 95 virtual std::string GetLocalSyncCacheGUID() const OVERRIDE { |
| 95 return "WrenchMenuControllerTest"; | 96 return "WrenchMenuControllerTest"; |
| 96 } | 97 } |
| 97 | 98 |
| 98 void RegisterRecentTabs(RecentTabsBuilderTestHelper* helper) { | 99 void RegisterRecentTabs(RecentTabsBuilderTestHelper* helper) { |
| 99 helper->ExportToSessionsSyncManager(manager_.get()); | 100 helper->ExportToSessionsSyncManager(manager_.get()); |
| 100 } | 101 } |
| 101 | 102 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 } | 235 } |
| 235 | 236 |
| 236 // Verify that |RecentTabsMenuModelDelegate| is deleted before the model | 237 // Verify that |RecentTabsMenuModelDelegate| is deleted before the model |
| 237 // it's observing. | 238 // it's observing. |
| 238 TEST_F(WrenchMenuControllerTest, RecentTabDeleteOrder) { | 239 TEST_F(WrenchMenuControllerTest, RecentTabDeleteOrder) { |
| 239 [controller_ menuNeedsUpdate:[controller_ menu]]; | 240 [controller_ menuNeedsUpdate:[controller_ menu]]; |
| 240 // If the delete order is wrong then the test will crash on exit. | 241 // If the delete order is wrong then the test will crash on exit. |
| 241 } | 242 } |
| 242 | 243 |
| 243 } // namespace | 244 } // namespace |
| OLD | NEW |