OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |