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

Unified Diff: webkit/tools/test_shell/node_leak_test.cc

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/mac/main.mm ('k') | webkit/tools/test_shell/run_all_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/node_leak_test.cc
diff --git a/webkit/tools/test_shell/node_leak_test.cc b/webkit/tools/test_shell/node_leak_test.cc
index 97549c6516e4853318df7d847ed5c1ecb4e0ad6d..f24172ab89d90578c8f9e3786a8f899784659a4e 100644
--- a/webkit/tools/test_shell/node_leak_test.cc
+++ b/webkit/tools/test_shell/node_leak_test.cc
@@ -30,11 +30,11 @@ const wchar_t kTestUrlSwitch[] = L"test-url";
class NodeLeakTest : public TestShellTest {
public:
virtual void SetUp() {
- CommandLine parsed_command_line;
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
- std::wstring js_flags =
- parsed_command_line.GetSwitchValue(test_shell::kJavaScriptFlags);
- CommandLine::AppendSwitch(&js_flags, L"expose-gc");
+ std::wstring js_flags =
+ parsed_command_line.GetSwitchValue(test_shell::kJavaScriptFlags);
+ js_flags += L" --expose-gc";
webkit_glue::SetJavaScriptFlags(js_flags);
// Expose GCController to JavaScript as well.
webkit_glue::SetShouldExposeGCController(true);
@@ -66,7 +66,7 @@ class NodeLeakTest : public TestShellTest {
virtual void TearDown() {
TestShellTest::TearDown();
-
+
SimpleResourceLoaderBridge::Shutdown();
}
@@ -80,7 +80,7 @@ class NodeLeakTest : public TestShellTest {
};
TEST_F(NodeLeakTest, TestURL) {
- CommandLine parsed_command_line;
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
if (parsed_command_line.HasSwitch(kTestUrlSwitch)) {
NavigateToURL(parsed_command_line.GetSwitchValue(kTestUrlSwitch).c_str());
}
« no previous file with comments | « webkit/tools/test_shell/mac/main.mm ('k') | webkit/tools/test_shell/run_all_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698