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

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

Issue 2403053003: Remove unused email from install attributes and add support for AD. (Closed)
Patch Set: Address Maksim's comments. Created 4 years, 2 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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 // Set up the user manager to fake a public session. 1590 // Set up the user manager to fake a public session.
1591 EXPECT_CALL(*user_manager_, IsLoggedInAsKioskApp()) 1591 EXPECT_CALL(*user_manager_, IsLoggedInAsKioskApp())
1592 .WillRepeatedly(Return(false)); 1592 .WillRepeatedly(Return(false));
1593 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount()) 1593 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount())
1594 .WillRepeatedly(Return(true)); 1594 .WillRepeatedly(Return(true));
1595 1595
1596 // Set up fake install attributes to make the device appeared as 1596 // Set up fake install attributes to make the device appeared as
1597 // enterprise-managed. 1597 // enterprise-managed.
1598 std::unique_ptr<chromeos::StubInstallAttributes> attributes 1598 std::unique_ptr<chromeos::StubInstallAttributes> attributes
1599 = base::MakeUnique<chromeos::StubInstallAttributes>(); 1599 = base::MakeUnique<chromeos::StubInstallAttributes>();
1600 attributes->SetDomain("example.com"); 1600 attributes->SetEnterprise("example.com", "fake-id");
1601 attributes->SetRegistrationUser("user@example.com");
1602 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( 1601 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting(
1603 attributes.release()); 1602 attributes.release());
1604 } 1603 }
1605 1604
1606 scoped_refptr<Extension> CreateTestExtension(const std::string& id) { 1605 scoped_refptr<Extension> CreateTestExtension(const std::string& id) {
1607 return ExtensionBuilder() 1606 return ExtensionBuilder()
1608 .SetManifest( 1607 .SetManifest(
1609 DictionaryBuilder() 1608 DictionaryBuilder()
1610 .Set("name", "Test") 1609 .Set("name", "Test")
1611 .Set("version", "1.0") 1610 .Set("version", "1.0")
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1854 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), 1853 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"),
1855 url); 1854 url);
1856 } 1855 }
1857 1856
1858 } // namespace extensions 1857 } // namespace extensions
1859 1858
1860 // Tests the chrome.identity API implemented by custom JS bindings . 1859 // Tests the chrome.identity API implemented by custom JS bindings .
1861 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeIdentityJsBindings) { 1860 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeIdentityJsBindings) {
1862 ASSERT_TRUE(RunExtensionTest("identity/js_bindings")) << message_; 1861 ASSERT_TRUE(RunExtensionTest("identity/js_bindings")) << message_;
1863 } 1862 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698