OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/android/shortcut_info.h" | 5 #include "chrome/browser/android/shortcut_info.h" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
8 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
9 #include "content/public/common/manifest.h" | 10 #include "content/public/common/manifest.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "url/gurl.h" | 12 #include "url/gurl.h" |
12 | 13 |
13 class ShortcutInfoTest : public testing::Test { | 14 class ShortcutInfoTest : public testing::Test { |
14 public: | 15 public: |
15 ShortcutInfoTest() : info_(GURL()) {} | 16 ShortcutInfoTest() : info_(GURL()) {} |
16 | 17 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 } | 55 } |
55 | 56 |
56 TEST_F(ShortcutInfoTest, UserTitleBecomesShortName) { | 57 TEST_F(ShortcutInfoTest, UserTitleBecomesShortName) { |
57 manifest_.short_name = | 58 manifest_.short_name = |
58 base::NullableString16(base::ASCIIToUTF16("name"), false); | 59 base::NullableString16(base::ASCIIToUTF16("name"), false); |
59 info_.user_title = base::ASCIIToUTF16("title"); | 60 info_.user_title = base::ASCIIToUTF16("title"); |
60 info_.UpdateFromManifest(manifest_); | 61 info_.UpdateFromManifest(manifest_); |
61 | 62 |
62 ASSERT_EQ(manifest_.short_name.string(), info_.user_title); | 63 ASSERT_EQ(manifest_.short_name.string(), info_.user_title); |
63 } | 64 } |
OLD | NEW |