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

Side by Side Diff: chrome/browser/ui/cocoa/web_intent_sheet_controller_unittest.mm

Issue 10855066: intents: Remove the disposition enum in web intents model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mock type. Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h" 5 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h"
6 6
7 #include "base/memory/scoped_nsobject.h" 7 #include "base/memory/scoped_nsobject.h"
8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
9 #import "chrome/browser/ui/cocoa/hover_close_button.h" 9 #import "chrome/browser/ui/cocoa/hover_close_button.h"
10 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h" 10 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 NSWindow* window_; // Weak, owned by |controller_|. 93 NSWindow* window_; // Weak, owned by |controller_|.
94 }; 94 };
95 95
96 TEST_F(WebIntentPickerSheetControllerTest, NoRows) { 96 TEST_F(WebIntentPickerSheetControllerTest, NoRows) {
97 CheckWindow(/*row_count=*/0); 97 CheckWindow(/*row_count=*/0);
98 } 98 }
99 99
100 TEST_F(WebIntentPickerSheetControllerTest, PopulatedRows) { 100 TEST_F(WebIntentPickerSheetControllerTest, PopulatedRows) {
101 WebIntentPickerModel model; 101 WebIntentPickerModel model;
102 model.AddInstalledService(string16(), GURL("http://example.org/intent.html"), 102 model.AddInstalledService(string16(), GURL("http://example.org/intent.html"),
103 WebIntentPickerModel::DISPOSITION_WINDOW); 103 webkit_glue::WebIntentServiceData::DISPOSITION_WINDOW);
104 model.AddInstalledService(string16(), GURL("http://example.com/intent.html"), 104 model.AddInstalledService(string16(), GURL("http://example.com/intent.html"),
105 WebIntentPickerModel::DISPOSITION_WINDOW); 105 webkit_glue::WebIntentServiceData::DISPOSITION_WINDOW);
106 106
107 [controller_ performLayoutWithModel:&model]; 107 [controller_ performLayoutWithModel:&model];
108 108
109 CheckWindow(/*row_count=*/2); 109 CheckWindow(/*row_count=*/2);
110 } 110 }
111 111
112 TEST_F(WebIntentPickerSheetControllerTest, SuggestionView) { 112 TEST_F(WebIntentPickerSheetControllerTest, SuggestionView) {
113 WebIntentPickerModel model; 113 WebIntentPickerModel model;
114 114
115 model.AddSuggestedExtension(string16(), string16(), 2.5); 115 model.AddSuggestedExtension(string16(), string16(), 2.5);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 // Empty picker dialog has two elements, title and body. 176 // Empty picker dialog has two elements, title and body.
177 ASSERT_EQ(2U, [[empty_dialog subviews] count]); 177 ASSERT_EQ(2U, [[empty_dialog subviews] count]);
178 178
179 // Both title and body are NSTextFields. 179 // Both title and body are NSTextFields.
180 ASSERT_TRUE([[[empty_dialog subviews] objectAtIndex:0] 180 ASSERT_TRUE([[[empty_dialog subviews] objectAtIndex:0]
181 isKindOfClass:[NSTextField class]]); 181 isKindOfClass:[NSTextField class]]);
182 ASSERT_TRUE([[[empty_dialog subviews] objectAtIndex:1] 182 ASSERT_TRUE([[[empty_dialog subviews] objectAtIndex:1]
183 isKindOfClass:[NSTextField class]]); 183 isKindOfClass:[NSTextField class]]);
184 } 184 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698