OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/renderer_context_menu/render_view_context_menu.h" | 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 auto callback = [](bool* response_received, const base::Closure& quit, | 733 auto callback = [](bool* response_received, const base::Closure& quit, |
734 const std::vector<uint8_t>& thumbnail_data, | 734 const std::vector<uint8_t>& thumbnail_data, |
735 const gfx::Size& original_size) { | 735 const gfx::Size& original_size) { |
736 *response_received = true; | 736 *response_received = true; |
737 quit.Run(); | 737 quit.Run(); |
738 }; | 738 }; |
739 | 739 |
740 base::RunLoop run_loop; | 740 base::RunLoop run_loop; |
741 bool response_received = false; | 741 bool response_received = false; |
742 thumbnail_capturer->RequestThumbnailForContextNode( | 742 thumbnail_capturer->RequestThumbnailForContextNode( |
743 0, gfx::Size(2048, 2048), | 743 0, gfx::Size(2048, 2048), true, |
744 base::Bind(callback, &response_received, run_loop.QuitClosure())); | 744 base::Bind(callback, &response_received, run_loop.QuitClosure())); |
745 run_loop.Run(); | 745 run_loop.Run(); |
746 | 746 |
747 // The browser should receive a response from the renderer, because the | 747 // The browser should receive a response from the renderer, because the |
748 // renderer should not crash. | 748 // renderer should not crash. |
749 ASSERT_TRUE(response_received); | 749 ASSERT_TRUE(response_received); |
750 } | 750 } |
751 | 751 |
752 IN_PROC_BROWSER_TEST_F(PdfPluginContextMenuBrowserTest, | 752 IN_PROC_BROWSER_TEST_F(PdfPluginContextMenuBrowserTest, |
753 FullPagePdfHasPageItems) { | 753 FullPagePdfHasPageItems) { |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 IN_PROC_BROWSER_TEST_F(LoadImageBrowserTest, LoadImage) { | 907 IN_PROC_BROWSER_TEST_F(LoadImageBrowserTest, LoadImage) { |
908 static const char kValidImage[] = "/load_image/image.png"; | 908 static const char kValidImage[] = "/load_image/image.png"; |
909 SetupAndLoadImagePage(kValidImage); | 909 SetupAndLoadImagePage(kValidImage); |
910 AddLoadImageInterceptor(kValidImage); | 910 AddLoadImageInterceptor(kValidImage); |
911 AttemptLoadImage(); | 911 AttemptLoadImage(); |
912 interceptor_->WaitForRequests(1); | 912 interceptor_->WaitForRequests(1); |
913 EXPECT_EQ(1, interceptor_->num_requests()); | 913 EXPECT_EQ(1, interceptor_->num_requests()); |
914 } | 914 } |
915 | 915 |
916 } // namespace | 916 } // namespace |
OLD | NEW |