diff options
author | zturner@chromium.org <zturner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 01:02:34 +0000 |
---|---|---|
committer | zturner@chromium.org <zturner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 01:02:34 +0000 |
commit | a824bdc7c0fad71f250660c1ad7707168f3ce1ae (patch) | |
tree | fd1a5cdd7a9b6062239f616b72e1b01af1037191 /ash/test | |
parent | 705d965566d9906601ddc3420f30dc84c9a9499e (diff) | |
download | chromium_src-a824bdc7c0fad71f250660c1ad7707168f3ce1ae.zip chromium_src-a824bdc7c0fad71f250660c1ad7707168f3ce1ae.tar.gz chromium_src-a824bdc7c0fad71f250660c1ad7707168f3ce1ae.tar.bz2 |
Resubmit enable the volume slider in Ash for windows.
BUG=227247
This is a resubmit of https://codereview.chromium.org/178883004/
That patch caused tests to fail on Vista due to uninitialized COM errors.
I've uploaded this patch as a diff to that codereview as well (Patch Set 11), so you can diff Patch Set 11 against Patch Set 10 to see the fix.
In words though, the fix is:
1) Don't special-case DesktopNotificationsTest for COM initialization, instead fix AuraShellTestSuite to correctly initialize COM for Win7+, not just Win8+ (since Ash is supported on Win7).
2) Make the same fix for Win7 in InProcessBrowserTest.
3) In AshTestSuiteTest, don't run the test on Vista and below since Ash isn't supported prior to Win7 (I don't know of a better way to disable this test at runtime based on OS version).
TBR=henrika, jennyz
R=sky
Review URL: https://codereview.chromium.org/193173002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256374 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
-rw-r--r-- | ash/test/ash_test_helper_unittest.cc | 9 | ||||
-rw-r--r-- | ash/test/test_suite.cc | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/ash/test/ash_test_helper_unittest.cc b/ash/test/ash_test_helper_unittest.cc index 52e73fb..547cafa 100644 --- a/ash/test/ash_test_helper_unittest.cc +++ b/ash/test/ash_test_helper_unittest.cc @@ -8,6 +8,10 @@ #include "ui/aura/window_event_dispatcher.h" #include "ui/views/widget/widget.h" +#if defined(OS_WIN) +#include "base/win/windows_version.h" +#endif + // Tests for AshTestHelper. Who will watch the watchers? And who will test // the tests? class AshTestHelperTest : public testing::Test { @@ -40,6 +44,11 @@ class AshTestHelperTest : public testing::Test { // Ensure that we have initialized enough of Ash to create and show a window. TEST_F(AshTestHelperTest, AshTestHelper) { // Check initial state. +#if defined(OS_WIN) + // Ash doesn't run on versions of Windows prior to Win7. + if (base::win::GetVersion() < base::win::VERSION_WIN7) + return; +#endif EXPECT_TRUE(ash_test_helper()->message_loop()); EXPECT_TRUE(ash_test_helper()->test_shell_delegate()); EXPECT_TRUE(ash_test_helper()->CurrentContext()); diff --git a/ash/test/test_suite.cc b/ash/test/test_suite.cc index 2e971eb..5b772b9 100644 --- a/ash/test/test_suite.cc +++ b/ash/test/test_suite.cc @@ -33,12 +33,14 @@ void AuraShellTestSuite::Initialize() { gfx::GLSurface::InitializeOneOffForTests(); #if defined(OS_WIN) - if (base::win::GetVersion() >= base::win::VERSION_WIN8 && + base::win::Version version = base::win::GetVersion(); + if (version >= base::win::VERSION_WIN7 && !CommandLine::ForCurrentProcess()->HasSwitch( ash::switches::kForceAshToDesktop)) { com_initializer_.reset(new base::win::ScopedCOMInitializer()); ui::win::CreateATLModuleIfNeeded(); - ASSERT_TRUE(win8::MakeTestDefaultBrowserSynchronously()); + if (version >= base::win::VERSION_WIN8) + ASSERT_TRUE(win8::MakeTestDefaultBrowserSynchronously()); } #endif |