diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-31 21:44:26 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-31 21:44:26 +0000 |
commit | d9ca776c4b5443df5ffa55d53735016cfa92cb11 (patch) | |
tree | b38dc25a420ce51472fd8d0052d18b1e048d2970 /chrome_frame | |
parent | 9f9db89fe9a1b4e82ab3cfa25b579f8b46fe389e (diff) | |
download | chromium_src-d9ca776c4b5443df5ffa55d53735016cfa92cb11.zip chromium_src-d9ca776c4b5443df5ffa55d53735016cfa92cb11.tar.gz chromium_src-d9ca776c4b5443df5ffa55d53735016cfa92cb11.tar.bz2 |
Disabling building of CEEE; we will be moving the code to a separate
repository. Removing chrome_frame -> ceee dependency.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6386025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73195 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/PRESUBMIT.py | 30 | ||||
-rw-r--r-- | chrome_frame/chrome_frame.gyp | 41 | ||||
-rw-r--r-- | chrome_frame/chrome_frame_activex_base.h | 8 | ||||
-rw-r--r-- | chrome_frame/test/chrome_frame_activex_unittest.cc | 100 | ||||
-rw-r--r-- | chrome_frame/test/chrome_frame_test_utils.cc | 4 |
5 files changed, 2 insertions, 181 deletions
diff --git a/chrome_frame/PRESUBMIT.py b/chrome_frame/PRESUBMIT.py deleted file mode 100644 index c3836b8..0000000 --- a/chrome_frame/PRESUBMIT.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2011 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. - -import sys - - -def CheckChange(input_api, output_api, committing): - # We need to change the path so that we can import ceee_presubmit - # which lies at the root of the ceee folder. And we do it here so that - # it doesn't pollute all the cases where we get imported yet not called. - old_sys_path = sys.path - ceee_path = input_api.os_path.join(input_api.PresubmitLocalPath(), '../ceee') - try: - sys.path = [ceee_path] + sys.path - import ceee_presubmit - return ceee_presubmit.CheckChange(input_api, - output_api, - committing, - is_chrome_frame=True) - finally: - sys.path = old_sys_path - - -def CheckChangeOnUpload(input_api, output_api): - return CheckChange(input_api, output_api, False) - - -def CheckChangeOnCommit(input_api, output_api): - return CheckChange(input_api, output_api, True) diff --git a/chrome_frame/chrome_frame.gyp b/chrome_frame/chrome_frame.gyp index de69141..ce987be 100644 --- a/chrome_frame/chrome_frame.gyp +++ b/chrome_frame/chrome_frame.gyp @@ -105,52 +105,14 @@ }, }, { - 'target_name': 'chrome_frame_privileged_mock', - 'type': 'none', - 'dependencies': [ - 'chrome_tab_idl', - ], - 'sources': [ - '../ceee/testing/utils/com_mock.py', - '<(SHARED_INTERMEDIATE_DIR)/chrome_tab.h', - ], - 'actions': [ - { - 'action_name': 'make_chrome_frame_privileged_mock', - 'msvs_cygwin_shell': 0, - 'msvs_quote_cmd': 0, - 'inputs': [ - '../ceee/testing/utils/com_mock.py', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/mock_ichromeframeprivileged.gen', - ], - 'action': [ - '<@(python)', - '../ceee/testing/utils/com_mock.py', - 'IChromeFramePrivileged', - '<(SHARED_INTERMEDIATE_DIR)/chrome_tab.h', - '> "<(SHARED_INTERMEDIATE_DIR)/mock_ichromeframeprivileged.gen"', - ], - }, - ], - # All who use this need to be able to find the .gen file we generate. - 'all_dependent_settings': { - 'include_dirs': ['<(SHARED_INTERMEDIATE_DIR)'], - }, - }, - { 'target_name': 'chrome_frame_unittests', 'type': 'executable', 'dependencies': [ '../base/base.gyp:test_support_base', - '../ceee/ie/common/common.gyp:ie_common', - '../ceee/testing/utils/test_utils.gyp:test_utils', '../chrome/chrome.gyp:policy', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', 'chrome_frame_ie', - 'chrome_frame_privileged_mock', 'chrome_frame_strings', 'chrome_tab_idl', 'xulrunner_sdk', @@ -165,7 +127,6 @@ 'chrome_launcher_unittest.cc', 'function_stub_unittest.cc', 'renderer_glue.cc', - 'test/chrome_frame_activex_unittest.cc', 'test/chrome_tab_mocks.h', 'test/chrome_frame_test_utils.h', 'test/chrome_frame_test_utils.cc', @@ -793,8 +754,6 @@ 'chrome_frame_strings', 'chrome_frame_utils', 'chrome_tab_idl', - '../ceee/ie/common/common.gyp:ie_common', - '../ceee/ie/common/common.gyp:ie_guids', '../chrome/chrome.gyp:common', '../chrome/chrome.gyp:policy', '../chrome/chrome.gyp:utility', diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h index 510de4c..8ef28b5 100644 --- a/chrome_frame/chrome_frame_activex_base.h +++ b/chrome_frame/chrome_frame_activex_base.h @@ -24,7 +24,6 @@ #include "base/win/scoped_comptr.h" #include "base/win/scoped_variant.h" #include "grit/chrome_frame_resources.h" -#include "ceee/ie/common/ceee_util.h" #include "chrome/common/url_constants.h" #include "chrome_frame/chrome_frame_plugin.h" #include "chrome_frame/com_message_event.h" @@ -398,12 +397,7 @@ END_MSG_MAP() (lstrcmpi(profile_name.c_str(), kRundllProfileName) == 0); // Browsers without IDeleteBrowsingHistory in non-priv mode // have their profiles moved into "Temporary Internet Files". - // - // If CEEE is registered, we must have a persistent profile. We - // considered checking if e.g. ceee_ie.dll is loaded in the process - // but this gets into edge cases when the user enables the CEEE add-on - // after CF is first loaded. - if (is_IE && GetIEVersion() < IE_8 && !ceee_util::IsIeCeeeRegistered()) { + if (is_IE && GetIEVersion() < IE_8) { *profile_path = GetIETemporaryFilesFolder(); *profile_path = profile_path->Append(L"Google Chrome Frame"); } else { diff --git a/chrome_frame/test/chrome_frame_activex_unittest.cc b/chrome_frame/test/chrome_frame_activex_unittest.cc deleted file mode 100644 index 93f570f..0000000 --- a/chrome_frame/test/chrome_frame_activex_unittest.cc +++ /dev/null @@ -1,100 +0,0 @@ -// 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. -// -// Unit tests for ChromeFrameActivex. - -#include "chrome_frame/chrome_frame_activex.h" - -#include "ceee/common/initializing_coclass.h" -#include "ceee/testing/utils/test_utils.h" -#include "ceee/testing/utils/mock_com.h" -#include "chrome_frame/test/chrome_tab_mocks.h" -#include "gtest/gtest.h" -#include "gmock/gmock.h" - -namespace { - -using testing::_; -using testing::AddRef; -using testing::DoAll; -using testing::IOleClientSiteMockImpl; -using testing::IServiceProviderMockImpl; -using testing::MockIChromeFramePrivileged; -using testing::Return; -using testing::SetArgumentPointee; -using testing::StrictMock; - -// Just to unhide the static function. -class TestingChromeFrameActivex : public ChromeFrameActivex { - public: - static HRESULT TestingShouldShowVersionMismatchDialog( - bool is_privileged, IOleClientSite* client_site) { - return ShouldShowVersionMismatchDialog(is_privileged, client_site); - } -}; - -class MockChromeFrameClientSite - : public CComObjectRootEx<CComSingleThreadModel>, - public StrictMock<IOleClientSiteMockImpl>, - public StrictMock<IServiceProviderMockImpl> { - public: - DECLARE_NOT_AGGREGATABLE(MockChromeFrameClientSite) - BEGIN_COM_MAP(MockChromeFrameClientSite) - COM_INTERFACE_ENTRY(IOleClientSite) - COM_INTERFACE_ENTRY(IServiceProvider) - END_COM_MAP() - DECLARE_PROTECT_FINAL_CONSTRUCT() - - HRESULT Initialize(MockChromeFrameClientSite** client_site) { - *client_site = this; - return S_OK; - } -}; - -TEST(ChromeFrameActivex, ShouldShowVersionMismatchDialog) { - // If not privileged, we always show the dialog. - ASSERT_TRUE( - TestingChromeFrameActivex::TestingShouldShowVersionMismatchDialog( - false, NULL)); - - MockChromeFrameClientSite* cs_keeper; - ScopedComPtr<IOleClientSite> cs; - ASSERT_HRESULT_SUCCEEDED( - InitializingCoClass<MockChromeFrameClientSite>::CreateInitialized( - &cs_keeper, cs.Receive())); - - MockIChromeFramePrivileged* cfp_keeper; - ScopedComPtr<IChromeFramePrivileged> cfp; - ASSERT_HRESULT_SUCCEEDED( - InitializingCoClass<MockIChromeFramePrivileged>::CreateInitialized( - &cfp_keeper, cfp.Receive())); - - EXPECT_CALL(*cs_keeper, QueryService(SID_ChromeFramePrivileged, - IID_IChromeFramePrivileged, _)) - .WillRepeatedly(DoAll(AddRef(cfp.get()), - SetArgumentPointee<2>(static_cast<void*>(cfp)), - Return(S_OK))); - - EXPECT_CALL(*cfp_keeper, ShouldShowVersionMismatchDialog()) - .WillOnce(Return(S_OK)); - ASSERT_TRUE( - TestingChromeFrameActivex::TestingShouldShowVersionMismatchDialog( - true, cs_keeper)); - - EXPECT_CALL(*cfp_keeper, ShouldShowVersionMismatchDialog()) - .WillOnce(Return(S_FALSE)); - ASSERT_FALSE( - TestingChromeFrameActivex::TestingShouldShowVersionMismatchDialog( - true, cs_keeper)); - - // Also test that we fail safe, showing the dialog unless we got - // an affirmative do-not-show. - EXPECT_CALL(*cfp_keeper, ShouldShowVersionMismatchDialog()) - .WillOnce(Return(E_UNEXPECTED)); - ASSERT_TRUE( - TestingChromeFrameActivex::TestingShouldShowVersionMismatchDialog( - true, cs_keeper)); -} - -} // namespace diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc index beeba70..85ecc5b 100644 --- a/chrome_frame/test/chrome_frame_test_utils.cc +++ b/chrome_frame/test/chrome_frame_test_utils.cc @@ -21,7 +21,6 @@ #include "base/win/registry.h" #include "base/win/scoped_handle.h" #include "base/win/windows_version.h" -#include "ceee/ie/common/ceee_util.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths_internal.h" @@ -438,14 +437,13 @@ IEVersion GetInstalledIEVersion() { return IE_UNSUPPORTED; } -// TODO(joi@chromium.org) Could share this code with chrome_frame_plugin.h FilePath GetProfilePathForIE() { FilePath profile_path; // Browsers without IDeleteBrowsingHistory in non-priv mode // have their profiles moved into "Temporary Internet Files". // The code below basically retrieves the version of IE and computes // the profile directory accordingly. - if (GetInstalledIEVersion() <= IE_7 && !ceee_util::IsIeCeeeRegistered()) { + if (GetInstalledIEVersion() <= IE_7) { profile_path = GetIETemporaryFilesFolder(); profile_path = profile_path.Append(L"Google Chrome Frame"); } else { |