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

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

Issue 1933163002: Disable ScreenOrientationLockDisabledBrowserTest.NotSupported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 "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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 ScreenOrientationLockDisabledBrowserTest() {} 220 ScreenOrientationLockDisabledBrowserTest() {}
221 ~ScreenOrientationLockDisabledBrowserTest() override {} 221 ~ScreenOrientationLockDisabledBrowserTest() override {}
222 222
223 void SetUpCommandLine(base::CommandLine* command_line) override { 223 void SetUpCommandLine(base::CommandLine* command_line) override {
224 command_line->AppendSwitch(switches::kDisableScreenOrientationLock); 224 command_line->AppendSwitch(switches::kDisableScreenOrientationLock);
225 } 225 }
226 }; 226 };
227 227
228 // Check that when --disable-screen-orientation-lock is passed to the command 228 // Check that when --disable-screen-orientation-lock is passed to the command
229 // line, screen.orientation.lock() correctly reports to not be supported. 229 // line, screen.orientation.lock() correctly reports to not be supported.
230 IN_PROC_BROWSER_TEST_F(ScreenOrientationLockDisabledBrowserTest, NotSupported) { 230 IN_PROC_BROWSER_TEST_F(ScreenOrientationLockDisabledBrowserTest,
231 DISABLED_NotSupported) {
231 GURL test_url = GetTestUrl("screen_orientation", 232 GURL test_url = GetTestUrl("screen_orientation",
232 "screen_orientation_lock_disabled.html"); 233 "screen_orientation_lock_disabled.html");
233 234
234 TestNavigationObserver navigation_observer(shell()->web_contents(), 1); 235 TestNavigationObserver navigation_observer(shell()->web_contents(), 1);
235 shell()->LoadURL(test_url); 236 shell()->LoadURL(test_url);
236 navigation_observer.Wait(); 237 navigation_observer.Wait();
237 238
238 { 239 {
239 ASSERT_TRUE(ExecuteScript(shell()->web_contents(), "run();")); 240 ASSERT_TRUE(ExecuteScript(shell()->web_contents(), "run();"));
240 241
241 TestNavigationObserver navigation_observer(shell()->web_contents(), 1); 242 TestNavigationObserver navigation_observer(shell()->web_contents(), 1);
242 navigation_observer.Wait(); 243 navigation_observer.Wait();
243 EXPECT_EQ("NotSupportedError", 244 EXPECT_EQ("NotSupportedError",
244 shell()->web_contents()->GetLastCommittedURL().ref()); 245 shell()->web_contents()->GetLastCommittedURL().ref());
245 } 246 }
246 } 247 }
247 #endif // defined(OS_ANDROID) 248 #endif // defined(OS_ANDROID)
248 249
249 } // namespace content 250 } // 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