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

Unified Diff: base/win/shortcut_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 | « base/win/shortcut.cc ('k') | chrome/browser/download/download_status_updater_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/shortcut_unittest.cc
diff --git a/base/win/shortcut_unittest.cc b/base/win/shortcut_unittest.cc
index 1bb632517cabf981ac085a56c36646edf055bbc9..b1d9345e8710a51c53ff4ee3a8232fa3c9de0da7 100644
--- a/base/win/shortcut_unittest.cc
+++ b/base/win/shortcut_unittest.cc
@@ -15,7 +15,6 @@
#include "base/test/test_file_util.h"
#include "base/test/test_shortcut_win.h"
#include "base/win/scoped_com_initializer.h"
-#include "base/win/windows_version.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
@@ -84,8 +83,7 @@ class ShortcutTest : public testing::Test {
TEST_F(ShortcutTest, CreateAndResolveShortcutProperties) {
uint32_t valid_properties = ShortcutProperties::PROPERTIES_BASIC;
- if (GetVersion() >= VERSION_WIN7)
- valid_properties |= ShortcutProperties::PROPERTIES_WIN7;
+ valid_properties |= ShortcutProperties::PROPERTIES_WIN7;
// Test all properties.
FilePath file_1(temp_dir_.GetPath().Append(L"Link1.lnk"));
@@ -103,10 +101,8 @@ TEST_F(ShortcutTest, CreateAndResolveShortcutProperties) {
EXPECT_EQ(link_properties_.description, properties_read_1.description);
ValidatePathsAreEqual(link_properties_.icon, properties_read_1.icon);
EXPECT_EQ(link_properties_.icon_index, properties_read_1.icon_index);
- if (GetVersion() >= VERSION_WIN7) {
- EXPECT_EQ(link_properties_.app_id, properties_read_1.app_id);
- EXPECT_EQ(link_properties_.dual_mode, properties_read_1.dual_mode);
- }
+ EXPECT_EQ(link_properties_.app_id, properties_read_1.app_id);
+ EXPECT_EQ(link_properties_.dual_mode, properties_read_1.dual_mode);
// Test simple shortcut with no special properties set.
FilePath file_2(temp_dir_.GetPath().Append(L"Link2.lnk"));
@@ -126,10 +122,8 @@ TEST_F(ShortcutTest, CreateAndResolveShortcutProperties) {
EXPECT_EQ(L"", properties_read_2.description);
ValidatePathsAreEqual(FilePath(), properties_read_2.icon);
EXPECT_EQ(0, properties_read_2.icon_index);
- if (GetVersion() >= VERSION_WIN7) {
- EXPECT_EQ(L"", properties_read_2.app_id);
- EXPECT_FALSE(properties_read_2.dual_mode);
- }
+ EXPECT_EQ(L"", properties_read_2.app_id);
+ EXPECT_FALSE(properties_read_2.dual_mode);
}
TEST_F(ShortcutTest, CreateAndResolveShortcut) {
« no previous file with comments | « base/win/shortcut.cc ('k') | chrome/browser/download/download_status_updater_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698