OLD | NEW |
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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/test/test_file_util.h" | 7 #include "base/test/test_file_util.h" |
8 #include "base/win/scoped_comptr.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" |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 EXPECT_CALL(ie_mock_, OnLoad(page2_.invokes_cf(), StrEq(GetSimplePageUrl()))) | 553 EXPECT_CALL(ie_mock_, OnLoad(page2_.invokes_cf(), StrEq(GetSimplePageUrl()))) |
554 .WillOnce(testing::DoAll( | 554 .WillOnce(testing::DoAll( |
555 VerifyAddressBarUrl(&ie_mock_), | 555 VerifyAddressBarUrl(&ie_mock_), |
556 CloseBrowserMock(&ie_mock_))); | 556 CloseBrowserMock(&ie_mock_))); |
557 | 557 |
558 LaunchIEAndNavigate(GetLinkPageUrl()); | 558 LaunchIEAndNavigate(GetLinkPageUrl()); |
559 } | 559 } |
560 | 560 |
561 // gMock matcher which tests if a url is blank. | 561 // gMock matcher which tests if a url is blank. |
562 MATCHER(BlankUrl, "is \"\" or NULL") { | 562 MATCHER(BlankUrl, "is \"\" or NULL") { |
563 return arg == NULL || wcslen(arg) == 0; | 563 return arg == NULL || *arg == L'\0'; |
564 } | 564 } |
565 | 565 |
566 // Basic navigation test fixture which uses the MockIEEventSink. These tests | 566 // Basic navigation test fixture which uses the MockIEEventSink. These tests |
567 // are not parameterized. | 567 // are not parameterized. |
568 class NavigationTest : public MockIEEventSinkTest, public testing::Test { | 568 class NavigationTest : public MockIEEventSinkTest, public testing::Test { |
569 public: | 569 public: |
570 NavigationTest() {} | 570 NavigationTest() {} |
571 | 571 |
572 void TestDisAllowedUrl(const wchar_t* url) { | 572 void TestDisAllowedUrl(const wchar_t* url) { |
573 // If a navigation fails then IE issues a navigation to an interstitial | 573 // If a navigation fails then IE issues a navigation to an interstitial |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 &no_referrer_target_opener_window_mock)); | 1264 &no_referrer_target_opener_window_mock)); |
1265 | 1265 |
1266 EXPECT_CALL(no_referrer_target_opener_window_mock, OnQuit()) | 1266 EXPECT_CALL(no_referrer_target_opener_window_mock, OnQuit()) |
1267 .WillOnce(CloseBrowserMock(&ie_mock_)); | 1267 .WillOnce(CloseBrowserMock(&ie_mock_)); |
1268 | 1268 |
1269 LaunchIENavigateAndLoop(initial_url, | 1269 LaunchIENavigateAndLoop(initial_url, |
1270 kChromeFrameVeryLongNavigationTimeoutInSeconds); | 1270 kChromeFrameVeryLongNavigationTimeoutInSeconds); |
1271 } | 1271 } |
1272 | 1272 |
1273 } // namespace chrome_frame_test | 1273 } // namespace chrome_frame_test |
OLD | NEW |