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

Side by Side Diff: content/shell/android/browsertests_apk/content_browser_tests_android.cc

Issue 14301005: Android: Use a different socketname for devtools in content_browsertests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 7 years, 8 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/shell/shell_browser_main_parts.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This class sets up the environment for running the content browser tests 5 // This class sets up the environment for running the content browser tests
6 // inside an android application. 6 // inside an android application.
7 7
8 #include <android/log.h> 8 #include <android/log.h>
9 9
10 #include "base/android/base_jni_registrar.h" 10 #include "base/android/base_jni_registrar.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 std::vector<char*> argv; 70 std::vector<char*> argv;
71 int argc = ArgsToArgv(args, &argv); 71 int argc = ArgsToArgv(args, &argv);
72 72
73 // Fully initialize command line with arguments. 73 // Fully initialize command line with arguments.
74 CommandLine* command_line = CommandLine::ForCurrentProcess(); 74 CommandLine* command_line = CommandLine::ForCurrentProcess();
75 command_line->AppendArguments(CommandLine(argc, &argv[0]), false); 75 command_line->AppendArguments(CommandLine(argc, &argv[0]), false);
76 76
77 // Append required switches. 77 // Append required switches.
78 command_line->AppendSwitch(content::kSingleProcessTestsFlag); 78 command_line->AppendSwitch(content::kSingleProcessTestsFlag);
79 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); 79 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream);
80 // Specify a socket name to not conflict with the default one used
81 // in content_shell.
82 command_line->AppendSwitchASCII(switches::kRemoteDebuggingSocketName,
83 "content_browsertests_devtools_remote");
80 84
81 // Create fifo and redirect stdout and stderr to it. 85 // Create fifo and redirect stdout and stderr to it.
82 base::FilePath files_dir( 86 base::FilePath files_dir(
83 base::android::ConvertJavaStringToUTF8(env, jfiles_dir)); 87 base::android::ConvertJavaStringToUTF8(env, jfiles_dir));
84 base::FilePath fifo_path(files_dir.Append(base::FilePath("test.fifo"))); 88 base::FilePath fifo_path(files_dir.Append(base::FilePath("test.fifo")));
85 CreateFIFO(fifo_path.value().c_str()); 89 CreateFIFO(fifo_path.value().c_str());
86 RedirectStream(stdout, fifo_path.value().c_str(), "w"); 90 RedirectStream(stdout, fifo_path.value().c_str(), "w");
87 dup2(STDOUT_FILENO, STDERR_FILENO); 91 dup2(STDOUT_FILENO, STDERR_FILENO);
88 92
89 ScopedMainEntryLogger scoped_main_entry_logger; 93 ScopedMainEntryLogger scoped_main_entry_logger;
(...skipping 14 matching lines...) Expand all
104 108
105 if (!content::BrowserTestMessagePumpAndroid::RegisterJni(env)) 109 if (!content::BrowserTestMessagePumpAndroid::RegisterJni(env))
106 return -1; 110 return -1;
107 111
108 if (!content::RegisterNativesImpl(env)) 112 if (!content::RegisterNativesImpl(env))
109 return -1; 113 return -1;
110 114
111 content::SetContentMainDelegate(new content::ShellMainDelegate()); 115 content::SetContentMainDelegate(new content::ShellMainDelegate());
112 return JNI_VERSION_1_4; 116 return JNI_VERSION_1_4;
113 } 117 }
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/shell/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698