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 #include "chrome_frame/test/perf/chrome_frame_perftest.h" | 4 #include "chrome_frame/test/perf/chrome_frame_perftest.h" |
5 | 5 |
6 #include <atlwin.h> | 6 #include <atlwin.h> |
7 #include <atlhost.h> | 7 #include <atlhost.h> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 #include <string> | 10 #include <string> |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 chrome_frame_container_->CreateChromeFrameWindow(url.c_str()); | 785 chrome_frame_container_->CreateChromeFrameWindow(url.c_str()); |
786 chrome_frame_container_->CreateControl(true); | 786 chrome_frame_container_->CreateControl(true); |
787 | 787 |
788 module.RunMessageLoop(); | 788 module.RunMessageLoop(); |
789 | 789 |
790 chrome_frame_container_->Release(); | 790 chrome_frame_container_->Release(); |
791 | 791 |
792 PrintResults(test_name_.c_str()); | 792 PrintResults(test_name_.c_str()); |
793 | 793 |
794 CoFreeUnusedLibraries(); | 794 CoFreeUnusedLibraries(); |
| 795 PlatformThread::Sleep(100); |
795 } | 796 } |
796 | 797 |
797 void NavigateImpl(const std::string& url) { | 798 void NavigateImpl(const std::string& url) { |
798 ASSERT_TRUE(chrome_frame_container_ != NULL); | 799 ASSERT_TRUE(chrome_frame_container_ != NULL); |
799 ASSERT_TRUE(!url.empty()); | 800 ASSERT_TRUE(!url.empty()); |
800 chrome_frame_container_->Navigate(url.c_str()); | 801 chrome_frame_container_->Navigate(url.c_str()); |
801 } | 802 } |
802 | 803 |
803 void TestCompleted() { | 804 void TestCompleted() { |
804 // This can get called multiple times if the last url results in a | 805 // This can get called multiple times if the last url results in a |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 ASSERT_TRUE(silverlight_key.ReadValue(L"", &plugin_path)); | 1074 ASSERT_TRUE(silverlight_key.ReadValue(L"", &plugin_path)); |
1074 ASSERT_FALSE(plugin_path.empty()); | 1075 ASSERT_FALSE(plugin_path.empty()); |
1075 | 1076 |
1076 FilePath silverlight_path = FilePath::FromWStringHack(plugin_path); | 1077 FilePath silverlight_path = FilePath::FromWStringHack(plugin_path); |
1077 FilePath binaries_to_evict[] = {silverlight_path}; | 1078 FilePath binaries_to_evict[] = {silverlight_path}; |
1078 | 1079 |
1079 RunStartupTest("creation_cold", "t_silverlight", "", true /* cold */, | 1080 RunStartupTest("creation_cold", "t_silverlight", "", true /* cold */, |
1080 arraysize(binaries_to_evict), binaries_to_evict, | 1081 arraysize(binaries_to_evict), binaries_to_evict, |
1081 false /* important */, true); | 1082 false /* important */, true); |
1082 } | 1083 } |
OLD | NEW |