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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm

Issue 7080064: [Mac] Refactor the logic of tab dragging out of TabView and into a new helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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/tabs/tab_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm b/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm
index 4b9fcf7f343d40880f71a5b216d24c79ffddebf0..62781982cad529404cf5f45d3a3c79122e059c9c 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm
@@ -9,6 +9,7 @@
#include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
#import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h"
+#import "chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.h"
#include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
@@ -19,12 +20,20 @@
@private
bool selected_;
bool closed_;
+ scoped_nsobject<TabStripDragController> dragController_;
}
- (bool)selected;
- (bool)closed;
@end
@implementation TabControllerTestTarget
+- (id)init {
+ if ((self = [super init])) {
+ dragController_.reset(
+ [[TabStripDragController alloc] initWithTabStripController:nil]);
+ }
+ return self;
+}
- (bool)selected {
return selected_;
}
@@ -67,6 +76,9 @@
model->AddItem(3, ASCIIToUTF16("Chromium"));
return model;
}
+- (id<TabDraggingEventTarget>)dragController {
+ return dragController_.get();
+}
@end
namespace {

Powered by Google App Engine
This is Rietveld 408576698