| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <objbase.h> | 5 #include <objbase.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base_paths.h" |
| 9 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
| 11 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
| 12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/path_service.h" | |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "base/test/scoped_path_override.h" | 16 #include "base/test/scoped_path_override.h" |
| 17 #include "base/test/test_shortcut_win.h" | 17 #include "base/test/test_shortcut_win.h" |
| 18 #include "base/version.h" | 18 #include "base/version.h" |
| 19 #include "base/win/shortcut.h" | 19 #include "base/win/shortcut.h" |
| 20 #include "chrome/installer/setup/install.h" | 20 #include "chrome/installer/setup/install.h" |
| 21 #include "chrome/installer/setup/install_worker.h" | 21 #include "chrome/installer/setup/install_worker.h" |
| 22 #include "chrome/installer/setup/setup_constants.h" | 22 #include "chrome/installer/setup/setup_constants.h" |
| 23 #include "chrome/installer/util/browser_distribution.h" | 23 #include "chrome/installer/util/browser_distribution.h" |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 installer::EscapeXmlAttributeValueInSingleQuotes(&val); | 422 installer::EscapeXmlAttributeValueInSingleQuotes(&val); |
| 423 ASSERT_STREQ(kExpectedEscapedVal, val.c_str()); | 423 ASSERT_STREQ(kExpectedEscapedVal, val.c_str()); |
| 424 } | 424 } |
| 425 | 425 |
| 426 TEST(EscapeXmlAttributeValueTest, DontEscapeNormalValue) { | 426 TEST(EscapeXmlAttributeValueTest, DontEscapeNormalValue) { |
| 427 base::string16 val(L"Google Chrome"); | 427 base::string16 val(L"Google Chrome"); |
| 428 static const wchar_t kExpectedEscapedVal[] = L"Google Chrome"; | 428 static const wchar_t kExpectedEscapedVal[] = L"Google Chrome"; |
| 429 installer::EscapeXmlAttributeValueInSingleQuotes(&val); | 429 installer::EscapeXmlAttributeValueInSingleQuotes(&val); |
| 430 ASSERT_STREQ(kExpectedEscapedVal, val.c_str()); | 430 ASSERT_STREQ(kExpectedEscapedVal, val.c_str()); |
| 431 } | 431 } |
| OLD | NEW |