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

Side by Side Diff: chrome_frame/test/navigation_test.cc

Issue 6825055: Include base/win/scoped_comptr.h instead of base/scoped_comptr_win.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert bad indentation, rebase Created 9 years, 8 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 (c) 2010 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 <string> 5 #include <string>
6 6
7 #include "base/scoped_comptr_win.h"
8 #include "base/test/test_file_util.h" 7 #include "base/test/test_file_util.h"
8 #include "base/win/scoped_comptr.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "chrome_frame/test/chrome_frame_test_utils.h" 10 #include "chrome_frame/test/chrome_frame_test_utils.h"
11 #include "chrome_frame/test/chrome_frame_ui_test_utils.h" 11 #include "chrome_frame/test/chrome_frame_ui_test_utils.h"
12 #include "chrome_frame/test/mock_ie_event_sink_actions.h" 12 #include "chrome_frame/test/mock_ie_event_sink_actions.h"
13 #include "chrome_frame/test/mock_ie_event_sink_test.h" 13 #include "chrome_frame/test/mock_ie_event_sink_test.h"
14 #include "net/http/http_util.h" 14 #include "net/http/http_util.h"
15 15
16 // Needed for CreateFunctor. 16 // Needed for CreateFunctor.
17 #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING 17 #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
18 #include "testing/gmock_mutant.h" 18 #include "testing/gmock_mutant.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(3)))) 270 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(3))))
271 .WillOnce(CloseBrowserMock(&ie_mock_)); 271 .WillOnce(CloseBrowserMock(&ie_mock_));
272 272
273 LaunchIEAndNavigate(GetAnchorPageUrl(0)); 273 LaunchIEAndNavigate(GetAnchorPageUrl(0));
274 } 274 }
275 275
276 // Test that a user cannot navigate to a restricted site and that the security 276 // Test that a user cannot navigate to a restricted site and that the security
277 // dialog appears. 277 // dialog appears.
278 TEST_P(FullTabNavigationTest, RestrictedSite) { 278 TEST_P(FullTabNavigationTest, RestrictedSite) {
279 // Add the server to restricted sites zone. 279 // Add the server to restricted sites zone.
280 ScopedComPtr<IInternetSecurityManager> security_manager; 280 base::win::ScopedComPtr<IInternetSecurityManager> security_manager;
281 HRESULT hr = security_manager.CreateInstance(CLSID_InternetSecurityManager); 281 HRESULT hr = security_manager.CreateInstance(CLSID_InternetSecurityManager);
282 ASSERT_HRESULT_SUCCEEDED(hr); 282 ASSERT_HRESULT_SUCCEEDED(hr);
283 hr = security_manager->SetZoneMapping(URLZONE_UNTRUSTED, 283 hr = security_manager->SetZoneMapping(URLZONE_UNTRUSTED,
284 GetTestUrl(L"").c_str(), SZM_CREATE); 284 GetTestUrl(L"").c_str(), SZM_CREATE);
285 285
286 EXPECT_CALL(ie_mock_, OnFileDownload(_, _)).Times(testing::AnyNumber()); 286 EXPECT_CALL(ie_mock_, OnFileDownload(_, _)).Times(testing::AnyNumber());
287 server_mock_.ExpectAndServeAnyRequests(GetParam()); 287 server_mock_.ExpectAndServeAnyRequests(GetParam());
288 288
289 MockWindowObserver win_observer_mock; 289 MockWindowObserver win_observer_mock;
290 290
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 &no_referrer_target_opener_window_mock)); 1263 &no_referrer_target_opener_window_mock));
1264 1264
1265 EXPECT_CALL(no_referrer_target_opener_window_mock, OnQuit()) 1265 EXPECT_CALL(no_referrer_target_opener_window_mock, OnQuit())
1266 .WillOnce(CloseBrowserMock(&ie_mock_)); 1266 .WillOnce(CloseBrowserMock(&ie_mock_));
1267 1267
1268 LaunchIENavigateAndLoop(initial_url, 1268 LaunchIENavigateAndLoop(initial_url,
1269 kChromeFrameLongNavigationTimeoutInSeconds); 1269 kChromeFrameLongNavigationTimeoutInSeconds);
1270 } 1270 }
1271 1271
1272 } // namespace chrome_frame_test 1272 } // namespace chrome_frame_test
OLDNEW
« no previous file with comments | « chrome_frame/test/mock_ie_event_sink_test.cc ('k') | chrome_frame/test/net/fake_external_tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698