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 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 POLICY_LEVEL_MANDATORY, | 1517 POLICY_LEVEL_MANDATORY, |
1518 POLICY_SCOPE_USER, | 1518 POLICY_SCOPE_USER, |
1519 new base::StringValue(forced_dir.path().value()), | 1519 new base::StringValue(forced_dir.path().value()), |
1520 NULL); | 1520 NULL); |
1521 UpdateProviderPolicy(policies); | 1521 UpdateProviderPolicy(policies); |
1522 DownloadAndVerifyFile(browser(), forced_dir.path(), file); | 1522 DownloadAndVerifyFile(browser(), forced_dir.path(), file); |
1523 // Verify that the first download location wasn't affected. | 1523 // Verify that the first download location wasn't affected. |
1524 EXPECT_FALSE(base::PathExists(initial_dir.path().Append(file))); | 1524 EXPECT_FALSE(base::PathExists(initial_dir.path().Append(file))); |
1525 } | 1525 } |
1526 | 1526 |
1527 // Flaky: http://crbug.com/388340 | 1527 IN_PROC_BROWSER_TEST_F(PolicyTest, ExtensionInstallBlacklistSelective) { |
1528 IN_PROC_BROWSER_TEST_F(PolicyTest, | |
1529 DISABLED_ExtensionInstallBlacklistSelective) { | |
1530 // Verifies that blacklisted extensions can't be installed. | 1528 // Verifies that blacklisted extensions can't be installed. |
1531 ExtensionService* service = extension_service(); | 1529 ExtensionService* service = extension_service(); |
1532 ASSERT_FALSE(service->GetExtensionById(kGoodCrxId, true)); | 1530 ASSERT_FALSE(service->GetExtensionById(kGoodCrxId, true)); |
1533 ASSERT_FALSE(service->GetExtensionById(kAdBlockCrxId, true)); | 1531 ASSERT_FALSE(service->GetExtensionById(kAdBlockCrxId, true)); |
1534 base::ListValue blacklist; | 1532 base::ListValue blacklist; |
1535 blacklist.Append(new base::StringValue(kGoodCrxId)); | 1533 blacklist.Append(new base::StringValue(kGoodCrxId)); |
1536 PolicyMap policies; | 1534 PolicyMap policies; |
1537 policies.Set(key::kExtensionInstallBlacklist, POLICY_LEVEL_MANDATORY, | 1535 policies.Set(key::kExtensionInstallBlacklist, POLICY_LEVEL_MANDATORY, |
1538 POLICY_SCOPE_USER, blacklist.DeepCopy(), NULL); | 1536 POLICY_SCOPE_USER, blacklist.DeepCopy(), NULL); |
1539 UpdateProviderPolicy(policies); | 1537 UpdateProviderPolicy(policies); |
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3213 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3211 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
3214 browser2->tab_strip_model()->GetActiveWebContents(), | 3212 browser2->tab_strip_model()->GetActiveWebContents(), |
3215 "domAutomationController.send(window.showModalDialog !== undefined);", | 3213 "domAutomationController.send(window.showModalDialog !== undefined);", |
3216 &result)); | 3214 &result)); |
3217 EXPECT_TRUE(result); | 3215 EXPECT_TRUE(result); |
3218 } | 3216 } |
3219 | 3217 |
3220 #endif // !defined(CHROME_OS) | 3218 #endif // !defined(CHROME_OS) |
3221 | 3219 |
3222 } // namespace policy | 3220 } // namespace policy |
OLD | NEW |