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

Unified Diff: chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_browsertest.mm

Issue 2724603002: MacViews: Enable AppleScript support. (Closed)
Patch Set: Fix tests. 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/ui/cocoa/applescript/bookmark_applescript_utils_browsertest.mm
diff --git a/chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.mm b/chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_browsertest.mm
similarity index 88%
rename from chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.mm
rename to chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_browsertest.mm
index 4f2fc760fc67a0b4d7ef8e180d1c4b0f00d5e5bc..9df079009f9254a9bb03bc9125e14c4f436edbf0 100644
--- a/chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.mm
+++ b/chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_browsertest.mm
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.h"
+#import "chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_browsertest.h"
tapted 2017/03/02 23:17:17 this .cc file doesn't have any tests, it should ju
snake 2017/03/06 12:53:34 Done.
tapted 2017/03/07 07:07:50 That's not quite what I suggested. I guess this is
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
+#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/testing_profile.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
@@ -59,14 +60,10 @@ BookmarkAppleScriptTest::~BookmarkAppleScriptTest() {
[NSApp setDelegate:nil];
tapted 2017/03/02 23:17:17 this doesn't belong here without a corresponding c
snake 2017/03/06 12:53:34 Done.
}
-void BookmarkAppleScriptTest::SetUp() {
- CocoaProfileTest::SetUp();
+void BookmarkAppleScriptTest::SetUpOnMainThread() {
+ InProcessBrowserTest::SetUpOnMainThread();
ASSERT_TRUE(profile());
- appDelegate_.reset([[FakeAppDelegate alloc] init]);
- [appDelegate_.get() setTest:this];
- DCHECK([NSApp delegate] == nil);
- [NSApp setDelegate:appDelegate_];
BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile());
const BookmarkNode* root = model->bookmark_bar_node();
const std::string modelString("a f1:[ b d c ] d f2:[ e f g ] h ");
@@ -74,3 +71,7 @@ void BookmarkAppleScriptTest::SetUp() {
bookmarkBar_.reset([[BookmarkFolderAppleScript alloc]
initWithBookmarkNode:model->bookmark_bar_node()]);
}
+
+Profile* BookmarkAppleScriptTest::profile() const {
+ return browser()->profile();
+}

Powered by Google App Engine
This is Rietveld 408576698