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

Side by Side Diff: chrome_frame/test/test_mock_with_web_server.h

Issue 2173002: Add chrome frame tests for common navigation cases to ensure IE is not broken. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: final Created 10 years, 6 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
« no previous file with comments | « chrome_frame/test/simulate_input.cc ('k') | chrome_frame/test/test_mock_with_web_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 #ifndef CHROME_FRAME_TEST_MOCK_WITH_WEB_SERVER_H_ 4 #ifndef CHROME_FRAME_TEST_MOCK_WITH_WEB_SERVER_H_
5 #define CHROME_FRAME_TEST_MOCK_WITH_WEB_SERVER_H_ 5 #define CHROME_FRAME_TEST_MOCK_WITH_WEB_SERVER_H_
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "gmock/gmock.h" 9 #include "gmock/gmock.h"
10 #include "chrome_frame/chrome_frame_automation.h" 10 #include "chrome_frame/chrome_frame_automation.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 MOCK_METHOD1(OnLoad, void (const wchar_t* url)); // NOLINT 68 MOCK_METHOD1(OnLoad, void (const wchar_t* url)); // NOLINT
69 MOCK_METHOD1(OnLoadError, void (const wchar_t* url)); // NOLINT 69 MOCK_METHOD1(OnLoadError, void (const wchar_t* url)); // NOLINT
70 MOCK_METHOD3(OnMessage, void (const wchar_t* message, 70 MOCK_METHOD3(OnMessage, void (const wchar_t* message,
71 const wchar_t* origin, 71 const wchar_t* origin,
72 const wchar_t* source)); // NOLINT 72 const wchar_t* source)); // NOLINT
73 MOCK_METHOD2(OnNewBrowserWindow, void (IDispatch* dispatch, // NOLINT 73 MOCK_METHOD2(OnNewBrowserWindow, void (IDispatch* dispatch, // NOLINT
74 const wchar_t* url)); 74 const wchar_t* url));
75 MOCK_METHOD2(OnWindowDetected, void (HWND hwnd, // NOLINT 75 MOCK_METHOD2(OnWindowDetected, void (HWND hwnd, // NOLINT
76 const std::string& caption)); 76 const std::string& caption));
77 77
78 // Test expectations 78 // Test expectations for general navigations.
79 ExpectationSet ExpectNavigationCardinality(const std::wstring& url, 79 ExpectationSet ExpectNavigationCardinality(const std::wstring& url,
80 testing::Cardinality cardinality); 80 testing::Cardinality cardinality);
81 ExpectationSet ExpectNavigation(const std::wstring& url); 81 ExpectationSet ExpectNavigation(const std::wstring& url);
82 ExpectationSet ExpectNavigationAndSwitch(const std::wstring& url); 82 ExpectationSet ExpectNavigationAndSwitch(const std::wstring& url);
83 ExpectationSet ExpectNavigationAndSwitchSequence(const std::wstring& url); 83 ExpectationSet ExpectNavigationAndSwitchSequence(const std::wstring& url);
84 ExpectationSet ExpectNewWindow(MockWebBrowserEventSink* new_window_mock); 84 ExpectationSet ExpectNewWindow(MockWebBrowserEventSink* new_window_mock);
85 ExpectationSet MockWebBrowserEventSink::ExpectNavigationSequenceForAnchors( 85 ExpectationSet ExpectNavigationSequenceForAnchors(const std::wstring& url);
86 const std::wstring& url); 86
87 // Test expectations for navigations with an IE renderer.
88 // Expect one navigation to occur.
89 ExpectationSet ExpectNavigationInIE(const std::wstring& url);
90 // Expect a new window to be opened to |url|. Set |new_window_mock| as the new
91 // window.
92 ExpectationSet ExpectNewWindowWithIE(
93 const std::wstring& url, MockWebBrowserEventSink* new_window_mock);
87 }; 94 };
88 95
89 ACTION_P(CloseBrowserMock, mock) { 96 ACTION_P(CloseBrowserMock, mock) {
90 mock->CloseWebBrowser(); 97 mock->CloseWebBrowser();
91 } 98 }
92 99
93 ACTION_P(VerifyAddressBarUrl, mock) { 100 ACTION_P(VerifyAddressBarUrl, mock) {
94 mock->ExpectAddressBarUrl(std::wstring(arg0)); 101 mock->ExpectAddressBarUrl(std::wstring(arg0));
95 } 102 }
96 103
97 } // namespace chrome_frame_test 104 } // namespace chrome_frame_test
98 105
99 #endif // CHROME_FRAME_TEST_MOCK_WITH_WEB_SERVER_H_ 106 #endif // CHROME_FRAME_TEST_MOCK_WITH_WEB_SERVER_H_
100 107
OLDNEW
« no previous file with comments | « chrome_frame/test/simulate_input.cc ('k') | chrome_frame/test/test_mock_with_web_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698