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

Side by Side Diff: webrtc/modules/desktop_capture/differ_block_unittest.cc

Issue 1477013005: Replace RefCountImpl with rtc::RefCountedObject. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add back explicit Release()s in test Created 4 years, 9 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 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "webrtc/modules/desktop_capture/differ_block.h" 12 #include "webrtc/modules/desktop_capture/differ_block.h"
13 #include "webrtc/system_wrappers/include/ref_count.h"
14 13
15 namespace webrtc { 14 namespace webrtc {
16 15
17 // Run 900 times to mimic 1280x720. 16 // Run 900 times to mimic 1280x720.
18 // TODO(fbarchard): Remove benchmark once performance is non-issue. 17 // TODO(fbarchard): Remove benchmark once performance is non-issue.
19 static const int kTimesToRun = 900; 18 static const int kTimesToRun = 900;
20 19
21 static void GenerateData(uint8_t* data, int size) { 20 static void GenerateData(uint8_t* data, int size) {
22 for (int i = 0; i < size; ++i) { 21 for (int i = 0; i < size; ++i) {
23 data[i] = i; 22 data[i] = i;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 PrepareBuffers(block1, block2); 77 PrepareBuffers(block1, block2);
79 block2[0] += 1; 78 block2[0] += 1;
80 79
81 for (int i = 0; i < kTimesToRun; ++i) { 80 for (int i = 0; i < kTimesToRun; ++i) {
82 int result = BlockDifference(block1, block2, kBlockSize * kBytesPerPixel); 81 int result = BlockDifference(block1, block2, kBlockSize * kBytesPerPixel);
83 EXPECT_EQ(1, result); 82 EXPECT_EQ(1, result);
84 } 83 }
85 } 84 }
86 85
87 } // namespace webrtc 86 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/test/audio_device_test_api.cc ('k') | webrtc/modules/rtp_rtcp/source/forward_error_correction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698