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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 test_extension_cache_.get()); | 629 test_extension_cache_.get()); |
630 } | 630 } |
631 } | 631 } |
632 | 632 |
633 // Makes URLRequestMockHTTPJobs serve data from content::DIR_TEST_DATA | 633 // Makes URLRequestMockHTTPJobs serve data from content::DIR_TEST_DATA |
634 // instead of chrome::DIR_TEST_DATA. | 634 // instead of chrome::DIR_TEST_DATA. |
635 void ServeContentTestData() { | 635 void ServeContentTestData() { |
636 base::FilePath root_http; | 636 base::FilePath root_http; |
637 PathService::Get(content::DIR_TEST_DATA, &root_http); | 637 PathService::Get(content::DIR_TEST_DATA, &root_http); |
638 BrowserThread::PostTaskAndReply( | 638 BrowserThread::PostTaskAndReply( |
639 BrowserThread::IO, | 639 BrowserThread::IO, FROM_HERE, |
640 FROM_HERE, | 640 base::Bind(URLRequestMockHTTPJob::AddUrlHandlers, root_http, |
641 base::Bind(URLRequestMockHTTPJob::AddUrlHandler, | |
642 root_http, | |
643 make_scoped_refptr(BrowserThread::GetBlockingPool())), | 641 make_scoped_refptr(BrowserThread::GetBlockingPool())), |
644 base::MessageLoop::current()->QuitWhenIdleClosure()); | 642 base::MessageLoop::current()->QuitWhenIdleClosure()); |
645 content::RunMessageLoop(); | 643 content::RunMessageLoop(); |
646 } | 644 } |
647 | 645 |
648 void SetScreenshotPolicy(bool enabled) { | 646 void SetScreenshotPolicy(bool enabled) { |
649 PolicyMap policies; | 647 PolicyMap policies; |
650 policies.Set(key::kDisableScreenshots, | 648 policies.Set(key::kDisableScreenshots, |
651 POLICY_LEVEL_MANDATORY, | 649 POLICY_LEVEL_MANDATORY, |
652 POLICY_SCOPE_USER, | 650 POLICY_SCOPE_USER, |
(...skipping 2974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3627 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3625 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
3628 browser2->tab_strip_model()->GetActiveWebContents(), | 3626 browser2->tab_strip_model()->GetActiveWebContents(), |
3629 "domAutomationController.send(window.showModalDialog !== undefined);", | 3627 "domAutomationController.send(window.showModalDialog !== undefined);", |
3630 &result)); | 3628 &result)); |
3631 EXPECT_TRUE(result); | 3629 EXPECT_TRUE(result); |
3632 } | 3630 } |
3633 | 3631 |
3634 #endif // !defined(CHROME_OS) | 3632 #endif // !defined(CHROME_OS) |
3635 | 3633 |
3636 } // namespace policy | 3634 } // namespace policy |
OLD | NEW |