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

Side by Side Diff: chrome/browser/ui/website_settings/mock_permission_bubble_request.cc

Issue 176053002: [WebsiteSettings] Change permission bubble API to adapt to new mocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try 2 Created 6 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/website_settings/mock_permission_bubble_request.h" 5 #include "chrome/browser/ui/website_settings/mock_permission_bubble_request.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 8
9 MockPermissionBubbleRequest::MockPermissionBubbleRequest( 9 MockPermissionBubbleRequest::MockPermissionBubbleRequest(
10 const std::string& text) { 10 const std::string& text) {
11 SetText(base::UTF8ToUTF16(text)); 11 SetText(base::UTF8ToUTF16(text));
12 } 12 }
13 13
14 MockPermissionBubbleRequest::~MockPermissionBubbleRequest() {} 14 MockPermissionBubbleRequest::~MockPermissionBubbleRequest() {}
15 15
16 void MockPermissionBubbleRequest::SetText(const base::string16& text) { 16 void MockPermissionBubbleRequest::SetText(const base::string16& text) {
17 ON_CALL(*this, GetMessageText()).WillByDefault(testing::Return(text)); 17 ON_CALL(*this, GetMessageText()).WillByDefault(testing::Return(text));
18 ON_CALL(*this, GetMessageTextFragment()).WillByDefault(testing::Return(text)); 18 ON_CALL(*this, GetMessageTextFragment()).WillByDefault(testing::Return(text));
19 } 19 }
20
21 int MockPermissionBubbleRequest::GetIconID() const {
22 return 0;
23 }
24
25 bool MockPermissionBubbleRequest::HasUserGesture() const {
26 return false;
27 }
28
29 GURL MockPermissionBubbleRequest::GetRequestingHostname() const {
30 return GURL("http://www.google.com");
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698