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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 scoped_ptr<api::identity::ProfileUserInfo> info = RunGetProfileUserInfo(); | 646 scoped_ptr<api::identity::ProfileUserInfo> info = RunGetProfileUserInfo(); |
647 EXPECT_TRUE(info->email.empty()); | 647 EXPECT_TRUE(info->email.empty()); |
648 EXPECT_TRUE(info->id.empty()); | 648 EXPECT_TRUE(info->id.empty()); |
649 } | 649 } |
650 | 650 |
651 IN_PROC_BROWSER_TEST_F(IdentityGetProfileUserInfoFunctionTest, | 651 IN_PROC_BROWSER_TEST_F(IdentityGetProfileUserInfoFunctionTest, |
652 SignedInNoEmail) { | 652 SignedInNoEmail) { |
653 SignIn("president@example.com", "12345"); | 653 SignIn("president@example.com", "12345"); |
654 scoped_ptr<api::identity::ProfileUserInfo> info = RunGetProfileUserInfo(); | 654 scoped_ptr<api::identity::ProfileUserInfo> info = RunGetProfileUserInfo(); |
655 EXPECT_TRUE(info->email.empty()); | 655 EXPECT_TRUE(info->email.empty()); |
656 EXPECT_EQ("12345", info->id); | 656 EXPECT_TRUE(info->id.empty()); |
657 } | 657 } |
658 | 658 |
659 class GetAuthTokenFunctionTest : public IdentityTestWithSignin { | 659 class GetAuthTokenFunctionTest : public IdentityTestWithSignin { |
660 public: | 660 public: |
661 void SetUpCommandLine(base::CommandLine* command_line) override { | 661 void SetUpCommandLine(base::CommandLine* command_line) override { |
662 IdentityTestWithSignin::SetUpCommandLine(command_line); | 662 IdentityTestWithSignin::SetUpCommandLine(command_line); |
663 command_line->AppendSwitch(switches::kExtensionsMultiAccount); | 663 command_line->AppendSwitch(switches::kExtensionsMultiAccount); |
664 } | 664 } |
665 | 665 |
666 void IssueLoginRefreshTokenForAccount(const std::string account_key) { | 666 void IssueLoginRefreshTokenForAccount(const std::string account_key) { |
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1821 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), | 1821 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), |
1822 url); | 1822 url); |
1823 } | 1823 } |
1824 | 1824 |
1825 } // namespace extensions | 1825 } // namespace extensions |
1826 | 1826 |
1827 // Tests the chrome.identity API implemented by custom JS bindings . | 1827 // Tests the chrome.identity API implemented by custom JS bindings . |
1828 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeIdentityJsBindings) { | 1828 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeIdentityJsBindings) { |
1829 ASSERT_TRUE(RunExtensionTest("identity/js_bindings")) << message_; | 1829 ASSERT_TRUE(RunExtensionTest("identity/js_bindings")) << message_; |
1830 } | 1830 } |
OLD | NEW |