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

Unified Diff: chrome/browser/web_applications/web_app_mac_unittest.mm

Issue 1016543004: [Mac] Use the app's version as the app shim bundle version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
Index: chrome/browser/web_applications/web_app_mac_unittest.mm
diff --git a/chrome/browser/web_applications/web_app_mac_unittest.mm b/chrome/browser/web_applications/web_app_mac_unittest.mm
index f154f0d5cba1bb686cb1890c155afe45231f81c1..01957fd140eb2555eee8525b398af5d71fe1b927 100644
--- a/chrome/browser/web_applications/web_app_mac_unittest.mm
+++ b/chrome/browser/web_applications/web_app_mac_unittest.mm
@@ -18,6 +18,7 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/chrome_version_info.h"
#import "chrome/common/mac/app_mode_common.h"
#include "grit/theme_resources.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -67,6 +68,7 @@ web_app::ShortcutInfo GetShortcutInfo() {
info.url = GURL("http://example.com/");
info.profile_path = base::FilePath("user_data_dir").Append("Profile 1");
info.profile_name = "profile name";
+ info.version = base::Version("1.0");
return info;
}
@@ -131,6 +133,11 @@ TEST_F(WebAppShortcutCreatorTest, CreateShortcuts) {
EXPECT_NSEQ(base::SysUTF8ToNSString(info_.url.spec()),
[plist objectForKey:app_mode::kCrAppModeShortcutURLKey]);
+ EXPECT_NSEQ(base::SysUTF8ToNSString(chrome::VersionInfo().Version()),
+ [plist objectForKey:app_mode::kCrBundleVersionKey]);
+ EXPECT_NSEQ(base::SysUTF8ToNSString(info_.version.GetString()),
+ [plist objectForKey:app_mode::kCFBundleShortVersionStringKey]);
+
// Make sure all values in the plist are actually filled in.
for (id key in plist) {
id value = [plist valueForKey:key];

Powered by Google App Engine
This is Rietveld 408576698