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 #include "chrome_frame/test/mock_ie_event_sink_test.h" | 5 #include "chrome_frame/test/mock_ie_event_sink_test.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/win/scoped_variant.h" | 9 #include "base/win/scoped_variant.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 .Times(split_complete_cardinality) | 87 .Times(split_complete_cardinality) |
88 .RetiresOnSaturation(); | 88 .RetiresOnSaturation(); |
89 } | 89 } |
90 call_count++; | 90 call_count++; |
91 } | 91 } |
92 return navigation; | 92 return navigation; |
93 } | 93 } |
94 | 94 |
95 void MockIEEventSink::ExpectNavigation(bool is_cf, const std::wstring& url) { | 95 void MockIEEventSink::ExpectNavigation(bool is_cf, const std::wstring& url) { |
96 InSequence expect_in_sequence_for_scope; | 96 InSequence expect_in_sequence_for_scope; |
97 if (is_cf) { | 97 if (is_cf || GetInstalledIEVersion() == IE_9) { |
98 ExpectNavigationCardinality(url, Exactly(1), testing::Between(1, 2)); | 98 ExpectNavigationCardinality(url, Exactly(1), testing::Between(1, 2)); |
99 } else { | 99 } else { |
100 ExpectNavigationCardinality(url, Exactly(1), Exactly(1)); | 100 ExpectNavigationCardinality(url, Exactly(1), Exactly(1)); |
101 } | 101 } |
102 } | 102 } |
103 | 103 |
104 void MockIEEventSink::ExpectNavigationOptionalBefore(bool is_cf, | 104 void MockIEEventSink::ExpectNavigationOptionalBefore(bool is_cf, |
105 const std::wstring& url) { | 105 const std::wstring& url) { |
106 InSequence expect_in_sequence_for_scope; | 106 InSequence expect_in_sequence_for_scope; |
107 if (is_cf && GetInstalledIEVersion() == IE_6) { | 107 if (is_cf && GetInstalledIEVersion() == IE_6) { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 const std::wstring& relative_path) { | 207 const std::wstring& relative_path) { |
208 return server_mock_.root_dir().Append(relative_path); | 208 return server_mock_.root_dir().Append(relative_path); |
209 } | 209 } |
210 | 210 |
211 std::wstring MockIEEventSinkTest::GetTestUrl( | 211 std::wstring MockIEEventSinkTest::GetTestUrl( |
212 const std::wstring& relative_path) { | 212 const std::wstring& relative_path) { |
213 return server_mock_.Resolve(relative_path.c_str()); | 213 return server_mock_.Resolve(relative_path.c_str()); |
214 } | 214 } |
215 | 215 |
216 } // namespace chrome_frame_test | 216 } // namespace chrome_frame_test |
OLD | NEW |