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

Side by Side Diff: chrome/test/ui/ppapi_uitest.cc

Issue 3012021: CommandLine: add a CopySwitchesFrom() for copying from another CommandLine (Closed)
Patch Set: minor cleanups Created 10 years, 4 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
« no previous file with comments | « chrome/test/ui/npapi_test_helper.cc ('k') | chrome/test/ui/sandbox_uitests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/test/automation/tab_proxy.h" 9 #include "chrome/test/automation/tab_proxy.h"
10 #include "chrome/test/ui/ui_test.h" 10 #include "chrome/test/ui/ui_test.h"
(...skipping 18 matching lines...) Expand all
29 public: 29 public:
30 PPAPITest() { 30 PPAPITest() {
31 // Append the switch to register the pepper plugin. 31 // Append the switch to register the pepper plugin.
32 // library name = <out dir>/<test_name>.<library_extension> 32 // library name = <out dir>/<test_name>.<library_extension>
33 // MIME type = application/x-ppapi-<test_name> 33 // MIME type = application/x-ppapi-<test_name>
34 FilePath plugin_dir; 34 FilePath plugin_dir;
35 PathService::Get(base::DIR_EXE, &plugin_dir); 35 PathService::Get(base::DIR_EXE, &plugin_dir);
36 36
37 FilePath plugin_lib = plugin_dir.Append(library_name); 37 FilePath plugin_lib = plugin_dir.Append(library_name);
38 EXPECT_TRUE(file_util::PathExists(plugin_lib)); 38 EXPECT_TRUE(file_util::PathExists(plugin_lib));
39 39 FilePath::StringType pepper_plugin = plugin_lib.value();
40 #if defined(OS_WIN) 40 pepper_plugin.append(FILE_PATH_LITERAL(";application/x-ppapi-tests"));
41 std::wstring pepper_plugin = plugin_lib.value(); 41 launch_arguments_.AppendSwitchNative(switches::kRegisterPepperPlugins,
42 #else 42 pepper_plugin);
43 std::wstring pepper_plugin = UTF8ToWide(plugin_lib.value());
44 #endif
45 pepper_plugin.append(L";application/x-ppapi-tests");
46 launch_arguments_.AppendSwitchWithValue(switches::kRegisterPepperPlugins,
47 pepper_plugin);
48 43
49 // The test sends us the result via a cookie. 44 // The test sends us the result via a cookie.
50 launch_arguments_.AppendSwitch(switches::kEnableFileCookies); 45 launch_arguments_.AppendSwitch(switches::kEnableFileCookies);
51 46
52 // Some stuff is hung off of the testing interface which is not enabled 47 // Some stuff is hung off of the testing interface which is not enabled
53 // by default. 48 // by default.
54 launch_arguments_.AppendSwitch(switches::kEnablePepperTesting); 49 launch_arguments_.AppendSwitch(switches::kEnablePepperTesting);
55 } 50 }
56 51
57 void RunTest(const std::string& test_case) { 52 void RunTest(const std::string& test_case) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 108 }
114 109
115 #if defined(OS_LINUX) 110 #if defined(OS_LINUX)
116 // Flaky, http://crbug.com/48544. 111 // Flaky, http://crbug.com/48544.
117 TEST_F(PPAPITest, FLAKY_Scrollbar) { 112 TEST_F(PPAPITest, FLAKY_Scrollbar) {
118 #else 113 #else
119 TEST_F(PPAPITest, Scrollbar) { 114 TEST_F(PPAPITest, Scrollbar) {
120 #endif 115 #endif
121 RunTest("Scrollbar"); 116 RunTest("Scrollbar");
122 } 117 }
OLDNEW
« no previous file with comments | « chrome/test/ui/npapi_test_helper.cc ('k') | chrome/test/ui/sandbox_uitests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698