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

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

Issue 1739183003: Make extensions::DictionaryBuilder and extensions::ListValue unmovable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 scoped_ptr<policy::StubEnterpriseInstallAttributes> attributes( 1651 scoped_ptr<policy::StubEnterpriseInstallAttributes> attributes(
1652 new policy::StubEnterpriseInstallAttributes()); 1652 new policy::StubEnterpriseInstallAttributes());
1653 attributes->SetDomain("example.com"); 1653 attributes->SetDomain("example.com");
1654 attributes->SetRegistrationUser("user@example.com"); 1654 attributes->SetRegistrationUser("user@example.com");
1655 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( 1655 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting(
1656 attributes.release()); 1656 attributes.release());
1657 } 1657 }
1658 1658
1659 scoped_refptr<Extension> CreateTestExtension(const std::string& id) { 1659 scoped_refptr<Extension> CreateTestExtension(const std::string& id) {
1660 return ExtensionBuilder() 1660 return ExtensionBuilder()
1661 .SetManifest(std::move( 1661 .SetManifest(
1662 DictionaryBuilder() 1662 DictionaryBuilder()
1663 .Set("name", "Test") 1663 .Set("name", "Test")
1664 .Set("version", "1.0") 1664 .Set("version", "1.0")
1665 .Set("oauth2", 1665 .Set("oauth2",
1666 std::move( 1666 DictionaryBuilder()
1667 DictionaryBuilder() 1667 .Set("client_id", "clientId")
1668 .Set("client_id", "clientId") 1668 .Set("scopes", ListBuilder().Append("scope1").Build())
1669 .Set("scopes", 1669 .Build())
1670 std::move(ListBuilder().Append("scope1"))))))) 1670 .Build())
1671 .SetLocation(Manifest::UNPACKED) 1671 .SetLocation(Manifest::UNPACKED)
1672 .SetID(id) 1672 .SetID(id)
1673 .Build(); 1673 .Build();
1674 } 1674 }
1675 1675
1676 // Owned by |user_manager_enabler|. 1676 // Owned by |user_manager_enabler|.
1677 chromeos::MockUserManager* user_manager_; 1677 chromeos::MockUserManager* user_manager_;
1678 }; 1678 };
1679 1679
1680 IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionPublicSessionTest, NonWhitelisted) { 1680 IN_PROC_BROWSER_TEST_F(GetAuthTokenFunctionPublicSessionTest, NonWhitelisted) {
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), 1921 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"),
1922 url); 1922 url);
1923 } 1923 }
1924 1924
1925 } // namespace extensions 1925 } // namespace extensions
1926 1926
1927 // Tests the chrome.identity API implemented by custom JS bindings . 1927 // Tests the chrome.identity API implemented by custom JS bindings .
1928 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeIdentityJsBindings) { 1928 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeIdentityJsBindings) {
1929 ASSERT_TRUE(RunExtensionTest("identity/js_bindings")) << message_; 1929 ASSERT_TRUE(RunExtensionTest("identity/js_bindings")) << message_;
1930 } 1930 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698