| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlcom.h> | 9 #include <atlcom.h> |
| 10 #include <exdisp.h> | 10 #include <exdisp.h> |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 // Returns the path portion of the url. | 142 // Returns the path portion of the url. |
| 143 std::wstring GetPathFromUrl(const std::wstring& url); | 143 std::wstring GetPathFromUrl(const std::wstring& url); |
| 144 | 144 |
| 145 // Returns the path and query portion of the url. | 145 // Returns the path and query portion of the url. |
| 146 std::wstring GetPathAndQueryFromUrl(const std::wstring& url); | 146 std::wstring GetPathAndQueryFromUrl(const std::wstring& url); |
| 147 | 147 |
| 148 // Adds the CF meta tag to the html page. Returns true if successful. | 148 // Adds the CF meta tag to the html page. Returns true if successful. |
| 149 bool AddCFMetaTag(std::string* html_data); | 149 bool AddCFMetaTag(std::string* html_data); |
| 150 | 150 |
| 151 // Get text data from the clipboard. |
| 152 std::wstring GetClipboardText(); |
| 153 |
| 154 // Puts the given text data on the clipboard. All previous items on the |
| 155 // clipboard are removed. |
| 156 void SetClipboardText(const std::wstring& text); |
| 157 |
| 151 // A convenience class to close all open IE windows at the end | 158 // A convenience class to close all open IE windows at the end |
| 152 // of a scope. It's more convenient to do it this way than to | 159 // of a scope. It's more convenient to do it this way than to |
| 153 // explicitly call chrome_frame_test::CloseAllIEWindows at the | 160 // explicitly call chrome_frame_test::CloseAllIEWindows at the |
| 154 // end of a test since part of the test's cleanup code may be | 161 // end of a test since part of the test's cleanup code may be |
| 155 // in object destructors that would run after CloseAllIEWindows | 162 // in object destructors that would run after CloseAllIEWindows |
| 156 // would get called. | 163 // would get called. |
| 157 // Ideally all IE windows should be closed when this happens so | 164 // Ideally all IE windows should be closed when this happens so |
| 158 // if the test ran normally, we should not have any windows to | 165 // if the test ran normally, we should not have any windows to |
| 159 // close at this point. | 166 // close at this point. |
| 160 class CloseIeAtEndOfScope { | 167 class CloseIeAtEndOfScope { |
| 161 public: | 168 public: |
| 162 CloseIeAtEndOfScope() {} | 169 CloseIeAtEndOfScope() {} |
| 163 ~CloseIeAtEndOfScope(); | 170 ~CloseIeAtEndOfScope(); |
| 164 }; | 171 }; |
| 165 | 172 |
| 166 // Starts the Chrome crash service which enables us to gather crash dumps | 173 // Starts the Chrome crash service which enables us to gather crash dumps |
| 167 // during test runs. | 174 // during test runs. |
| 168 base::ProcessHandle StartCrashService(); | 175 base::ProcessHandle StartCrashService(); |
| 169 | 176 |
| 170 } // namespace chrome_frame_test | 177 } // namespace chrome_frame_test |
| 171 | 178 |
| 172 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 179 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
| OLD | NEW |