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 14 matching lines...) Expand all Loading... |
25 #include "base/win/windows_version.h" | 25 #include "base/win/windows_version.h" |
26 #endif // OS_WIN | 26 #endif // OS_WIN |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 | 29 |
30 class ScreenOrientationBrowserTest : public ContentBrowserTest { | 30 class ScreenOrientationBrowserTest : public ContentBrowserTest { |
31 public: | 31 public: |
32 ScreenOrientationBrowserTest() { | 32 ScreenOrientationBrowserTest() { |
33 } | 33 } |
34 | 34 |
35 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 35 virtual void SetUpCommandLine(CommandLine* command_line) override { |
36 command_line->AppendSwitch( | 36 command_line->AppendSwitch( |
37 switches::kEnableExperimentalWebPlatformFeatures); | 37 switches::kEnableExperimentalWebPlatformFeatures); |
38 } | 38 } |
39 | 39 |
40 virtual void SetUp() OVERRIDE { | 40 virtual void SetUp() override { |
41 // Painting has to happen otherwise the Resize messages will be added on top | 41 // Painting has to happen otherwise the Resize messages will be added on top |
42 // of each other without properly ack-painting which will fail and crash. | 42 // of each other without properly ack-painting which will fail and crash. |
43 UseSoftwareCompositing(); | 43 UseSoftwareCompositing(); |
44 | 44 |
45 ContentBrowserTest::SetUp(); | 45 ContentBrowserTest::SetUp(); |
46 } | 46 } |
47 | 47 |
48 protected: | 48 protected: |
49 void SendFakeScreenOrientation(unsigned angle, const std::string& strType) { | 49 void SendFakeScreenOrientation(unsigned angle, const std::string& strType) { |
50 RenderWidgetHost* rwh = shell()->web_contents()->GetRenderWidgetHostView() | 50 RenderWidgetHost* rwh = shell()->web_contents()->GetRenderWidgetHostView() |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 #if defined(OS_ANDROID) | 209 #if defined(OS_ANDROID) |
210 "SecurityError"; // WebContents need to be fullscreen. | 210 "SecurityError"; // WebContents need to be fullscreen. |
211 #else | 211 #else |
212 "NotSupportedError"; // Locking isn't supported. | 212 "NotSupportedError"; // Locking isn't supported. |
213 #endif | 213 #endif |
214 | 214 |
215 EXPECT_EQ(expected, shell()->web_contents()->GetLastCommittedURL().ref()); | 215 EXPECT_EQ(expected, shell()->web_contents()->GetLastCommittedURL().ref()); |
216 } | 216 } |
217 | 217 |
218 } // namespace content | 218 } // namespace content |
OLD | NEW |