Index: content/browser/screen_orientation/screen_orientation_browsertest.cc |
diff --git a/content/browser/screen_orientation/screen_orientation_browsertest.cc b/content/browser/screen_orientation/screen_orientation_browsertest.cc |
index 8216106ace3da5e265e71f9c1676b9f7fedd8bf9..90fe72943d8892c60fb892f60eaa6fb16143b599 100644 |
--- a/content/browser/screen_orientation/screen_orientation_browsertest.cc |
+++ b/content/browser/screen_orientation/screen_orientation_browsertest.cc |
@@ -21,6 +21,10 @@ |
#include "third_party/WebKit/public/platform/WebScreenInfo.h" |
#include "ui/compositor/compositor_switches.h" |
+#if defined(OS_WIN) |
+#include "base/win/windows_version.h" |
+#endif // OS_WIN |
+ |
namespace content { |
class ScreenOrientationBrowserTest : public ContentBrowserTest { |
@@ -86,6 +90,13 @@ class ScreenOrientationBrowserTest : public ContentBrowserTest { |
return type; |
} |
+ bool ScreenOrientationSupported() { |
+ bool support; |
+ ExecuteScriptAndGetValue(shell()->web_contents()->GetMainFrame(), |
+ "'orientation' in screen")->GetAsBoolean(&support); |
+ return support; |
+ } |
+ |
bool WindowOrientationSupported() { |
bool support; |
ExecuteScriptAndGetValue(shell()->web_contents()->GetMainFrame(), |
@@ -123,6 +134,15 @@ IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest, ScreenOrientationChange) { |
WaitForResizeComplete(shell()->web_contents()); |
#endif // USE_AURA |
+#if defined(OS_WIN) |
+ // Screen Orientation is currently disabled on Windows 8. |
+ // This test will break, requiring an update when the API will be enabled. |
+ if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8) { |
+ EXPECT_EQ(false, ScreenOrientationSupported()); |
+ return; |
+ } |
+#endif // defined(OS_WIN) |
+ |
int angle = GetOrientationAngle(); |
for (int i = 0; i < 4; ++i) { |
@@ -170,6 +190,16 @@ IN_PROC_BROWSER_TEST_F(ScreenOrientationBrowserTest, LockSmoke) { |
TestNavigationObserver navigation_observer(shell()->web_contents(), 2); |
shell()->LoadURL(test_url); |
+ |
+#if defined(OS_WIN) |
+ // Screen Orientation is currently disabled on Windows 8. |
+ // This test will break, requiring an update when the API will be enabled. |
+ if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8) { |
+ EXPECT_EQ(false, ScreenOrientationSupported()); |
+ return; |
+ } |
+#endif // defined(OS_WIN) |
+ |
navigation_observer.Wait(); |
#if USE_AURA |
WaitForResizeComplete(shell()->web_contents()); |