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

Side by Side Diff: content/browser/screen_orientation/screen_orientation_browsertest.cc

Issue 1227163004: Revert of Re-enable ScreenOrientationBrowserTests on Chrome OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 private: 102 private:
103 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationBrowserTest); 103 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationBrowserTest);
104 }; 104 };
105 105
106 // This test doesn't work on MacOS X but the reason is mostly because it is not 106 // This test doesn't work on MacOS X but the reason is mostly because it is not
107 // used Aura. It could be set as !defined(OS_MACOSX) but the rule below will 107 // used Aura. It could be set as !defined(OS_MACOSX) but the rule below will
108 // actually support MacOS X if and when it switches to Aura. 108 // actually support MacOS X if and when it switches to Aura.
109 #if defined(USE_AURA) || defined(OS_ANDROID) 109 #if defined(USE_AURA) || defined(OS_ANDROID)
110 // Flaky on Chrome OS: http://crbug.com/468259
111 #if defined(OS_CHROMEOS)
112 #define MAYBE_ScreenOrientationChange DISABLED_ScreenOrientationChange
113 #else
114 #define MAYBE_ScreenOrientationChange ScreenOrientationChange
115 #endif
110 IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest, 116 IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest,
111 ScreenOrientationChange) { 117 MAYBE_ScreenOrientationChange) {
112 std::string types[] = { "portrait-primary", 118 std::string types[] = { "portrait-primary",
113 "portrait-secondary", 119 "portrait-secondary",
114 "landscape-primary", 120 "landscape-primary",
115 "landscape-secondary" }; 121 "landscape-secondary" };
116 GURL test_url = GetTestUrl("screen_orientation", 122 GURL test_url = GetTestUrl("screen_orientation",
117 "screen_orientation_screenorientationchange.html"); 123 "screen_orientation_screenorientationchange.html");
118 124
119 TestNavigationObserver navigation_observer(shell()->web_contents(), 1); 125 TestNavigationObserver navigation_observer(shell()->web_contents(), 1);
120 shell()->LoadURL(test_url); 126 shell()->LoadURL(test_url);
121 navigation_observer.Wait(); 127 navigation_observer.Wait();
(...skipping 15 matching lines...) Expand all
137 SendFakeScreenOrientation(angle, types[i]); 143 SendFakeScreenOrientation(angle, types[i]);
138 144
139 TestNavigationObserver navigation_observer(shell()->web_contents()); 145 TestNavigationObserver navigation_observer(shell()->web_contents());
140 navigation_observer.Wait(); 146 navigation_observer.Wait();
141 EXPECT_EQ(angle, GetOrientationAngle()); 147 EXPECT_EQ(angle, GetOrientationAngle());
142 EXPECT_EQ(types[i], GetOrientationType()); 148 EXPECT_EQ(types[i], GetOrientationType());
143 } 149 }
144 } 150 }
145 #endif // defined(USE_AURA) || defined(OS_ANDROID) 151 #endif // defined(USE_AURA) || defined(OS_ANDROID)
146 152
153 // Flaky on Chrome OS: http://crbug.com/468259
154 #if defined(OS_CHROMEOS)
155 #define MAYBE_WindowOrientationChange DISABLED_WindowOrientationChange
156 #else
157 #define MAYBE_WindowOrientationChange WindowOrientationChange
158 #endif
147 IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest, 159 IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest,
148 WindowOrientationChange) { 160 MAYBE_WindowOrientationChange) {
149 GURL test_url = GetTestUrl("screen_orientation", 161 GURL test_url = GetTestUrl("screen_orientation",
150 "screen_orientation_windoworientationchange.html"); 162 "screen_orientation_windoworientationchange.html");
151 163
152 TestNavigationObserver navigation_observer(shell()->web_contents(), 1); 164 TestNavigationObserver navigation_observer(shell()->web_contents(), 1);
153 shell()->LoadURL(test_url); 165 shell()->LoadURL(test_url);
154 navigation_observer.Wait(); 166 navigation_observer.Wait();
155 #if USE_AURA || defined(OS_ANDROID) 167 #if USE_AURA || defined(OS_ANDROID)
156 WaitForResizeComplete(shell()->web_contents()); 168 WaitForResizeComplete(shell()->web_contents());
157 #endif // USE_AURA || defined(OS_ANDROID) 169 #endif // USE_AURA || defined(OS_ANDROID)
158 170
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 TestNavigationObserver navigation_observer(shell()->web_contents(), 2); 265 TestNavigationObserver navigation_observer(shell()->web_contents(), 2);
254 shell()->LoadURL(test_url); 266 shell()->LoadURL(test_url);
255 navigation_observer.Wait(); 267 navigation_observer.Wait();
256 268
257 EXPECT_EQ("NotSupportedError", 269 EXPECT_EQ("NotSupportedError",
258 shell()->web_contents()->GetLastCommittedURL().ref()); 270 shell()->web_contents()->GetLastCommittedURL().ref());
259 } 271 }
260 #endif // defined(OS_ANDROID) 272 #endif // defined(OS_ANDROID)
261 273
262 } // namespace content 274 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698