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 "chrome/browser/chromeos/login/user_manager.h" | 6 #include "chrome/browser/chromeos/login/user_manager.h" |
7 #include "chrome/browser/extensions/api/image_writer_private/error_messages.h" | 7 #include "chrome/browser/extensions/api/image_writer_private/error_messages.h" |
8 #include "chrome/browser/extensions/api/image_writer_private/operation_manager.h
" | 8 #include "chrome/browser/extensions/api/image_writer_private/operation_manager.h
" |
9 #include "chrome/browser/extensions/api/image_writer_private/test_utils.h" | 9 #include "chrome/browser/extensions/api/image_writer_private/test_utils.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 virtual EventRouter* event_router() OVERRIDE { | 46 virtual EventRouter* event_router() OVERRIDE { |
47 return fake_event_router_.get(); | 47 return fake_event_router_.get(); |
48 } | 48 } |
49 | 49 |
50 private: | 50 private: |
51 scoped_ptr<FakeEventRouter> fake_event_router_; | 51 scoped_ptr<FakeEventRouter> fake_event_router_; |
52 }; | 52 }; |
53 | 53 |
54 // Factory function to register for the ExtensionSystem. | 54 // Factory function to register for the ExtensionSystem. |
55 BrowserContextKeyedService* BuildFakeExtensionSystem( | 55 KeyedService* BuildFakeExtensionSystem(content::BrowserContext* profile) { |
56 content::BrowserContext* profile) { | |
57 return new FakeExtensionSystem(static_cast<Profile*>(profile)); | 56 return new FakeExtensionSystem(static_cast<Profile*>(profile)); |
58 } | 57 } |
59 | 58 |
60 namespace { | 59 namespace { |
61 | 60 |
62 class ImageWriterOperationManagerTest | 61 class ImageWriterOperationManagerTest |
63 : public ImageWriterUnitTestBase { | 62 : public ImageWriterUnitTestBase { |
64 public: | 63 public: |
65 void StartCallback(bool success, const std::string& error) { | 64 void StartCallback(bool success, const std::string& error) { |
66 started_ = true; | 65 started_ = true; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 EXPECT_TRUE(cancelled_); | 154 EXPECT_TRUE(cancelled_); |
156 EXPECT_TRUE(cancel_success_); | 155 EXPECT_TRUE(cancel_success_); |
157 EXPECT_EQ("", cancel_error_); | 156 EXPECT_EQ("", cancel_error_); |
158 | 157 |
159 base::RunLoop().RunUntilIdle(); | 158 base::RunLoop().RunUntilIdle(); |
160 } | 159 } |
161 | 160 |
162 } // namespace | 161 } // namespace |
163 } // namespace image_writer | 162 } // namespace image_writer |
164 } // namespace extensions | 163 } // namespace extensions |
OLD | NEW |