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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/browser/renderer_host/render_widget_host_impl.h" | 8 #include "content/browser/renderer_host/render_widget_host_impl.h" |
9 #include "content/common/view_messages.h" | 9 #include "content/common/view_messages.h" |
10 #include "content/public/browser/render_widget_host.h" | 10 #include "content/public/browser/render_widget_host.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 angle = (angle + 90) % 360; | 173 angle = (angle + 90) % 360; |
174 SendFakeScreenOrientation(angle, "portrait-primary"); | 174 SendFakeScreenOrientation(angle, "portrait-primary"); |
175 | 175 |
176 TestNavigationObserver navigation_observer(shell()->web_contents(), 1); | 176 TestNavigationObserver navigation_observer(shell()->web_contents(), 1); |
177 navigation_observer.Wait(); | 177 navigation_observer.Wait(); |
178 EXPECT_EQ(angle == 270 ? -90 : angle, GetWindowOrientationAngle()); | 178 EXPECT_EQ(angle == 270 ? -90 : angle, GetWindowOrientationAngle()); |
179 } | 179 } |
180 } | 180 } |
181 | 181 |
182 // Chromium Android does not support fullscreen | 182 // Chromium Android does not support fullscreen |
183 IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest, LockSmoke) { | 183 IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest, DISABLED_LockSmoke) { |
184 GURL test_url = GetTestUrl("screen_orientation", | 184 GURL test_url = GetTestUrl("screen_orientation", |
185 "screen_orientation_lock_smoke.html"); | 185 "screen_orientation_lock_smoke.html"); |
186 | 186 |
187 TestNavigationObserver navigation_observer(shell()->web_contents(), 2); | 187 TestNavigationObserver navigation_observer(shell()->web_contents(), 2); |
188 shell()->LoadURL(test_url); | 188 shell()->LoadURL(test_url); |
189 | 189 |
190 #if defined(OS_WIN) | 190 #if defined(OS_WIN) |
191 // Screen Orientation is currently disabled on Windows 8. | 191 // Screen Orientation is currently disabled on Windows 8. |
192 // This test will break, requiring an update when the API will be enabled. | 192 // This test will break, requiring an update when the API will be enabled. |
193 if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8) { | 193 if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } | 231 } |
232 #endif // defined(OS_WIN) | 232 #endif // defined(OS_WIN) |
233 | 233 |
234 navigation_observer.Wait(); | 234 navigation_observer.Wait(); |
235 | 235 |
236 // This is a success if the renderer process did not crash, thus, we end up | 236 // This is a success if the renderer process did not crash, thus, we end up |
237 // here. | 237 // here. |
238 } | 238 } |
239 | 239 |
240 } // namespace content | 240 } // namespace content |
OLD | NEW |