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/profile_sync_service_factory.h" | 10 #include "chrome/browser/sync/profile_sync_service_factory.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // seems that the vector of observers is getting hosed somewhere between | 43 // seems that the vector of observers is getting hosed somewhere between |
44 // |-[ToolbarController dealloc]| and ~MockWrenchMenuModel(). This line | 44 // |-[ToolbarController dealloc]| and ~MockWrenchMenuModel(). This line |
45 // short-circuits the parent destructor to avoid this crash. | 45 // short-circuits the parent destructor to avoid this crash. |
46 tab_strip_model_ = NULL; | 46 tab_strip_model_ = NULL; |
47 } | 47 } |
48 MOCK_METHOD2(ExecuteCommand, void(int command_id, int event_flags)); | 48 MOCK_METHOD2(ExecuteCommand, void(int command_id, int event_flags)); |
49 }; | 49 }; |
50 | 50 |
51 class DummyRouter : public browser_sync::LocalSessionEventRouter { | 51 class DummyRouter : public browser_sync::LocalSessionEventRouter { |
52 public: | 52 public: |
53 virtual ~DummyRouter() {} | 53 ~DummyRouter() override {} |
54 virtual void StartRoutingTo( | 54 void StartRoutingTo( |
55 browser_sync::LocalSessionEventHandler* handler) override {} | 55 browser_sync::LocalSessionEventHandler* handler) override {} |
56 virtual void Stop() override {} | 56 void Stop() override {} |
57 }; | 57 }; |
58 | 58 |
59 class WrenchMenuControllerTest | 59 class WrenchMenuControllerTest |
60 : public CocoaProfileTest { | 60 : public CocoaProfileTest { |
61 public: | 61 public: |
62 WrenchMenuControllerTest() | 62 WrenchMenuControllerTest() |
63 : local_device_(new sync_driver::LocalDeviceInfoProviderMock( | 63 : local_device_(new sync_driver::LocalDeviceInfoProviderMock( |
64 "WrenchMenuControllerTest", | 64 "WrenchMenuControllerTest", |
65 "Test Machine", | 65 "Test Machine", |
66 "Chromium 10k", | 66 "Chromium 10k", |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 | 233 |
234 // Verify that |RecentTabsMenuModelDelegate| is deleted before the model | 234 // Verify that |RecentTabsMenuModelDelegate| is deleted before the model |
235 // it's observing. | 235 // it's observing. |
236 TEST_F(WrenchMenuControllerTest, RecentTabDeleteOrder) { | 236 TEST_F(WrenchMenuControllerTest, RecentTabDeleteOrder) { |
237 [controller_ menuNeedsUpdate:[controller_ menu]]; | 237 [controller_ menuNeedsUpdate:[controller_ menu]]; |
238 // If the delete order is wrong then the test will crash on exit. | 238 // If the delete order is wrong then the test will crash on exit. |
239 } | 239 } |
240 | 240 |
241 } // namespace | 241 } // namespace |
OLD | NEW |