OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "gtest/gtest.h" | 5 #include "gtest/gtest.h" |
6 #include "gmock/gmock.h" | 6 #include "gmock/gmock.h" |
7 #include "chrome_frame/chrome_frame_automation.h" | 7 #include "chrome_frame/chrome_frame_automation.h" |
8 #include "chrome_frame/chrome_frame_npapi.h" | 8 #include "chrome_frame/chrome_frame_npapi.h" |
9 #include "chrome_frame/ff_privilege_check.h" | 9 #include "chrome_frame/ff_privilege_check.h" |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 .WillOnce(Return(std::string("http://www.google.com"))); | 130 .WillOnce(Return(std::string("http://www.google.com"))); |
131 EXPECT_CALL(mock_api, CreatePrefService()) | 131 EXPECT_CALL(mock_api, CreatePrefService()) |
132 .WillOnce(Return(mock_proxy)); | 132 .WillOnce(Return(mock_proxy)); |
133 EXPECT_CALL(mock_api, GetBrowserIncognitoMode()) | 133 EXPECT_CALL(mock_api, GetBrowserIncognitoMode()) |
134 .WillOnce(Return(is_incognito)); | 134 .WillOnce(Return(is_incognito)); |
135 | 135 |
136 EXPECT_CALL(*mock_proxy, Initialize(_, _)).WillRepeatedly(Return(false)); | 136 EXPECT_CALL(*mock_proxy, Initialize(_, _)).WillRepeatedly(Return(false)); |
137 | 137 |
138 scoped_refptr<ChromeFrameLaunchParams> launch_params( | 138 scoped_refptr<ChromeFrameLaunchParams> launch_params( |
139 new ChromeFrameLaunchParams(GURL(), GURL(), FilePath(), profile_name, | 139 new ChromeFrameLaunchParams(GURL(), GURL(), FilePath(), profile_name, |
140 extra_args, is_incognito, true)); | 140 extra_args, is_incognito, true, false)); |
141 | 141 |
142 EXPECT_CALL(*mock_automation, | 142 EXPECT_CALL(*mock_automation, |
143 Initialize(_, LaunchParamEq(true, extra_args, is_incognito, true))) | 143 Initialize(_, LaunchParamEq(true, extra_args, is_incognito, true))) |
144 .WillOnce(Return(true)); | 144 .WillOnce(Return(true)); |
145 | 145 |
146 if (expect_privilege_check) { | 146 if (expect_privilege_check) { |
147 EXPECT_CALL(mock_priv, IsFireFoxPrivilegedInvocation(_)) | 147 EXPECT_CALL(mock_priv, IsFireFoxPrivilegedInvocation(_)) |
148 .WillOnce(Return(is_privileged)); | 148 .WillOnce(Return(is_privileged)); |
149 } else { | 149 } else { |
150 EXPECT_CALL(mock_priv, IsFireFoxPrivilegedInvocation(_)) | 150 EXPECT_CALL(mock_priv, IsFireFoxPrivilegedInvocation(_)) |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 VOID_TO_NPVARIANT(var); | 557 VOID_TO_NPVARIANT(var); |
558 EXPECT_TRUE(mock_api.GetProperty(kOnPrivateMessageId, &var)); | 558 EXPECT_TRUE(mock_api.GetProperty(kOnPrivateMessageId, &var)); |
559 EXPECT_TRUE(NPVARIANT_IS_OBJECT(var)); | 559 EXPECT_TRUE(NPVARIANT_IS_OBJECT(var)); |
560 EXPECT_EQ(kMockNPObject, NPVARIANT_TO_OBJECT(var)); | 560 EXPECT_EQ(kMockNPObject, NPVARIANT_TO_OBJECT(var)); |
561 | 561 |
562 mock_api.Uninitialize(); | 562 mock_api.Uninitialize(); |
563 } | 563 } |
564 | 564 |
565 // TODO(siggi): test invoking postPrivateMessage. | 565 // TODO(siggi): test invoking postPrivateMessage. |
566 | 566 |
OLD | NEW |