OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 virtual void SetUp() { | 78 virtual void SetUp() { |
79 #if defined(OS_WIN) | 79 #if defined(OS_WIN) |
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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) { | 363 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) { |
364 MessageLoop loop(MessageLoop::TYPE_IO); | 364 MessageLoop loop(MessageLoop::TYPE_IO); |
365 Start(); | 365 Start(); |
366 loop.Run(); | 366 loop.Run(); |
367 | 367 |
368 EXPECT_TRUE(success()); | 368 EXPECT_TRUE(success()); |
369 EXPECT_TRUE(initial_download_path().BaseName().value() == | 369 EXPECT_TRUE(initial_download_path().BaseName().value() == |
370 final_download_path().BaseName().value()); | 370 final_download_path().BaseName().value()); |
371 } | 371 } |
372 #endif // defined(OS_WIN) | 372 #endif // defined(OS_WIN) |
OLD | NEW |