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

Side by Side Diff: content/test/blink_test_environment.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/test/blink_test_environment.h" 5 #include "content/test/blink_test_environment.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 28 matching lines...) Expand all
39 39
40 void EnableBlinkPlatformLogChannels(const std::string& channels) { 40 void EnableBlinkPlatformLogChannels(const std::string& channels) {
41 if (channels.empty()) 41 if (channels.empty())
42 return; 42 return;
43 base::StringTokenizer t(channels, ", "); 43 base::StringTokenizer t(channels, ", ");
44 while (t.GetNext()) 44 while (t.GetNext())
45 blink::enableLogChannel(t.token().c_str()); 45 blink::enableLogChannel(t.token().c_str());
46 } 46 }
47 47
48 void ParseBlinkCommandLineArgumentsForUnitTests() { 48 void ParseBlinkCommandLineArgumentsForUnitTests() {
49 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 49 const base::CommandLine& command_line =
50 *base::CommandLine::ForCurrentProcess();
50 EnableBlinkPlatformLogChannels( 51 EnableBlinkPlatformLogChannels(
51 command_line.GetSwitchValueASCII(switches::kBlinkPlatformLogChannels)); 52 command_line.GetSwitchValueASCII(switches::kBlinkPlatformLogChannels));
52 } 53 }
53 54
54 class TestEnvironment { 55 class TestEnvironment {
55 public: 56 public:
56 #if defined(OS_ANDROID) 57 #if defined(OS_ANDROID)
57 // Android UI message loop goes through Java, so don't use it in tests. 58 // Android UI message loop goes through Java, so don't use it in tests.
58 typedef base::MessageLoop MessageLoopType; 59 typedef base::MessageLoop MessageLoopType;
59 #else 60 #else
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // http://code.google.com/p/chromium/issues/detail?id=9500 117 // http://code.google.com/p/chromium/issues/detail?id=9500
117 base::RunLoop().RunUntilIdle(); 118 base::RunLoop().RunUntilIdle();
118 119
119 if (RunningOnValgrind()) 120 if (RunningOnValgrind())
120 blink::WebCache::clear(); 121 blink::WebCache::clear();
121 delete test_environment; 122 delete test_environment;
122 test_environment = NULL; 123 test_environment = NULL;
123 } 124 }
124 125
125 } // namespace content 126 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/tools/content_shell_crash_service.cc ('k') | content/test/browser_side_navigation_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698