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

Side by Side Diff: chrome/browser/extensions/api/push_messaging/push_messaging_canary_test.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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
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 #include <string> 5 #include <string>
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/extensions/api/push_messaging/sync_setup_helper.h" 10 #include "chrome/browser/extensions/api/push_messaging/sync_setup_helper.h"
(...skipping 21 matching lines...) Expand all
32 // checkin process. 32 // checkin process.
33 class PushMessagingCanaryTest : public ExtensionApiTest { 33 class PushMessagingCanaryTest : public ExtensionApiTest {
34 public: 34 public:
35 PushMessagingCanaryTest() { 35 PushMessagingCanaryTest() {
36 sync_setup_helper_.reset(new SyncSetupHelper()); 36 sync_setup_helper_.reset(new SyncSetupHelper());
37 } 37 }
38 38
39 ~PushMessagingCanaryTest() override {} 39 ~PushMessagingCanaryTest() override {}
40 40
41 void SetUp() override { 41 void SetUp() override {
42 CommandLine* command_line = CommandLine::ForCurrentProcess(); 42 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
43 43
44 ASSERT_TRUE(command_line->HasSwitch(kPasswordFileForTest)); 44 ASSERT_TRUE(command_line->HasSwitch(kPasswordFileForTest));
45 base::FilePath password_file = 45 base::FilePath password_file =
46 command_line->GetSwitchValuePath(kPasswordFileForTest); 46 command_line->GetSwitchValuePath(kPasswordFileForTest);
47 ASSERT_TRUE(sync_setup_helper_->ReadPasswordFile(password_file)); 47 ASSERT_TRUE(sync_setup_helper_->ReadPasswordFile(password_file));
48 48
49 // The test framework overrides any command line user-data-dir 49 // The test framework overrides any command line user-data-dir
50 // argument with a /tmp/.org.chromium.Chromium.XXXXXX directory. 50 // argument with a /tmp/.org.chromium.Chromium.XXXXXX directory.
51 // That happens in the ChromeTestLauncherDelegate, and affects 51 // That happens in the ChromeTestLauncherDelegate, and affects
52 // all unit tests (no opt out available). It intentionally erases 52 // all unit tests (no opt out available). It intentionally erases
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 "startTestWithCredentials('%s', '%s', '%s');", 157 "startTestWithCredentials('%s', '%s', '%s');",
158 client_id.c_str(), client_secret.c_str(), refresh_token.c_str())); 158 client_id.c_str(), client_secret.c_str(), refresh_token.c_str()));
159 159
160 browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame()-> 160 browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame()->
161 ExecuteJavaScript(script_string); 161 ExecuteJavaScript(script_string);
162 162
163 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 163 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
164 } 164 }
165 165
166 } // namespace extensions 166 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698