Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 1170623003: Revert "content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/shell/renderer/layout_test/blink_test_runner.h" 5 #include "content/shell/renderer/layout_test/blink_test_runner.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <clocale> 8 #include <clocale>
9 #include <cmath> 9 #include <cmath>
10 10
11 #include "base/base64.h" 11 #include "base/base64.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/debug/debugger.h" 14 #include "base/debug/debugger.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/location.h"
17 #include "base/md5.h" 16 #include "base/md5.h"
18 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
19 #include "base/single_thread_task_runner.h" 18 #include "base/message_loop/message_loop.h"
20 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
21 #include "base/strings/stringprintf.h" 20 #include "base/strings/stringprintf.h"
22 #include "base/strings/sys_string_conversions.h" 21 #include "base/strings/sys_string_conversions.h"
23 #include "base/strings/utf_string_conversions.h" 22 #include "base/strings/utf_string_conversions.h"
24 #include "base/thread_task_runner_handle.h"
25 #include "base/time/time.h" 23 #include "base/time/time.h"
26 #include "components/test_runner/app_banner_client.h" 24 #include "components/test_runner/app_banner_client.h"
27 #include "components/test_runner/gamepad_controller.h" 25 #include "components/test_runner/gamepad_controller.h"
28 #include "components/test_runner/mock_screen_orientation_client.h" 26 #include "components/test_runner/mock_screen_orientation_client.h"
29 #include "components/test_runner/test_interfaces.h" 27 #include "components/test_runner/test_interfaces.h"
30 #include "components/test_runner/web_task.h" 28 #include "components/test_runner/web_task.h"
31 #include "components/test_runner/web_test_interfaces.h" 29 #include "components/test_runner/web_test_interfaces.h"
32 #include "components/test_runner/web_test_proxy.h" 30 #include "components/test_runner/web_test_proxy.h"
33 #include "components/test_runner/web_test_runner.h" 31 #include "components/test_runner/web_test_runner.h"
34 #include "content/public/common/content_switches.h" 32 #include "content/public/common/content_switches.h"
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 Send(new ShellViewHostMsg_ImageDump( 823 Send(new ShellViewHostMsg_ImageDump(
826 routing_id(), actual_pixel_hash, snapshot)); 824 routing_id(), actual_pixel_hash, snapshot));
827 } 825 }
828 826
829 CaptureDumpComplete(); 827 CaptureDumpComplete();
830 } 828 }
831 829
832 void BlinkTestRunner::CaptureDumpComplete() { 830 void BlinkTestRunner::CaptureDumpComplete() {
833 render_view()->GetWebView()->mainFrame()->stopLoading(); 831 render_view()->GetWebView()->mainFrame()->stopLoading();
834 832
835 base::ThreadTaskRunnerHandle::Get()->PostTask( 833 base::MessageLoop::current()->PostTask(
836 FROM_HERE, base::Bind(base::IgnoreResult(&BlinkTestRunner::Send), 834 FROM_HERE, base::Bind(base::IgnoreResult(&BlinkTestRunner::Send),
837 base::Unretained(this), 835 base::Unretained(this),
838 new ShellViewHostMsg_TestFinished(routing_id()))); 836 new ShellViewHostMsg_TestFinished(routing_id())));
839 } 837 }
840 838
841 void BlinkTestRunner::OnSetTestConfiguration( 839 void BlinkTestRunner::OnSetTestConfiguration(
842 const ShellTestConfiguration& params) { 840 const ShellTestConfiguration& params) {
843 test_config_ = params; 841 test_config_ = params;
844 is_main_window_ = true; 842 is_main_window_ = true;
845 843
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 886
889 leak_detector_->TryLeakDetection(main_frame); 887 leak_detector_->TryLeakDetection(main_frame);
890 } 888 }
891 889
892 void BlinkTestRunner::ReportLeakDetectionResult( 890 void BlinkTestRunner::ReportLeakDetectionResult(
893 const LeakDetectionResult& report) { 891 const LeakDetectionResult& report) {
894 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 892 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
895 } 893 }
896 894
897 } // namespace content 895 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698