OLD | NEW |
1 // Copyright 2008, Google Inc. | 1 // Copyright 2008, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 testing::UnitTest::GetInstance()->current_test_info(); | 69 testing::UnitTest::GetInstance()->current_test_info(); |
70 if (strcmp(test_info->name(), "MediaPlayerNew") == 0) { | 70 if (strcmp(test_info->name(), "MediaPlayerNew") == 0) { |
71 // The installer adds our process names to the registry key below. Since | 71 // The installer adds our process names to the registry key below. Since |
72 // the installer might not have run on this machine, add it manually. | 72 // the installer might not have run on this machine, add it manually. |
73 RegKey regkey; | 73 RegKey regkey; |
74 if (regkey.Open(HKEY_LOCAL_MACHINE, | 74 if (regkey.Open(HKEY_LOCAL_MACHINE, |
75 L"Software\\Microsoft\\MediaPlayer\\ShimInclusionList", | 75 L"Software\\Microsoft\\MediaPlayer\\ShimInclusionList", |
76 KEY_WRITE)) { | 76 KEY_WRITE)) { |
77 regkey.CreateKey(L"CHROME.EXE", KEY_READ); | 77 regkey.CreateKey(L"CHROME.EXE", KEY_READ); |
78 } | 78 } |
79 if (!launch_arguments_.empty()) | 79 launch_arguments_.AppendSwitch(kNoNativeActiveXShimSwitch); |
80 launch_arguments_.append(L" "); | |
81 launch_arguments_.append(L"--" kNoNativeActiveXShimSwitch); | |
82 | 80 |
83 } else if (strcmp(test_info->name(), "MediaPlayerOld") == 0) { | 81 } else if (strcmp(test_info->name(), "MediaPlayerOld") == 0) { |
84 // When testing the old WMP plugin, we need to force Chrome to not load | 82 // When testing the old WMP plugin, we need to force Chrome to not load |
85 // the new plugin. | 83 // the new plugin. |
86 if (!launch_arguments_.empty()) | 84 launch_arguments_.AppendSwitch(kUseOldWMPPluginSwitch); |
87 launch_arguments_.append(L" "); | 85 launch_arguments_.AppendSwitch(kNoNativeActiveXShimSwitch); |
88 | |
89 launch_arguments_.append(L"--" kUseOldWMPPluginSwitch); | |
90 launch_arguments_.append(L" "); | |
91 launch_arguments_.append(L"--" kNoNativeActiveXShimSwitch); | |
92 } else if (strcmp(test_info->name(), "FlashSecurity") == 0) { | 86 } else if (strcmp(test_info->name(), "FlashSecurity") == 0) { |
93 if (!launch_arguments_.empty()) | 87 launch_arguments_.AppendSwitchWithValue(switches::kTestSandbox, |
94 launch_arguments_.append(L" "); | 88 L"security_tests.dll"); |
95 | |
96 launch_arguments_.append(L"--"); | |
97 launch_arguments_.append(switches::kTestSandbox); | |
98 launch_arguments_.append(L"="); | |
99 launch_arguments_.append(L"security_tests.dll"); | |
100 } | 89 } |
101 | 90 |
102 UITest::SetUp(); | 91 UITest::SetUp(); |
103 } | 92 } |
104 | 93 |
105 void TestPlugin(const std::wstring& test_case, int timeout) { | 94 void TestPlugin(const std::wstring& test_case, int timeout) { |
106 GURL url = GetTestUrl(test_case); | 95 GURL url = GetTestUrl(test_case); |
107 NavigateToURL(url); | 96 NavigateToURL(url); |
108 WaitForFinish(timeout); | 97 WaitForFinish(timeout); |
109 } | 98 } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 214 } |
226 | 215 |
227 TEST_F(ActiveXTest, WMP) { | 216 TEST_F(ActiveXTest, WMP) { |
228 TestActiveX(L"activex_wmp.html", kLongWaitTimeout, false); | 217 TestActiveX(L"activex_wmp.html", kLongWaitTimeout, false); |
229 } | 218 } |
230 | 219 |
231 TEST_F(ActiveXTest, CustomScripting) { | 220 TEST_F(ActiveXTest, CustomScripting) { |
232 TestActiveX(L"activex_custom_scripting.html", kShortWaitTimeout, true); | 221 TestActiveX(L"activex_custom_scripting.html", kShortWaitTimeout, true); |
233 } | 222 } |
234 | 223 |
OLD | NEW |