summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-11 09:22:38 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-11 09:22:38 +0000
commit4cf04bb7b4082903880aaa85d4a7d63803fa36d5 (patch)
treebf207d4fb70ccebf03d114c1d9b5164e17c1c956 /chrome_frame
parentb13efdc121f05e98122242c670a5d13286312f31 (diff)
downloadchromium_src-4cf04bb7b4082903880aaa85d4a7d63803fa36d5.zip
chromium_src-4cf04bb7b4082903880aaa85d4a7d63803fa36d5.tar.gz
chromium_src-4cf04bb7b4082903880aaa85d4a7d63803fa36d5.tar.bz2
ProcessSingleton now uses base::win::MessageWindow to create a message-only window.
Collateral changes: - base::win::MessageWindow registes a single window class used by all message-only windows it creates. The class is registered via base::LazyInstance. - Added base::win::MessageWindow::FindWindow() wrapper used to find other message-only windows, including the other created by a different process. - Removed chrome::kMessageWindowClass constant. - chrome_frame_test::ContextMenuTest destroys the clipboard during the test teardown. Review URL: https://chromiumcodereview.appspot.com/18348025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.cc4
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.h4
-rw-r--r--chrome_frame/test/ui_test.cc5
3 files changed, 13 insertions, 0 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index 80db1b3..c3c5d4c 100644
--- a/chrome_frame/test/chrome_frame_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_test_utils.cc
@@ -532,6 +532,10 @@ std::wstring GetClipboardText() {
return UTF16ToWide(text16);
}
+void DestroyClipboard() {
+ ui::Clipboard::DestroyClipboardForCurrentThread();
+}
+
void SetClipboardText(const std::wstring& text) {
ui::ScopedClipboardWriter clipboard_writer(
ui::Clipboard::GetForCurrentThread(),
diff --git a/chrome_frame/test/chrome_frame_test_utils.h b/chrome_frame/test/chrome_frame_test_utils.h
index f0d499f..8960ac6 100644
--- a/chrome_frame/test/chrome_frame_test_utils.h
+++ b/chrome_frame/test/chrome_frame_test_utils.h
@@ -303,6 +303,10 @@ bool AddCFMetaTag(std::string* html_data);
// Get text data from the clipboard.
std::wstring GetClipboardText();
+// Destroys the clipboard for the current thread. This function must be called
+// if GetClipboardText() or SetClipboardText() have been invoked.
+void DestroyClipboard();
+
// Puts the given text data on the clipboard. All previous items on the
// clipboard are removed.
void SetClipboardText(const std::wstring& text);
diff --git a/chrome_frame/test/ui_test.cc b/chrome_frame/test/ui_test.cc
index 11b270a..f44fec1 100644
--- a/chrome_frame/test/ui_test.cc
+++ b/chrome_frame/test/ui_test.cc
@@ -470,6 +470,11 @@ class ContextMenuTest : public MockIEEventSinkTest, public testing::Test {
EXPECT_CALL(acc_observer_, OnAccDocLoad(_)).Times(testing::AnyNumber());
}
+ virtual void TearDown() {
+ // Destroy the clipboard here because it is not destroyed automatically.
+ DestroyClipboard();
+ }
+
// Common helper function for "Save xxx As" tests.
void DoSaveAsTest(const wchar_t* role, const wchar_t* menu_item_name,
const wchar_t* file_ext) {