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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "content/browser/renderer_host/render_widget_host_impl.h" | 10 #include "content/browser/renderer_host/render_widget_host_impl.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 type = SCREEN_ORIENTATION_VALUES_LANDSCAPE_SECONDARY; | 48 type = SCREEN_ORIENTATION_VALUES_LANDSCAPE_SECONDARY; |
49 } | 49 } |
50 ASSERT_NE(SCREEN_ORIENTATION_VALUES_DEFAULT, type); | 50 ASSERT_NE(SCREEN_ORIENTATION_VALUES_DEFAULT, type); |
51 screen_info.orientation_type = type; | 51 screen_info.orientation_type = type; |
52 | 52 |
53 ResizeParams params; | 53 ResizeParams params; |
54 params.screen_info = screen_info; | 54 params.screen_info = screen_info; |
55 params.new_size = gfx::Size(0, 0); | 55 params.new_size = gfx::Size(0, 0); |
56 params.physical_backing_size = gfx::Size(300, 300); | 56 params.physical_backing_size = gfx::Size(300, 300); |
57 params.top_controls_height = 0.f; | 57 params.top_controls_height = 0.f; |
58 params.top_controls_shrink_blink_size = false; | 58 params.browser_controls_shrink_blink_size = false; |
59 params.is_fullscreen_granted = false; | 59 params.is_fullscreen_granted = false; |
60 rwh->Send(new ViewMsg_Resize(rwh->GetRoutingID(), params)); | 60 rwh->Send(new ViewMsg_Resize(rwh->GetRoutingID(), params)); |
61 } | 61 } |
62 | 62 |
63 int GetOrientationAngle() { | 63 int GetOrientationAngle() { |
64 int angle; | 64 int angle; |
65 ExecuteScriptAndGetValue(shell()->web_contents()->GetMainFrame(), | 65 ExecuteScriptAndGetValue(shell()->web_contents()->GetMainFrame(), |
66 "screen.orientation.angle")->GetAsInteger(&angle); | 66 "screen.orientation.angle")->GetAsInteger(&angle); |
67 return angle; | 67 return angle; |
68 } | 68 } |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 239 |
240 TestNavigationObserver navigation_observer(shell()->web_contents(), 1); | 240 TestNavigationObserver navigation_observer(shell()->web_contents(), 1); |
241 navigation_observer.Wait(); | 241 navigation_observer.Wait(); |
242 EXPECT_EQ("NotSupportedError", | 242 EXPECT_EQ("NotSupportedError", |
243 shell()->web_contents()->GetLastCommittedURL().ref()); | 243 shell()->web_contents()->GetLastCommittedURL().ref()); |
244 } | 244 } |
245 } | 245 } |
246 #endif // defined(OS_ANDROID) | 246 #endif // defined(OS_ANDROID) |
247 | 247 |
248 } // namespace content | 248 } // namespace content |
OLD | NEW |