Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: chrome_frame/test/chrome_frame_test_utils.cc

Issue 18348025: ProcessSingleton now uses base::win::MessageWindow to create a message-only window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chrome_frame_test::ContextMenuTest destroys the clipboard Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "chrome_frame/test/chrome_frame_test_utils.h" 5 #include "chrome_frame/test/chrome_frame_test_utils.h"
6 6
7 #include <atlapp.h> 7 #include <atlapp.h>
8 #include <atlmisc.h> 8 #include <atlmisc.h>
9 #include <iepmapi.h> 9 #include <iepmapi.h>
10 #include <sddl.h> 10 #include <sddl.h>
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 return UTF8ToWide(gurl.PathForRequest()); 525 return UTF8ToWide(gurl.PathForRequest());
526 } 526 }
527 527
528 std::wstring GetClipboardText() { 528 std::wstring GetClipboardText() {
529 string16 text16; 529 string16 text16;
530 ui::Clipboard::GetForCurrentThread()->ReadText( 530 ui::Clipboard::GetForCurrentThread()->ReadText(
531 ui::Clipboard::BUFFER_STANDARD, &text16); 531 ui::Clipboard::BUFFER_STANDARD, &text16);
532 return UTF16ToWide(text16); 532 return UTF16ToWide(text16);
533 } 533 }
534 534
535 void DestroyClipboard() {
536 ui::Clipboard::DestroyClipboardForCurrentThread();
537 }
538
535 void SetClipboardText(const std::wstring& text) { 539 void SetClipboardText(const std::wstring& text) {
536 ui::ScopedClipboardWriter clipboard_writer( 540 ui::ScopedClipboardWriter clipboard_writer(
537 ui::Clipboard::GetForCurrentThread(), 541 ui::Clipboard::GetForCurrentThread(),
538 ui::Clipboard::BUFFER_STANDARD); 542 ui::Clipboard::BUFFER_STANDARD);
539 clipboard_writer.WriteText(WideToUTF16(text)); 543 clipboard_writer.WriteText(WideToUTF16(text));
540 } 544 }
541 545
542 bool AddCFMetaTag(std::string* html_data) { 546 bool AddCFMetaTag(std::string* html_data) {
543 if (!html_data) { 547 if (!html_data) {
544 NOTREACHED(); 548 NOTREACHED();
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 if (address.empty()) { 737 if (address.empty()) {
734 LOG(ERROR) << "Failed to find a non-loopback IP_V4 address. Tests will be " 738 LOG(ERROR) << "Failed to find a non-loopback IP_V4 address. Tests will be "
735 << "run over the loopback adapter, which may result in hangs."; 739 << "run over the loopback adapter, which may result in hangs.";
736 address.assign("127.0.0.1"); 740 address.assign("127.0.0.1");
737 } 741 }
738 742
739 return address; 743 return address;
740 } 744 }
741 745
742 } // namespace chrome_frame_test 746 } // namespace chrome_frame_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698