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

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

Issue 2721553002: Make web_app::ShortcutInfo RefCountedThreadSafe (1) (Closed)
Patch Set: TestBrowserThreadBundle for mac test fix Created 3 years, 10 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 7001f54c8e6d79b3fef05236f60806beb10dee4c..a804f23d44eb76159759ea85e24c03b9fa03ca84 100644
--- a/chrome/browser/web_applications/web_app_mac_unittest.mm
+++ b/chrome/browser/web_applications/web_app_mac_unittest.mm
@@ -25,6 +25,7 @@
#import "chrome/common/mac/app_mode_common.h"
#include "chrome/grit/theme_resources.h"
#include "components/version_info/version_info.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h"
@@ -55,8 +56,8 @@ class WebAppShortcutCreatorMock : public web_app::WebAppShortcutCreator {
DISALLOW_COPY_AND_ASSIGN(WebAppShortcutCreatorMock);
};
-std::unique_ptr<web_app::ShortcutInfo> GetShortcutInfo() {
- std::unique_ptr<web_app::ShortcutInfo> info(new web_app::ShortcutInfo);
+scoped_refptr<web_app::ShortcutInfo> GetShortcutInfo() {
+ scoped_refptr<web_app::ShortcutInfo> info(new web_app::ShortcutInfo);
info->extension_id = "extensionid";
info->extension_path = base::FilePath("/fake/extension/path");
info->title = base::ASCIIToUTF16("Shortcut Title");
@@ -87,12 +88,14 @@ class WebAppShortcutCreatorTest : public testing::Test {
shim_path_ = destination_dir_.Append(shim_base_name_);
}
+ content::TestBrowserThreadBundle thread_bundle_;
+
base::ScopedTempDir temp_app_data_dir_;
base::ScopedTempDir temp_destination_dir_;
base::FilePath app_data_dir_;
base::FilePath destination_dir_;
- std::unique_ptr<web_app::ShortcutInfo> info_;
+ scoped_refptr<web_app::ShortcutInfo> info_;
base::FilePath shim_base_name_;
base::FilePath internal_shim_path_;
base::FilePath shim_path_;

Powered by Google App Engine
This is Rietveld 408576698