| 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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 } | 1088 } |
| 1089 | 1089 |
| 1090 // Attempt to evict the Flash control can fail on the buildbot as the dll | 1090 // Attempt to evict the Flash control can fail on the buildbot as the dll |
| 1091 // is marked read only. The test run is aborted if we fail to evict the file | 1091 // is marked read only. The test run is aborted if we fail to evict the file |
| 1092 // from the cache. This could also fail if the Flash control is in use. | 1092 // from the cache. This could also fail if the Flash control is in use. |
| 1093 // On Vista this could fail because of UAC | 1093 // On Vista this could fail because of UAC |
| 1094 TEST_F(FlashCreationTest, PerfCold) { | 1094 TEST_F(FlashCreationTest, PerfCold) { |
| 1095 base::win::RegKey flash_key(HKEY_CLASSES_ROOT, kFlashControlKey, KEY_READ); | 1095 base::win::RegKey flash_key(HKEY_CLASSES_ROOT, kFlashControlKey, KEY_READ); |
| 1096 | 1096 |
| 1097 std::wstring plugin_path; | 1097 std::wstring plugin_path; |
| 1098 ASSERT_TRUE(flash_key.ReadValue(L"", &plugin_path)); | 1098 ASSERT_EQ(ERROR_SUCCESS, flash_key.ReadValue(L"", &plugin_path)); |
| 1099 ASSERT_FALSE(plugin_path.empty()); | 1099 ASSERT_FALSE(plugin_path.empty()); |
| 1100 | 1100 |
| 1101 FilePath flash_path = FilePath::FromWStringHack(plugin_path); | 1101 FilePath flash_path = FilePath::FromWStringHack(plugin_path); |
| 1102 FilePath binaries_to_evict[] = {flash_path}; | 1102 FilePath binaries_to_evict[] = {flash_path}; |
| 1103 | 1103 |
| 1104 RunStartupTest("creation_cold", "t_flash", "", true /* cold */, | 1104 RunStartupTest("creation_cold", "t_flash", "", true /* cold */, |
| 1105 arraysize(binaries_to_evict), binaries_to_evict, | 1105 arraysize(binaries_to_evict), binaries_to_evict, |
| 1106 false/* important */, true); | 1106 false/* important */, true); |
| 1107 } | 1107 } |
| 1108 | 1108 |
| 1109 // This test would fail on Vista due to UAC or if the Silverlight control is | 1109 // This test would fail on Vista due to UAC or if the Silverlight control is |
| 1110 // in use. The test run is aborted if we fail to evict the file from the cache. | 1110 // in use. The test run is aborted if we fail to evict the file from the cache. |
| 1111 // Disabling this test as the Silverlight dll does not seem to get unloaded | 1111 // Disabling this test as the Silverlight dll does not seem to get unloaded |
| 1112 // correctly causing the attempt to evict the dll from the system cache to | 1112 // correctly causing the attempt to evict the dll from the system cache to |
| 1113 // fail. | 1113 // fail. |
| 1114 TEST_F(SilverlightCreationTest, DISABLED_PerfCold) { | 1114 TEST_F(SilverlightCreationTest, DISABLED_PerfCold) { |
| 1115 base::win::RegKey silverlight_key(HKEY_CLASSES_ROOT, kSilverlightControlKey, | 1115 base::win::RegKey silverlight_key(HKEY_CLASSES_ROOT, kSilverlightControlKey, |
| 1116 KEY_READ); | 1116 KEY_READ); |
| 1117 | 1117 |
| 1118 std::wstring plugin_path; | 1118 std::wstring plugin_path; |
| 1119 ASSERT_TRUE(silverlight_key.ReadValue(L"", &plugin_path)); | 1119 ASSERT_EQ(ERROR_SUCCESS, silverlight_key.ReadValue(L"", &plugin_path)); |
| 1120 ASSERT_FALSE(plugin_path.empty()); | 1120 ASSERT_FALSE(plugin_path.empty()); |
| 1121 | 1121 |
| 1122 FilePath silverlight_path = FilePath::FromWStringHack(plugin_path); | 1122 FilePath silverlight_path = FilePath::FromWStringHack(plugin_path); |
| 1123 FilePath binaries_to_evict[] = {silverlight_path}; | 1123 FilePath binaries_to_evict[] = {silverlight_path}; |
| 1124 | 1124 |
| 1125 RunStartupTest("creation_cold", "t_silverlight", "", true /* cold */, | 1125 RunStartupTest("creation_cold", "t_silverlight", "", true /* cold */, |
| 1126 arraysize(binaries_to_evict), binaries_to_evict, | 1126 arraysize(binaries_to_evict), binaries_to_evict, |
| 1127 false /* important */, true); | 1127 false /* important */, true); |
| 1128 } | 1128 } |
| 1129 | 1129 |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles, | 1457 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles, |
| 1458 "automationproviderconnect"); | 1458 "automationproviderconnect"); |
| 1459 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles, | 1459 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles, |
| 1460 "externaltabnavigate"); | 1460 "externaltabnavigate"); |
| 1461 PrintPerfTestResults(renderer_main_monitor, kNumCycles, | 1461 PrintPerfTestResults(renderer_main_monitor, kNumCycles, |
| 1462 "beginrenderermain"); | 1462 "beginrenderermain"); |
| 1463 #ifdef NDEBUG | 1463 #ifdef NDEBUG |
| 1464 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage"); | 1464 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage"); |
| 1465 #endif // NDEBUG | 1465 #endif // NDEBUG |
| 1466 } | 1466 } |
| OLD | NEW |