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

Side by Side Diff: chrome/browser/ui/intents/web_intent_picker_model_unittest.cc

Issue 10827238: [WebIntents, Gtk] "Waiting for Suggestion" dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove flag, rebase to HEAD. 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
« no previous file with comments | « chrome/browser/ui/intents/web_intent_picker_model.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/ui/intents/web_intent_picker_model.h" 6 #include "chrome/browser/ui/intents/web_intent_picker_model.h"
7 #include "chrome/browser/ui/intents/web_intent_picker_model_observer.h" 7 #include "chrome/browser/ui/intents/web_intent_picker_model_observer.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/gfx/image/image.h" 10 #include "ui/gfx/image/image.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 EXPECT_EQ(GURL::EmptyGURL(), model_.inline_disposition_url()); 217 EXPECT_EQ(GURL::EmptyGURL(), model_.inline_disposition_url());
218 218
219 model_.AddInstalledService(kTitle1, kUrl1, kWindowDisposition); 219 model_.AddInstalledService(kTitle1, kUrl1, kWindowDisposition);
220 model_.AddInstalledService(kTitle2, kUrl2, kInlineDisposition); 220 model_.AddInstalledService(kTitle2, kUrl2, kInlineDisposition);
221 model_.SetInlineDisposition(kUrl2); 221 model_.SetInlineDisposition(kUrl2);
222 222
223 EXPECT_TRUE(model_.IsInlineDisposition()); 223 EXPECT_TRUE(model_.IsInlineDisposition());
224 EXPECT_EQ(kUrl2, model_.inline_disposition_url()); 224 EXPECT_EQ(kUrl2, model_.inline_disposition_url());
225 225
226 model_.Clear(); 226 model_.Clear();
227
228 EXPECT_FALSE(model_.IsInlineDisposition()); 227 EXPECT_FALSE(model_.IsInlineDisposition());
229 EXPECT_EQ(GURL::EmptyGURL(), model_.inline_disposition_url()); 228 EXPECT_EQ(GURL::EmptyGURL(), model_.inline_disposition_url());
230 } 229 }
230
231
232 TEST_F(WebIntentPickerModelTest, WaitingForSuggestions) {
233 // Default status is that "waiting for suggestions".
234 EXPECT_TRUE(model_.IsWaitingForSuggestions());
235
236 // "waiting" status can be toggled manually.
237 EXPECT_CALL(observer_, OnModelChanged(&model_)).Times(2);
238 model_.SetWaitingForSuggestions(false);
239 EXPECT_FALSE(model_.IsWaitingForSuggestions());
240 model_.SetWaitingForSuggestions(true);
241 EXPECT_TRUE(model_.IsWaitingForSuggestions());
242 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/intents/web_intent_picker_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698