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

Side by Side Diff: chrome_frame/test/perf/chrome_frame_perftest.cc

Issue 6090006: Regkey functions return error code instead of bool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 } 1098 }
1099 1099
1100 // Attempt to evict the Flash control can fail on the buildbot as the dll 1100 // Attempt to evict the Flash control can fail on the buildbot as the dll
1101 // is marked read only. The test run is aborted if we fail to evict the file 1101 // is marked read only. The test run is aborted if we fail to evict the file
1102 // from the cache. This could also fail if the Flash control is in use. 1102 // from the cache. This could also fail if the Flash control is in use.
1103 // On Vista this could fail because of UAC 1103 // On Vista this could fail because of UAC
1104 TEST_F(FlashCreationTest, PerfCold) { 1104 TEST_F(FlashCreationTest, PerfCold) {
1105 base::win::RegKey flash_key(HKEY_CLASSES_ROOT, kFlashControlKey, KEY_READ); 1105 base::win::RegKey flash_key(HKEY_CLASSES_ROOT, kFlashControlKey, KEY_READ);
1106 1106
1107 std::wstring plugin_path; 1107 std::wstring plugin_path;
1108 ASSERT_TRUE(flash_key.ReadValue(L"", &plugin_path)); 1108 ASSERT_EQ(ERROR_SUCCESS, flash_key.ReadValue(L"", &plugin_path));
1109 ASSERT_FALSE(plugin_path.empty()); 1109 ASSERT_FALSE(plugin_path.empty());
1110 1110
1111 FilePath flash_path = FilePath::FromWStringHack(plugin_path); 1111 FilePath flash_path = FilePath::FromWStringHack(plugin_path);
1112 FilePath binaries_to_evict[] = {flash_path}; 1112 FilePath binaries_to_evict[] = {flash_path};
1113 1113
1114 RunStartupTest("creation_cold", "t_flash", "", true /* cold */, 1114 RunStartupTest("creation_cold", "t_flash", "", true /* cold */,
1115 arraysize(binaries_to_evict), binaries_to_evict, 1115 arraysize(binaries_to_evict), binaries_to_evict,
1116 false/* important */, true); 1116 false/* important */, true);
1117 } 1117 }
1118 1118
1119 // This test would fail on Vista due to UAC or if the Silverlight control is 1119 // This test would fail on Vista due to UAC or if the Silverlight control is
1120 // in use. The test run is aborted if we fail to evict the file from the cache. 1120 // in use. The test run is aborted if we fail to evict the file from the cache.
1121 // Disabling this test as the Silverlight dll does not seem to get unloaded 1121 // Disabling this test as the Silverlight dll does not seem to get unloaded
1122 // correctly causing the attempt to evict the dll from the system cache to 1122 // correctly causing the attempt to evict the dll from the system cache to
1123 // fail. 1123 // fail.
1124 TEST_F(SilverlightCreationTest, DISABLED_PerfCold) { 1124 TEST_F(SilverlightCreationTest, DISABLED_PerfCold) {
1125 base::win::RegKey silverlight_key(HKEY_CLASSES_ROOT, kSilverlightControlKey, 1125 base::win::RegKey silverlight_key(HKEY_CLASSES_ROOT, kSilverlightControlKey,
1126 KEY_READ); 1126 KEY_READ);
1127 1127
1128 std::wstring plugin_path; 1128 std::wstring plugin_path;
1129 ASSERT_TRUE(silverlight_key.ReadValue(L"", &plugin_path)); 1129 ASSERT_EQ(ERROR_SUCCESS, silverlight_key.ReadValue(L"", &plugin_path));
1130 ASSERT_FALSE(plugin_path.empty()); 1130 ASSERT_FALSE(plugin_path.empty());
1131 1131
1132 FilePath silverlight_path = FilePath::FromWStringHack(plugin_path); 1132 FilePath silverlight_path = FilePath::FromWStringHack(plugin_path);
1133 FilePath binaries_to_evict[] = {silverlight_path}; 1133 FilePath binaries_to_evict[] = {silverlight_path};
1134 1134
1135 RunStartupTest("creation_cold", "t_silverlight", "", true /* cold */, 1135 RunStartupTest("creation_cold", "t_silverlight", "", true /* cold */,
1136 arraysize(binaries_to_evict), binaries_to_evict, 1136 arraysize(binaries_to_evict), binaries_to_evict,
1137 false /* important */, true); 1137 false /* important */, true);
1138 } 1138 }
1139 1139
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles, 1467 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles,
1468 "automationproviderconnect"); 1468 "automationproviderconnect");
1469 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles, 1469 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles,
1470 "externaltabnavigate"); 1470 "externaltabnavigate");
1471 PrintPerfTestResults(renderer_main_monitor, kNumCycles, 1471 PrintPerfTestResults(renderer_main_monitor, kNumCycles,
1472 "beginrenderermain"); 1472 "beginrenderermain");
1473 #ifdef NDEBUG 1473 #ifdef NDEBUG
1474 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage"); 1474 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage");
1475 #endif // NDEBUG 1475 #endif // NDEBUG
1476 } 1476 }
OLDNEW
« no previous file with comments | « chrome_frame/test/chrome_frame_test_utils.cc ('k') | chrome_frame/test/policy_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698