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 #include "chrome_frame/test/perf/chrome_frame_perftest.h" | 5 #include "chrome_frame/test/perf/chrome_frame_perftest.h" |
6 | 6 |
7 #include <atlhost.h> | 7 #include <atlhost.h> |
8 #include <atlwin.h> | 8 #include <atlwin.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 hr = chromeview_.QueryControl(tab_.Receive()); | 173 hr = chromeview_.QueryControl(tab_.Receive()); |
174 EXPECT_HRESULT_SUCCEEDED(hr); | 174 EXPECT_HRESULT_SUCCEEDED(hr); |
175 | 175 |
176 if (setup_event_sinks) | 176 if (setup_event_sinks) |
177 SetupEventSinks(); | 177 SetupEventSinks(); |
178 } | 178 } |
179 | 179 |
180 void Navigate(const char* url) { | 180 void Navigate(const char* url) { |
181 BeforeNavigateImpl(url); | 181 BeforeNavigateImpl(url); |
182 | 182 |
183 HRESULT hr = tab_->put_src(base::win::ScopedBstr(UTF8ToWide(url).c_str())); | 183 HRESULT hr = |
| 184 tab_->put_src(base::win::ScopedBstr(base::UTF8ToWide(url).c_str())); |
184 DCHECK(hr == S_OK) << "Chrome frame NavigateToURL(" << url | 185 DCHECK(hr == S_OK) << "Chrome frame NavigateToURL(" << url |
185 << base::StringPrintf(L") failed 0x%08X", hr); | 186 << base::StringPrintf(L") failed 0x%08X", hr); |
186 } | 187 } |
187 | 188 |
188 void SetupEventSinks() { | 189 void SetupEventSinks() { |
189 HRESULT hr = AtlAdvise(tab_, this, IID_IPropertyNotifySink, | 190 HRESULT hr = AtlAdvise(tab_, this, IID_IPropertyNotifySink, |
190 &prop_notify_cookie_); | 191 &prop_notify_cookie_); |
191 DCHECK(hr == S_OK) << "AtlAdvice for IPropertyNotifySink failed " << hr; | 192 DCHECK(hr == S_OK) << "AtlAdvice for IPropertyNotifySink failed " << hr; |
192 | 193 |
193 base::win::ScopedVariant onmessage(onmsg_.ToDispatch()); | 194 base::win::ScopedVariant onmessage(onmsg_.ToDispatch()); |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1602 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles, | 1603 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles, |
1603 "automationproviderconnect"); | 1604 "automationproviderconnect"); |
1604 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles, | 1605 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles, |
1605 "externaltabnavigate"); | 1606 "externaltabnavigate"); |
1606 PrintPerfTestResults(renderer_main_monitor, kNumCycles, | 1607 PrintPerfTestResults(renderer_main_monitor, kNumCycles, |
1607 "beginrenderermain"); | 1608 "beginrenderermain"); |
1608 #ifdef NDEBUG | 1609 #ifdef NDEBUG |
1609 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage"); | 1610 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage"); |
1610 #endif // NDEBUG | 1611 #endif // NDEBUG |
1611 } | 1612 } |
OLD | NEW |