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

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

Issue 8508019: Add a method to the controller to close the picker/service tab when a return value is passed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change delegate comment to notification sense of OnClosing. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 SetPickerExpectations(2, 2); 255 SetPickerExpectations(2, 2);
256 AddWebIntentService(kAction1, kServiceURL1); 256 AddWebIntentService(kAction1, kServiceURL1);
257 AddWebIntentService(kAction1, kServiceURL2); 257 AddWebIntentService(kAction1, kServiceURL2);
258 258
259 EXPECT_CALL(*controller_, OnServiceChosen(0)) 259 EXPECT_CALL(*controller_, OnServiceChosen(0))
260 .Times(0); 260 .Times(0);
261 EXPECT_CALL(*controller_, OnCancelled()).Times(0); 261 EXPECT_CALL(*controller_, OnCancelled()).Times(0);
262 EXPECT_CALL(*controller_, OnClosing()) 262 EXPECT_CALL(*controller_, OnClosing())
263 .WillOnce(Invoke(controller_.get(), 263 .WillOnce(Invoke(controller_.get(),
264 &TestWebIntentPickerController::BaseOnClosing)); 264 &TestWebIntentPickerController::BaseOnClosing));
265 EXPECT_CALL(*picker_factory_, ClosePicker(_));
266 265
267 controller_->ShowDialog(NULL, kAction1, kType); 266 controller_->ShowDialog(NULL, kAction1, kType);
268 WaitForDialogToShow(); 267 WaitForDialogToShow();
269 delegate_->OnClosing(); 268 delegate_->OnClosing();
270 } 269 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698