diff options
author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 01:31:11 +0000 |
---|---|---|
committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 01:31:11 +0000 |
commit | 245805f2ca36d470c194ae07025af6e17fb1d72b (patch) | |
tree | c882589bb267490c14642a862ae99eca06560fb4 /chrome_frame/test | |
parent | c324a4bab7c531d95e4abb7c1b976c820ef09674 (diff) | |
download | chromium_src-245805f2ca36d470c194ae07025af6e17fb1d72b.zip chromium_src-245805f2ca36d470c194ae07025af6e17fb1d72b.tar.gz chromium_src-245805f2ca36d470c194ae07025af6e17fb1d72b.tar.bz2 |
Create new test binary for Chrome Frame for running QA tests. Original patch by mberkowitz@chromium.org.
BUG=none
TEST=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68546 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/external_sites_test.cc | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/chrome_frame/test/external_sites_test.cc b/chrome_frame/test/external_sites_test.cc new file mode 100644 index 0000000..c24b62ca --- /dev/null +++ b/chrome_frame/test/external_sites_test.cc @@ -0,0 +1,50 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <string> + +#include "chrome_frame/test/chrome_frame_test_utils.h" +#include "chrome_frame/test/mock_ie_event_sink_actions.h" +#include "chrome_frame/test/mock_ie_event_sink_test.h" + +using testing::_; +using testing::StrEq; + +namespace chrome_frame_test { + +// Test fixture for compatibility/reliability tests. +class ChromeFrameSitesTest + : public MockIEEventSinkTest, + public testing::TestWithParam<std::wstring> { + public: + ChromeFrameSitesTest() {} + + virtual void SetUp() { + // Permit navigation in both IE and CF. + ie_mock_.ExpectAnyNavigations(); + } +}; + +INSTANTIATE_TEST_CASE_P(CF, ChromeFrameSitesTest, + testing::Values(L"http://www.meebo.com/", + L"http://www.vimeo.com/", + L"http://wordpress.com/", + L"https://github.com/")); + +// Test for navigating to a site that has a CF metatag. +TEST_P(ChromeFrameSitesTest, LoadSite) { + // Print name of site for debugging purposes. + std::wcout << L"Navigating to site: " << GetParam() << std::endl; + + // Verify navigation to the url passed in as parameter. + EXPECT_CALL(ie_mock_, OnLoad(IN_CF, StrEq(GetParam()))) + .WillOnce(testing::DoAll( + VerifyAddressBarUrl(&ie_mock_), + CloseBrowserMock(&ie_mock_))); + + LaunchIENavigateAndLoop(GetParam(), + kChromeFrameLongNavigationTimeoutInSeconds * 2); +} + +} // namespace chrome_frame_test |