1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 #include "chrome_frame/test/chrome_frame_test_utils.h"
8 #include "chrome_frame/test/mock_ie_event_sink_actions.h"
9 #include "chrome_frame/test/mock_ie_event_sink_test.h"
14 namespace chrome_frame_test
{
16 // Test fixture for compatibility/reliability tests.
17 class ChromeFrameSitesTest
18 : public MockIEEventSinkTest
,
19 public testing::TestWithParam
<std::wstring
> {
21 ChromeFrameSitesTest() {}
23 virtual void SetUp() {
24 // Permit navigation in both IE and CF.
25 ie_mock_
.ExpectAnyNavigations();
29 INSTANTIATE_TEST_CASE_P(CF
, ChromeFrameSitesTest
,
30 testing::Values(L
"http://www.meebo.com/",
31 L
"http://www.vimeo.com/",
32 L
"http://wordpress.com/",
33 L
"https://github.com/"));
35 // Test for navigating to a site that has a CF metatag.
36 TEST_P(ChromeFrameSitesTest
, LoadSite
) {
37 // Print name of site for debugging purposes.
38 std::wcout
<< L
"Navigating to site: " << GetParam() << std::endl
;
40 // Verify navigation to the url passed in as parameter.
41 EXPECT_CALL(ie_mock_
, OnLoad(IN_CF
, StrEq(GetParam())))
42 .WillOnce(testing::DoAll(
43 VerifyAddressBarUrl(&ie_mock_
),
44 CloseBrowserMock(&ie_mock_
)));
46 LaunchIENavigateAndLoop(GetParam(), kChromeFrameLongNavigationTimeout
* 2);
49 } // namespace chrome_frame_test