OLD | NEW |
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 } |
OLD | NEW |