summaryrefslogtreecommitdiffstats
path: root/chromium/base/win/shortcut_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/win/shortcut_unittest.cc')
-rw-r--r--chromium/base/win/shortcut_unittest.cc29
1 files changed, 13 insertions, 16 deletions
diff --git a/chromium/base/win/shortcut_unittest.cc b/chromium/base/win/shortcut_unittest.cc
index 992c1b118e6..76c80dcff55 100644
--- a/chromium/base/win/shortcut_unittest.cc
+++ b/chromium/base/win/shortcut_unittest.cc
@@ -12,7 +12,6 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/stl_util.h"
-#include "base/strings/string16.h"
#include "base/test/test_file_util.h"
#include "base/test/test_shortcut_win.h"
#include "base/win/scoped_com_initializer.h"
@@ -42,10 +41,10 @@ class ShortcutTest : public testing::Test {
link_properties_.set_target(target_file);
link_properties_.set_working_dir(temp_dir_.GetPath());
- link_properties_.set_arguments(STRING16_LITERAL("--magic --awesome"));
- link_properties_.set_description(STRING16_LITERAL("Chrome is awesome."));
+ link_properties_.set_arguments(L"--magic --awesome");
+ link_properties_.set_description(L"Chrome is awesome.");
link_properties_.set_icon(link_properties_.target, 4);
- link_properties_.set_app_id(STRING16_LITERAL("Chrome"));
+ link_properties_.set_app_id(L"Chrome");
link_properties_.set_dual_mode(false);
// The CLSID below was randomly selected.
@@ -68,12 +67,10 @@ class ShortcutTest : public testing::Test {
link_properties_2_.set_target(target_file_2);
link_properties_2_.set_working_dir(temp_dir_2_.GetPath());
- link_properties_2_.set_arguments(STRING16_LITERAL("--super --crazy"));
- link_properties_2_.set_description(
- STRING16_LITERAL("The best in the west."));
+ link_properties_2_.set_arguments(L"--super --crazy");
+ link_properties_2_.set_description(L"The best in the west.");
link_properties_2_.set_icon(icon_path_2, 0);
- link_properties_2_.set_app_id(
- STRING16_LITERAL("Chrome.UserLevelCrazySuffix"));
+ link_properties_2_.set_app_id(L"Chrome.UserLevelCrazySuffix");
link_properties_2_.set_dual_mode(true);
link_properties_2_.set_toast_activator_clsid(CLSID_NULL);
}
@@ -133,11 +130,11 @@ TEST_F(ShortcutTest, CreateAndResolveShortcutProperties) {
ValidatePathsAreEqual(only_target_properties.target,
properties_read_2.target);
ValidatePathsAreEqual(FilePath(), properties_read_2.working_dir);
- EXPECT_EQ(STRING16_LITERAL(""), properties_read_2.arguments);
- EXPECT_EQ(STRING16_LITERAL(""), properties_read_2.description);
+ EXPECT_EQ(L"", properties_read_2.arguments);
+ EXPECT_EQ(L"", properties_read_2.description);
ValidatePathsAreEqual(FilePath(), properties_read_2.icon);
EXPECT_EQ(0, properties_read_2.icon_index);
- EXPECT_EQ(STRING16_LITERAL(""), properties_read_2.app_id);
+ EXPECT_EQ(L"", properties_read_2.app_id);
EXPECT_FALSE(properties_read_2.dual_mode);
EXPECT_EQ(CLSID_NULL, properties_read_2.toast_activator_clsid);
}
@@ -162,7 +159,7 @@ TEST_F(ShortcutTest, ResolveShortcutWithArgs) {
link_file_, link_properties_, SHORTCUT_CREATE_ALWAYS));
FilePath resolved_name;
- string16 args;
+ std::wstring args;
EXPECT_TRUE(ResolveShortcut(link_file_, &resolved_name, &args));
char read_contents[base::size(kFileContents)];
@@ -260,14 +257,14 @@ TEST_F(ShortcutTest, UpdateShortcutClearArguments) {
link_file_, link_properties_, SHORTCUT_CREATE_ALWAYS));
ShortcutProperties clear_arguments_properties;
- clear_arguments_properties.set_arguments(string16());
+ clear_arguments_properties.set_arguments(std::wstring());
ASSERT_TRUE(CreateOrUpdateShortcutLink(
link_file_, clear_arguments_properties,
SHORTCUT_UPDATE_EXISTING));
ShortcutProperties expected_properties = link_properties_;
- expected_properties.set_arguments(string16());
+ expected_properties.set_arguments(std::wstring());
ValidateShortcut(link_file_, expected_properties);
}
@@ -303,7 +300,7 @@ TEST_F(ShortcutTest, ReplaceShortcutSomeProperties) {
ShortcutProperties expected_properties(new_properties);
expected_properties.set_working_dir(FilePath());
expected_properties.set_icon(FilePath(), 0);
- expected_properties.set_app_id(string16());
+ expected_properties.set_app_id(std::wstring());
expected_properties.set_dual_mode(false);
ValidateShortcut(link_file_, expected_properties);
}