| 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_MOCK_IE_EVENT_SINK_TEST_H_ | 5 #ifndef CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_TEST_H_ |
| 6 #define CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_TEST_H_ | 6 #define CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_TEST_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlcom.h> | 9 #include <atlcom.h> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // is destroyed. | 285 // is destroyed. |
| 286 ie_mock_.Detach(); | 286 ie_mock_.Detach(); |
| 287 } | 287 } |
| 288 | 288 |
| 289 // Launches IE as a COM server and sets |ie_mock_| as the event sink, then | 289 // Launches IE as a COM server and sets |ie_mock_| as the event sink, then |
| 290 // navigates to the given url. Then the timed message loop is run until | 290 // navigates to the given url. Then the timed message loop is run until |
| 291 // |ie_mock_| receives OnQuit or the timeout is exceeded. | 291 // |ie_mock_| receives OnQuit or the timeout is exceeded. |
| 292 void LaunchIEAndNavigate(const std::wstring& url); | 292 void LaunchIEAndNavigate(const std::wstring& url); |
| 293 | 293 |
| 294 // Same as above but allows the timeout to be specified. | 294 // Same as above but allows the timeout to be specified. |
| 295 void LaunchIENavigateAndLoop(const std::wstring& url, int timeout); | 295 void LaunchIENavigateAndLoop(const std::wstring& url, |
| 296 base::TimeDelta timeout); |
| 296 | 297 |
| 297 // Returns the url for the test file given. |relative_path| should be | 298 // Returns the url for the test file given. |relative_path| should be |
| 298 // relative to the test data directory. | 299 // relative to the test data directory. |
| 299 std::wstring GetTestUrl(const std::wstring& relative_path); | 300 std::wstring GetTestUrl(const std::wstring& relative_path); |
| 300 | 301 |
| 301 // Returns the absolute FilePath for the test file given. |relative_path| | 302 // Returns the absolute FilePath for the test file given. |relative_path| |
| 302 // should be relative to the test data directory. | 303 // should be relative to the test data directory. |
| 303 FilePath GetTestFilePath(const std::wstring& relative_path); | 304 FilePath GetTestFilePath(const std::wstring& relative_path); |
| 304 | 305 |
| 305 // Returns the url for an html page just containing some text. Iff |use_cf| | 306 // Returns the url for an html page just containing some text. Iff |use_cf| |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 testing::StrictMock<MockIEEventSink> ie_mock_; | 359 testing::StrictMock<MockIEEventSink> ie_mock_; |
| 359 testing::StrictMock<MockWebServer> server_mock_; | 360 testing::StrictMock<MockWebServer> server_mock_; |
| 360 scoped_refptr<HungCOMCallDetector> hung_call_detector_; | 361 scoped_refptr<HungCOMCallDetector> hung_call_detector_; |
| 361 private: | 362 private: |
| 362 DISALLOW_COPY_AND_ASSIGN(MockIEEventSinkTest); | 363 DISALLOW_COPY_AND_ASSIGN(MockIEEventSinkTest); |
| 363 }; | 364 }; |
| 364 | 365 |
| 365 } // namespace chrome_frame_test | 366 } // namespace chrome_frame_test |
| 366 | 367 |
| 367 #endif // CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_TEST_H_ | 368 #endif // CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_TEST_H_ |
| OLD | NEW |