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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 }; | 662 }; |
663 | 663 |
664 void TestScreenshotFile(bool enabled) { | 664 void TestScreenshotFile(bool enabled) { |
665 // AddObserver is an ash-specific method, so just replace the screenshot | 665 // AddObserver is an ash-specific method, so just replace the screenshot |
666 // taker with one we've created here. | 666 // taker with one we've created here. |
667 scoped_ptr<ScreenshotTaker> screenshot_taker(new ScreenshotTaker); | 667 scoped_ptr<ScreenshotTaker> screenshot_taker(new ScreenshotTaker); |
668 // ScreenshotTaker doesn't own this observer, so the observer's lifetime | 668 // ScreenshotTaker doesn't own this observer, so the observer's lifetime |
669 // is tied to the test instead. | 669 // is tied to the test instead. |
670 screenshot_taker->AddObserver(&observer_); | 670 screenshot_taker->AddObserver(&observer_); |
671 ash::Shell::GetInstance()->accelerator_controller()->SetScreenshotDelegate( | 671 ash::Shell::GetInstance()->accelerator_controller()->SetScreenshotDelegate( |
672 screenshot_taker.PassAs<ash::ScreenshotDelegate>()); | 672 screenshot_taker.Pass()); |
673 | 673 |
674 SetScreenshotPolicy(enabled); | 674 SetScreenshotPolicy(enabled); |
675 ash::Shell::GetInstance()->accelerator_controller()->PerformAction( | 675 ash::Shell::GetInstance()->accelerator_controller()->PerformAction( |
676 ash::TAKE_SCREENSHOT, ui::Accelerator()); | 676 ash::TAKE_SCREENSHOT, ui::Accelerator()); |
677 | 677 |
678 content::RunMessageLoop(); | 678 content::RunMessageLoop(); |
679 } | 679 } |
680 #endif | 680 #endif |
681 | 681 |
682 ExtensionService* extension_service() { | 682 ExtensionService* extension_service() { |
(...skipping 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3321 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3321 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
3322 browser2->tab_strip_model()->GetActiveWebContents(), | 3322 browser2->tab_strip_model()->GetActiveWebContents(), |
3323 "domAutomationController.send(window.showModalDialog !== undefined);", | 3323 "domAutomationController.send(window.showModalDialog !== undefined);", |
3324 &result)); | 3324 &result)); |
3325 EXPECT_TRUE(result); | 3325 EXPECT_TRUE(result); |
3326 } | 3326 } |
3327 | 3327 |
3328 #endif // !defined(CHROME_OS) | 3328 #endif // !defined(CHROME_OS) |
3329 | 3329 |
3330 } // namespace policy | 3330 } // namespace policy |
OLD | NEW |