| 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 "content/browser/renderer_host/render_widget_host_view_base.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 6 | 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" | 8 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" |
| 9 #include "ui/gfx/display.h" | 9 #include "ui/gfx/display.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 gfx::Display CreateDisplay(int width, int height, int angle) { | 15 gfx::Display CreateDisplay(int width, int height, int angle) { |
| 16 gfx::Display display; | 16 gfx::Display display; |
| 17 display.SetRotationAsDegree(angle); | 17 display.SetRotationAsDegree(angle); |
| 18 display.set_bounds(gfx::Rect(width, height)); | 18 display.set_bounds(gfx::Rect(width, height)); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 RenderWidgetHostViewBase::GetOrientationTypeForDesktop(display); | 115 RenderWidgetHostViewBase::GetOrientationTypeForDesktop(display); |
| 116 EXPECT_TRUE(portrait_2 == blink::WebScreenOrientationPortraitPrimary || | 116 EXPECT_TRUE(portrait_2 == blink::WebScreenOrientationPortraitPrimary || |
| 117 portrait_2 == blink::WebScreenOrientationPortraitSecondary); | 117 portrait_2 == blink::WebScreenOrientationPortraitSecondary); |
| 118 | 118 |
| 119 EXPECT_NE(portrait_1, portrait_2); | 119 EXPECT_NE(portrait_1, portrait_2); |
| 120 | 120 |
| 121 } | 121 } |
| 122 } | 122 } |
| 123 | 123 |
| 124 } // namespace content | 124 } // namespace content |
| OLD | NEW |