OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "remoting/host/differ.h" | 6 #include "remoting/capturer/differ.h" |
7 #include "remoting/host/differ_block.h" | 7 #include "remoting/capturer/differ_block.h" |
8 #include "testing/gmock/include/gmock/gmock.h" | 8 #include "testing/gmock/include/gmock/gmock.h" |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
11 | 11 |
12 // 96x96 screen gives a 4x4 grid of blocks. | 12 // 96x96 screen gives a 4x4 grid of blocks. |
13 const int kScreenWidth= 96; | 13 const int kScreenWidth= 96; |
14 const int kScreenHeight = 96; | 14 const int kScreenHeight = 96; |
15 | 15 |
16 // To test partial blocks, we need a width and height that are not multiples | 16 // To test partial blocks, we need a width and height that are not multiples |
17 // of 16 (or 32, depending on current block size). | 17 // of 16 (or 32, depending on current block size). |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 | 630 |
631 dirty.setEmpty(); | 631 dirty.setEmpty(); |
632 MergeBlocks(&dirty); | 632 MergeBlocks(&dirty); |
633 | 633 |
634 ASSERT_EQ(2, RegionRectCount(dirty)); | 634 ASSERT_EQ(2, RegionRectCount(dirty)); |
635 ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 0, 2, 2)); | 635 ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 0, 2, 2)); |
636 ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 1, 2, 1, 1)); | 636 ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 1, 2, 1, 1)); |
637 } | 637 } |
638 | 638 |
639 } // namespace remoting | 639 } // namespace remoting |
OLD | NEW |