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 // Tests for the top plugins to catch regressions in our plugin host code, as | 5 // Tests for the top plugins to catch regressions in our plugin host code, as |
6 // well as in the out of process code. Currently this tests: | 6 // well as in the out of process code. Currently this tests: |
7 // Flash | 7 // Flash |
8 // Real | 8 // Real |
9 // QuickTime | 9 // QuickTime |
10 // Windows Media Player | 10 // Windows Media Player |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 #if defined(OS_WIN) | 78 #if defined(OS_WIN) |
79 virtual void SetUp() { | 79 virtual void SetUp() { |
80 const testing::TestInfo* const test_info = | 80 const testing::TestInfo* const test_info = |
81 testing::UnitTest::GetInstance()->current_test_info(); | 81 testing::UnitTest::GetInstance()->current_test_info(); |
82 if (strcmp(test_info->name(), "MediaPlayerNew") == 0) { | 82 if (strcmp(test_info->name(), "MediaPlayerNew") == 0) { |
83 // The installer adds our process names to the registry key below. Since | 83 // The installer adds our process names to the registry key below. Since |
84 // the installer might not have run on this machine, add it manually. | 84 // the installer might not have run on this machine, add it manually. |
85 base::win::RegKey regkey; | 85 base::win::RegKey regkey; |
86 if (regkey.Open(HKEY_LOCAL_MACHINE, | 86 if (regkey.Open(HKEY_LOCAL_MACHINE, |
87 L"Software\\Microsoft\\MediaPlayer\\ShimInclusionList", | 87 L"Software\\Microsoft\\MediaPlayer\\ShimInclusionList", |
88 KEY_WRITE)) { | 88 KEY_WRITE) == ERROR_SUCCESS) { |
89 regkey.CreateKey(L"CHROME.EXE", KEY_READ); | 89 regkey.CreateKey(L"CHROME.EXE", KEY_READ); |
90 } | 90 } |
91 } else if (strcmp(test_info->name(), "MediaPlayerOld") == 0) { | 91 } else if (strcmp(test_info->name(), "MediaPlayerOld") == 0) { |
92 // When testing the old WMP plugin, we need to force Chrome to not load | 92 // When testing the old WMP plugin, we need to force Chrome to not load |
93 // the new plugin. | 93 // the new plugin. |
94 launch_arguments_.AppendSwitch(switches::kUseOldWMPPlugin); | 94 launch_arguments_.AppendSwitch(switches::kUseOldWMPPlugin); |
95 } else if (strcmp(test_info->name(), "FlashSecurity") == 0) { | 95 } else if (strcmp(test_info->name(), "FlashSecurity") == 0) { |
96 launch_arguments_.AppendSwitchASCII(switches::kTestSandbox, | 96 launch_arguments_.AppendSwitchASCII(switches::kTestSandbox, |
97 "security_tests.dll"); | 97 "security_tests.dll"); |
98 } | 98 } |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) { | 345 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) { |
346 MessageLoop loop(MessageLoop::TYPE_IO); | 346 MessageLoop loop(MessageLoop::TYPE_IO); |
347 Start(); | 347 Start(); |
348 loop.Run(); | 348 loop.Run(); |
349 | 349 |
350 EXPECT_TRUE(success()); | 350 EXPECT_TRUE(success()); |
351 EXPECT_TRUE(initial_download_path().BaseName().value() == | 351 EXPECT_TRUE(initial_download_path().BaseName().value() == |
352 final_download_path().BaseName().value()); | 352 final_download_path().BaseName().value()); |
353 } | 353 } |
354 #endif // defined(OS_WIN) | 354 #endif // defined(OS_WIN) |
OLD | NEW |