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

Unified Diff: remoting/base/auto_thread_unittest.cc

Issue 2909943003: Removing useless Win7 checks + standardize its use (Closed)
Patch Set: Various nits Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/gpu/gpu_video_decode_accelerator_factory.cc ('k') | rlz/test/rlz_test_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/auto_thread_unittest.cc
diff --git a/remoting/base/auto_thread_unittest.cc b/remoting/base/auto_thread_unittest.cc
index a825753a1daf617f5b8d3ded54fc47c1bc99576a..224b5057aee2f94ce8a0888959511f7bfbffc2c3 100644
--- a/remoting/base/auto_thread_unittest.cc
+++ b/remoting/base/auto_thread_unittest.cc
@@ -15,7 +15,6 @@
#if defined(OS_WIN)
#include <objbase.h>
-#include "base/win/windows_version.h"
#endif
namespace {
@@ -37,12 +36,6 @@ void CheckComAptTypeTask(APTTYPE* apt_type_out, HRESULT* hresult) {
typedef HRESULT (WINAPI * CoGetApartmentTypeFunc)
(APTTYPE*, APTTYPEQUALIFIER*);
- // CoGetApartmentType requires Windows 7 or above.
- if (base::win::GetVersion() < base::win::VERSION_WIN7) {
- *hresult = E_NOTIMPL;
- return;
- }
-
// Dynamic link to the API so the same test binary can run on older systems.
base::ScopedNativeLibrary com_library(base::FilePath(L"ole32.dll"));
ASSERT_TRUE(com_library.is_valid());
@@ -165,13 +158,8 @@ TEST_F(AutoThreadTest, ThreadWithComMta) {
task_runner = NULL;
RunMessageLoop();
- // CoGetApartmentType requires Windows 7 or above.
- if (base::win::GetVersion() >= base::win::VERSION_WIN7) {
- EXPECT_EQ(S_OK, hresult);
- EXPECT_EQ(APTTYPE_MTA, apt_type);
- } else {
- EXPECT_EQ(E_NOTIMPL, hresult);
- }
+ EXPECT_EQ(S_OK, hresult);
+ EXPECT_EQ(APTTYPE_MTA, apt_type);
}
TEST_F(AutoThreadTest, ThreadWithComSta) {
@@ -191,15 +179,10 @@ TEST_F(AutoThreadTest, ThreadWithComSta) {
task_runner = NULL;
RunMessageLoop();
- // CoGetApartmentType requires Windows 7 or above.
- if (base::win::GetVersion() >= base::win::VERSION_WIN7) {
- EXPECT_EQ(S_OK, hresult);
- // Whether the thread is the "main" STA apartment depends upon previous
- // COM activity in this test process, so allow both types here.
- EXPECT_TRUE(apt_type == APTTYPE_MAINSTA || apt_type == APTTYPE_STA);
- } else {
- EXPECT_EQ(E_NOTIMPL, hresult);
- }
+ EXPECT_EQ(S_OK, hresult);
+ // Whether the thread is the "main" STA apartment depends upon previous
+ // COM activity in this test process, so allow both types here.
+ EXPECT_TRUE(apt_type == APTTYPE_MAINSTA || apt_type == APTTYPE_STA);
}
#endif // defined(OS_WIN)
« no previous file with comments | « media/gpu/gpu_video_decode_accelerator_factory.cc ('k') | rlz/test/rlz_test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698