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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_apitest.cc

Issue 784283006: chrome.identity API: Restrict gaia ID access (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reuse identity.email, kill identity.gaiaId Created 5 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 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 <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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/identity/identity_api.cc ('k') | chrome/common/extensions/api/identity.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698