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

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

Issue 2737733003: Add Active Directory login UI tests (Closed)
Patch Set: Rebase Created 3 years, 9 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 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 // Set up the user manager to fake a public session. 1595 // Set up the user manager to fake a public session.
1596 EXPECT_CALL(*user_manager_, IsLoggedInAsKioskApp()) 1596 EXPECT_CALL(*user_manager_, IsLoggedInAsKioskApp())
1597 .WillRepeatedly(Return(false)); 1597 .WillRepeatedly(Return(false));
1598 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount()) 1598 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount())
1599 .WillRepeatedly(Return(true)); 1599 .WillRepeatedly(Return(true));
1600 1600
1601 // Set up fake install attributes to make the device appeared as 1601 // Set up fake install attributes to make the device appeared as
1602 // enterprise-managed. 1602 // enterprise-managed.
1603 std::unique_ptr<chromeos::StubInstallAttributes> attributes 1603 std::unique_ptr<chromeos::StubInstallAttributes> attributes
1604 = base::MakeUnique<chromeos::StubInstallAttributes>(); 1604 = base::MakeUnique<chromeos::StubInstallAttributes>();
1605 attributes->SetEnterprise("example.com", "fake-id"); 1605 attributes->SetCloudManaged("example.com", "fake-id");
1606 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( 1606 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting(
1607 attributes.release()); 1607 attributes.release());
1608 } 1608 }
1609 1609
1610 scoped_refptr<Extension> CreateTestExtension(const std::string& id) { 1610 scoped_refptr<Extension> CreateTestExtension(const std::string& id) {
1611 return ExtensionBuilder() 1611 return ExtensionBuilder()
1612 .SetManifest( 1612 .SetManifest(
1613 DictionaryBuilder() 1613 DictionaryBuilder()
1614 .Set("name", "Test") 1614 .Set("name", "Test")
1615 .Set("version", "1.0") 1615 .Set("version", "1.0")
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), 1858 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"),
1859 url); 1859 url);
1860 } 1860 }
1861 1861
1862 } // namespace extensions 1862 } // namespace extensions
1863 1863
1864 // Tests the chrome.identity API implemented by custom JS bindings . 1864 // Tests the chrome.identity API implemented by custom JS bindings .
1865 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeIdentityJsBindings) { 1865 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeIdentityJsBindings) {
1866 ASSERT_TRUE(RunExtensionTest("identity/js_bindings")) << message_; 1866 ASSERT_TRUE(RunExtensionTest("identity/js_bindings")) << message_;
1867 } 1867 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698