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 "content/shell/renderer/layout_test/blink_test_runner.h" | 5 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <clocale> | 9 #include <clocale> |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 WebURLRequest(GURL(url::kAboutBlankURL))); | 1008 WebURLRequest(GURL(url::kAboutBlankURL))); |
1009 Send(new ShellViewHostMsg_ResetDone(routing_id())); | 1009 Send(new ShellViewHostMsg_ResetDone(routing_id())); |
1010 } | 1010 } |
1011 | 1011 |
1012 void BlinkTestRunner::OnNotifyDone() { | 1012 void BlinkTestRunner::OnNotifyDone() { |
1013 render_view()->GetWebView()->mainFrame()->executeScript( | 1013 render_view()->GetWebView()->mainFrame()->executeScript( |
1014 WebScriptSource(WebString::fromUTF8("testRunner.notifyDone();"))); | 1014 WebScriptSource(WebString::fromUTF8("testRunner.notifyDone();"))); |
1015 } | 1015 } |
1016 | 1016 |
1017 void BlinkTestRunner::OnTryLeakDetection() { | 1017 void BlinkTestRunner::OnTryLeakDetection() { |
1018 WebLocalFrame* main_frame = | 1018 blink::WebFrame* main_frame = |
1019 render_view()->GetWebView()->mainFrame()->toWebLocalFrame(); | 1019 render_view()->GetWebView()->mainFrame(); |
1020 DCHECK_EQ(GURL(url::kAboutBlankURL), GURL(main_frame->document().url())); | 1020 DCHECK_EQ(GURL(url::kAboutBlankURL), GURL(main_frame->document().url())); |
1021 DCHECK(!main_frame->isLoading()); | 1021 DCHECK(!main_frame->isLoading()); |
1022 | 1022 |
1023 leak_detector_->TryLeakDetection(main_frame); | 1023 leak_detector_->TryLeakDetection(main_frame); |
1024 } | 1024 } |
1025 | 1025 |
1026 void BlinkTestRunner::OnReplyBluetoothManualChooserEvents( | 1026 void BlinkTestRunner::OnReplyBluetoothManualChooserEvents( |
1027 const std::vector<std::string>& events) { | 1027 const std::vector<std::string>& events) { |
1028 DCHECK(!get_bluetooth_events_callbacks_.empty()); | 1028 DCHECK(!get_bluetooth_events_callbacks_.empty()); |
1029 base::Callback<void(const std::vector<std::string>&)> callback = | 1029 base::Callback<void(const std::vector<std::string>&)> callback = |
1030 get_bluetooth_events_callbacks_.front(); | 1030 get_bluetooth_events_callbacks_.front(); |
1031 get_bluetooth_events_callbacks_.pop_front(); | 1031 get_bluetooth_events_callbacks_.pop_front(); |
1032 callback.Run(events); | 1032 callback.Run(events); |
1033 } | 1033 } |
1034 | 1034 |
1035 void BlinkTestRunner::ReportLeakDetectionResult( | 1035 void BlinkTestRunner::ReportLeakDetectionResult( |
1036 const LeakDetectionResult& report) { | 1036 const LeakDetectionResult& report) { |
1037 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1037 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
1038 } | 1038 } |
1039 | 1039 |
1040 } // namespace content | 1040 } // namespace content |
OLD | NEW |