Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: components/storage_monitor/image_capture_device_manager_unittest.mm

Issue 826213004: Update {virtual,override,final} for components/ to follow C++11 style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #import <Foundation/Foundation.h> 5 #import <Foundation/Foundation.h>
6 #import <ImageCaptureCore/ImageCaptureCore.h> 6 #import <ImageCaptureCore/ImageCaptureCore.h>
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 private: 233 private:
234 std::vector<std::string> items_; 234 std::vector<std::string> items_;
235 std::vector<std::string> downloads_; 235 std::vector<std::string> downloads_;
236 bool completed_; 236 bool completed_;
237 bool removed_; 237 bool removed_;
238 base::File::Error last_error_; 238 base::File::Error last_error_;
239 }; 239 };
240 240
241 class ImageCaptureDeviceManagerTest : public testing::Test { 241 class ImageCaptureDeviceManagerTest : public testing::Test {
242 public: 242 public:
243 virtual void SetUp() override { 243 void SetUp() override { monitor_ = TestStorageMonitor::CreateAndInstall(); }
244 monitor_ = TestStorageMonitor::CreateAndInstall();
245 }
246 244
247 virtual void TearDown() override { 245 void TearDown() override { TestStorageMonitor::Destroy(); }
248 TestStorageMonitor::Destroy();
249 }
250 246
251 MockICCameraDevice* AttachDevice(ImageCaptureDeviceManager* manager) { 247 MockICCameraDevice* AttachDevice(ImageCaptureDeviceManager* manager) {
252 // Ownership will be passed to the device browser delegate. 248 // Ownership will be passed to the device browser delegate.
253 base::scoped_nsobject<MockICCameraDevice> device( 249 base::scoped_nsobject<MockICCameraDevice> device(
254 [[MockICCameraDevice alloc] init]); 250 [[MockICCameraDevice alloc] init]);
255 id<ICDeviceBrowserDelegate> delegate = manager->device_browser(); 251 id<ICDeviceBrowserDelegate> delegate = manager->device_browser();
256 [delegate deviceBrowser:nil didAddDevice:device moreComing:NO]; 252 [delegate deviceBrowser:nil didAddDevice:device moreComing:NO];
257 return device.autorelease(); 253 return device.autorelease();
258 } 254 }
259 255
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 char file_contents[5]; 409 char file_contents[5];
414 ASSERT_EQ(4, base::ReadFile(temp_file, file_contents, 410 ASSERT_EQ(4, base::ReadFile(temp_file, file_contents,
415 strlen(kTestFileContents))); 411 strlen(kTestFileContents)));
416 EXPECT_EQ(kTestFileContents, 412 EXPECT_EQ(kTestFileContents,
417 std::string(file_contents, strlen(kTestFileContents))); 413 std::string(file_contents, strlen(kTestFileContents)));
418 414
419 [camera didRemoveDevice:device]; 415 [camera didRemoveDevice:device];
420 } 416 }
421 417
422 } // namespace storage_monitor 418 } // namespace storage_monitor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698