| OLD | NEW |
| 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 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 5 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
| 6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include <atlbase.h> | 10 #include <atlbase.h> |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 // Returns the path and query portion of the url. | 297 // Returns the path and query portion of the url. |
| 298 std::wstring GetPathAndQueryFromUrl(const std::wstring& url); | 298 std::wstring GetPathAndQueryFromUrl(const std::wstring& url); |
| 299 | 299 |
| 300 // Adds the CF meta tag to the html page. Returns true if successful. | 300 // Adds the CF meta tag to the html page. Returns true if successful. |
| 301 bool AddCFMetaTag(std::string* html_data); | 301 bool AddCFMetaTag(std::string* html_data); |
| 302 | 302 |
| 303 // Get text data from the clipboard. | 303 // Get text data from the clipboard. |
| 304 std::wstring GetClipboardText(); | 304 std::wstring GetClipboardText(); |
| 305 | 305 |
| 306 // Destroys the clipboard for the current thread. This function must be called |
| 307 // if GetClipboardText() or SetClipboardText() have been invoked. |
| 308 void DestroyClipboard(); |
| 309 |
| 306 // Puts the given text data on the clipboard. All previous items on the | 310 // Puts the given text data on the clipboard. All previous items on the |
| 307 // clipboard are removed. | 311 // clipboard are removed. |
| 308 void SetClipboardText(const std::wstring& text); | 312 void SetClipboardText(const std::wstring& text); |
| 309 | 313 |
| 310 // A convenience class to close all open IE windows at the end | 314 // A convenience class to close all open IE windows at the end |
| 311 // of a scope. It's more convenient to do it this way than to | 315 // of a scope. It's more convenient to do it this way than to |
| 312 // explicitly call chrome_frame_test::CloseAllIEWindows at the | 316 // explicitly call chrome_frame_test::CloseAllIEWindows at the |
| 313 // end of a test since part of the test's cleanup code may be | 317 // end of a test since part of the test's cleanup code may be |
| 314 // in object destructors that would run after CloseAllIEWindows | 318 // in object destructors that would run after CloseAllIEWindows |
| 315 // would get called. | 319 // would get called. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 } // namespace chrome_frame_test | 369 } // namespace chrome_frame_test |
| 366 | 370 |
| 367 // TODO(tommi): This is a temporary workaround while we're getting our | 371 // TODO(tommi): This is a temporary workaround while we're getting our |
| 368 // Singleton story straight. Ideally each test should clear up any singletons | 372 // Singleton story straight. Ideally each test should clear up any singletons |
| 369 // it might have created, but test cases do not implicitly have their own | 373 // it might have created, but test cases do not implicitly have their own |
| 370 // AtExitManager, so we have this workaround method for tests that depend on | 374 // AtExitManager, so we have this workaround method for tests that depend on |
| 371 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. | 375 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. |
| 372 void DeleteAllSingletons(); | 376 void DeleteAllSingletons(); |
| 373 | 377 |
| 374 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 378 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
| OLD | NEW |