| 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 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 { | 2129 { |
| 2130 base::RunLoop loop; | 2130 base::RunLoop loop; |
| 2131 BrowserThread::PostTaskAndReply( | 2131 BrowserThread::PostTaskAndReply( |
| 2132 BrowserThread::IO, FROM_HERE, | 2132 BrowserThread::IO, FROM_HERE, |
| 2133 base::Bind(UndoRedirectHostsToTestData, kURLS, arraysize(kURLS)), | 2133 base::Bind(UndoRedirectHostsToTestData, kURLS, arraysize(kURLS)), |
| 2134 loop.QuitClosure()); | 2134 loop.QuitClosure()); |
| 2135 loop.Run(); | 2135 loop.Run(); |
| 2136 } | 2136 } |
| 2137 } | 2137 } |
| 2138 | 2138 |
| 2139 IN_PROC_BROWSER_TEST_F(PolicyTest, FileURLBlacklist) { | 2139 #if defined(OS_MACOSX) |
| 2140 // http://crbug.com/339240 |
| 2141 #define MAYBE_FileURLBlacklist DISABLED_FileURLBlacklist |
| 2142 #else |
| 2143 #define MAYBE_FileURLBlacklist FileURLBlacklist |
| 2144 #endif |
| 2145 IN_PROC_BROWSER_TEST_F(PolicyTest, MAYBE_FileURLBlacklist) { |
| 2140 // Check that FileURLs can be blacklisted and DisabledSchemes works together | 2146 // Check that FileURLs can be blacklisted and DisabledSchemes works together |
| 2141 // with URLblacklisting and URLwhitelisting. | 2147 // with URLblacklisting and URLwhitelisting. |
| 2142 | 2148 |
| 2143 base::FilePath test_path; | 2149 base::FilePath test_path; |
| 2144 PathService::Get(chrome::DIR_TEST_DATA, &test_path); | 2150 PathService::Get(chrome::DIR_TEST_DATA, &test_path); |
| 2145 const std::string base_path = "file://" + test_path.AsUTF8Unsafe() +"/"; | 2151 const std::string base_path = "file://" + test_path.AsUTF8Unsafe() +"/"; |
| 2146 const std::string folder_path = base_path + "apptest/"; | 2152 const std::string folder_path = base_path + "apptest/"; |
| 2147 const std::string file_path1 = base_path + "title1.html"; | 2153 const std::string file_path1 = base_path + "title1.html"; |
| 2148 const std::string file_path2 = folder_path + "basic.html"; | 2154 const std::string file_path2 = folder_path + "basic.html"; |
| 2149 | 2155 |
| (...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3226 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3232 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
| 3227 browser2->tab_strip_model()->GetActiveWebContents(), | 3233 browser2->tab_strip_model()->GetActiveWebContents(), |
| 3228 "domAutomationController.send(window.showModalDialog !== undefined);", | 3234 "domAutomationController.send(window.showModalDialog !== undefined);", |
| 3229 &result)); | 3235 &result)); |
| 3230 EXPECT_TRUE(result); | 3236 EXPECT_TRUE(result); |
| 3231 } | 3237 } |
| 3232 | 3238 |
| 3233 #endif // !defined(CHROME_OS) | 3239 #endif // !defined(CHROME_OS) |
| 3234 | 3240 |
| 3235 } // namespace policy | 3241 } // namespace policy |
| OLD | NEW |