OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/extensions/api/image_writer_private/write_from_url_oper
ation.h" | 5 #include "chrome/browser/extensions/api/image_writer_private/write_from_url_oper
ation.h" |
6 | 6 |
7 #include "base/task_scheduler/post_task.h" | 7 #include "base/task_scheduler/post_task.h" |
8 #include "chrome/browser/extensions/api/image_writer_private/error_messages.h" | 8 #include "chrome/browser/extensions/api/image_writer_private/error_messages.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/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 | 62 |
63 // Helpers to set-up state for intermediate stages. | 63 // Helpers to set-up state for intermediate stages. |
64 void SetImagePath(const base::FilePath image_path) { | 64 void SetImagePath(const base::FilePath image_path) { |
65 image_path_ = image_path; | 65 image_path_ = image_path; |
66 } | 66 } |
67 | 67 |
68 base::FilePath GetImagePath() { return image_path_; } | 68 base::FilePath GetImagePath() { return image_path_; } |
69 | 69 |
70 private: | 70 private: |
71 ~OperationForTest() override{}; | 71 ~OperationForTest() override {} |
72 }; | 72 }; |
73 | 73 |
74 class ImageWriterWriteFromUrlOperationTest : public ImageWriterUnitTestBase { | 74 class ImageWriterWriteFromUrlOperationTest : public ImageWriterUnitTestBase { |
75 protected: | 75 protected: |
76 ImageWriterWriteFromUrlOperationTest() : manager_(&test_profile_) {} | 76 ImageWriterWriteFromUrlOperationTest() : manager_(&test_profile_) {} |
77 | 77 |
78 void SetUp() override { | 78 void SetUp() override { |
79 ImageWriterUnitTestBase::SetUp(); | 79 ImageWriterUnitTestBase::SetUp(); |
80 | 80 |
81 // Turn on interception and set up our dummy file. | 81 // Turn on interception and set up our dummy file. |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 base::RunLoop().RunUntilIdle(); | 208 base::RunLoop().RunUntilIdle(); |
209 | 209 |
210 operation->Cancel(); | 210 operation->Cancel(); |
211 } | 211 } |
212 | 212 |
213 } // namespace | 213 } // namespace |
214 | 214 |
215 } // namespace image_writer | 215 } // namespace image_writer |
216 } // namespace extensions | 216 } // namespace extensions |
OLD | NEW |