| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/shell_integration_linux.h" | 5 #include "chrome/browser/shell_integration_linux.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstdlib> | 8 #include <cstdlib> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); i++) { | 566 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); i++) { |
| 567 SCOPED_TRACE(i); | 567 SCOPED_TRACE(i); |
| 568 EXPECT_EQ( | 568 EXPECT_EQ( |
| 569 test_cases[i].expected_output, | 569 test_cases[i].expected_output, |
| 570 ShellIntegrationLinux::GetDesktopFileContents( | 570 ShellIntegrationLinux::GetDesktopFileContents( |
| 571 kChromeExePath, | 571 kChromeExePath, |
| 572 web_app::GenerateApplicationNameFromURL(GURL(test_cases[i].url)), | 572 web_app::GenerateApplicationNameFromURL(GURL(test_cases[i].url)), |
| 573 GURL(test_cases[i].url), | 573 GURL(test_cases[i].url), |
| 574 std::string(), | 574 std::string(), |
| 575 base::FilePath(), | 575 base::FilePath(), |
| 576 ASCIIToUTF16(test_cases[i].title), | 576 base::ASCIIToUTF16(test_cases[i].title), |
| 577 test_cases[i].icon_name, | 577 test_cases[i].icon_name, |
| 578 base::FilePath(), | 578 base::FilePath(), |
| 579 test_cases[i].nodisplay)); | 579 test_cases[i].nodisplay)); |
| 580 } | 580 } |
| 581 } | 581 } |
| 582 | 582 |
| 583 TEST(ShellIntegrationTest, GetDirectoryFileContents) { | 583 TEST(ShellIntegrationTest, GetDirectoryFileContents) { |
| 584 const struct { | 584 const struct { |
| 585 const char* title; | 585 const char* title; |
| 586 const char* icon_name; | 586 const char* icon_name; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 611 "Icon=chromium-browser\n" | 611 "Icon=chromium-browser\n" |
| 612 #endif | 612 #endif |
| 613 }, | 613 }, |
| 614 }; | 614 }; |
| 615 | 615 |
| 616 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); i++) { | 616 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); i++) { |
| 617 SCOPED_TRACE(i); | 617 SCOPED_TRACE(i); |
| 618 EXPECT_EQ( | 618 EXPECT_EQ( |
| 619 test_cases[i].expected_output, | 619 test_cases[i].expected_output, |
| 620 ShellIntegrationLinux::GetDirectoryFileContents( | 620 ShellIntegrationLinux::GetDirectoryFileContents( |
| 621 ASCIIToUTF16(test_cases[i].title), | 621 base::ASCIIToUTF16(test_cases[i].title), |
| 622 test_cases[i].icon_name)); | 622 test_cases[i].icon_name)); |
| 623 } | 623 } |
| 624 } | 624 } |
| OLD | NEW |