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

Side by Side Diff: content/browser/media/capture/web_contents_video_capture_device_unittest.cc

Issue 1957523004: Rename gfx::test::TestScreen to display::test::TestScreen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « chrome/test/BUILD.gn ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/media/capture/web_contents_video_capture_device.h" 5 #include "content/browser/media/capture/web_contents_video_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 26 matching lines...) Expand all
37 #include "media/base/video_frame.h" 37 #include "media/base/video_frame.h"
38 #include "media/base/video_util.h" 38 #include "media/base/video_util.h"
39 #include "media/base/yuv_convert.h" 39 #include "media/base/yuv_convert.h"
40 #include "skia/ext/platform_canvas.h" 40 #include "skia/ext/platform_canvas.h"
41 #include "testing/gmock/include/gmock/gmock.h" 41 #include "testing/gmock/include/gmock/gmock.h"
42 #include "testing/gtest/include/gtest/gtest.h" 42 #include "testing/gtest/include/gtest/gtest.h"
43 #include "third_party/skia/include/core/SkColor.h" 43 #include "third_party/skia/include/core/SkColor.h"
44 #include "ui/base/layout.h" 44 #include "ui/base/layout.h"
45 #include "ui/display/display.h" 45 #include "ui/display/display.h"
46 #include "ui/display/screen.h" 46 #include "ui/display/screen.h"
47 #include "ui/display/test/test_screen.h"
47 #include "ui/gfx/geometry/dip_util.h" 48 #include "ui/gfx/geometry/dip_util.h"
48 #include "ui/gfx/geometry/size_conversions.h" 49 #include "ui/gfx/geometry/size_conversions.h"
49 #include "ui/gfx/test/test_screen.h"
50 50
51 namespace content { 51 namespace content {
52 namespace { 52 namespace {
53 53
54 const int kTestWidth = 320; 54 const int kTestWidth = 320;
55 const int kTestHeight = 240; 55 const int kTestHeight = 240;
56 const int kTestFramesPerSecond = 20; 56 const int kTestFramesPerSecond = 20;
57 const float kTestDeviceScaleFactor = 2.0f; 57 const float kTestDeviceScaleFactor = 2.0f;
58 const SkColor kNothingYet = 0xdeadbeef; 58 const SkColor kNothingYet = 0xdeadbeef;
59 const SkColor kNotInterested = ~kNothingYet; 59 const SkColor kNotInterested = ~kNothingYet;
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 base::Unretained(device_.get()))); 760 base::Unretained(device_.get())));
761 } 761 }
762 762
763 void DestroyVideoCaptureDevice() { device_.reset(); } 763 void DestroyVideoCaptureDevice() { device_.reset(); }
764 764
765 StubClientObserver* client_observer() { 765 StubClientObserver* client_observer() {
766 return &client_observer_; 766 return &client_observer_;
767 } 767 }
768 768
769 private: 769 private:
770 gfx::test::TestScreen test_screen_; 770 display::test::TestScreen test_screen_;
771 771
772 StubClientObserver client_observer_; 772 StubClientObserver client_observer_;
773 773
774 // The controller controls which pixel patterns to produce. 774 // The controller controls which pixel patterns to produce.
775 CaptureTestSourceController controller_; 775 CaptureTestSourceController controller_;
776 776
777 // Self-registering RenderProcessHostFactory. 777 // Self-registering RenderProcessHostFactory.
778 std::unique_ptr<MockRenderProcessHostFactory> render_process_host_factory_; 778 std::unique_ptr<MockRenderProcessHostFactory> render_process_host_factory_;
779 779
780 // Creates capture-capable RenderViewHosts whose pixel content production is 780 // Creates capture-capable RenderViewHosts whose pixel content production is
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 for (int i = 0; i < 3; ++i) { 1218 for (int i = 0; i < 3; ++i) {
1219 SimulateRefreshFrameRequest(); 1219 SimulateRefreshFrameRequest();
1220 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); 1220 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN));
1221 } 1221 }
1222 1222
1223 device()->StopAndDeAllocate(); 1223 device()->StopAndDeAllocate();
1224 } 1224 }
1225 1225
1226 } // namespace 1226 } // namespace
1227 } // namespace content 1227 } // namespace content
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698