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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 3530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3541 } | 3541 } |
3542 }; | 3542 }; |
3543 | 3543 |
3544 IN_PROC_BROWSER_TEST_F(PolicyVariationsServiceTest, VariationsURLIsValid) { | 3544 IN_PROC_BROWSER_TEST_F(PolicyVariationsServiceTest, VariationsURLIsValid) { |
3545 const std::string default_variations_url = | 3545 const std::string default_variations_url = |
3546 chrome_variations::VariationsService:: | 3546 chrome_variations::VariationsService:: |
3547 GetDefaultVariationsServerURLForTesting(); | 3547 GetDefaultVariationsServerURLForTesting(); |
3548 | 3548 |
3549 const GURL url = | 3549 const GURL url = |
3550 chrome_variations::VariationsService::GetVariationsServerURL( | 3550 chrome_variations::VariationsService::GetVariationsServerURL( |
3551 g_browser_process->local_state()); | 3551 g_browser_process->local_state(), std::string()); |
3552 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true)); | 3552 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true)); |
3553 std::string value; | 3553 std::string value; |
3554 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value)); | 3554 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value)); |
3555 EXPECT_EQ("restricted", value); | 3555 EXPECT_EQ("restricted", value); |
3556 } | 3556 } |
3557 | 3557 |
3558 IN_PROC_BROWSER_TEST_F(PolicyTest, NativeMessagingBlacklistSelective) { | 3558 IN_PROC_BROWSER_TEST_F(PolicyTest, NativeMessagingBlacklistSelective) { |
3559 base::ListValue blacklist; | 3559 base::ListValue blacklist; |
3560 blacklist.Append(new base::StringValue("host.name")); | 3560 blacklist.Append(new base::StringValue("host.name")); |
3561 PolicyMap policies; | 3561 PolicyMap policies; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3625 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3625 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
3626 browser2->tab_strip_model()->GetActiveWebContents(), | 3626 browser2->tab_strip_model()->GetActiveWebContents(), |
3627 "domAutomationController.send(window.showModalDialog !== undefined);", | 3627 "domAutomationController.send(window.showModalDialog !== undefined);", |
3628 &result)); | 3628 &result)); |
3629 EXPECT_TRUE(result); | 3629 EXPECT_TRUE(result); |
3630 } | 3630 } |
3631 | 3631 |
3632 #endif // !defined(CHROME_OS) | 3632 #endif // !defined(CHROME_OS) |
3633 | 3633 |
3634 } // namespace policy | 3634 } // namespace policy |
OLD | NEW |