| 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 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <clocale> | 10 #include <clocale> |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 #include "media/base/audio_parameters.h" | 57 #include "media/base/audio_parameters.h" |
| 58 #include "media/base/video_capturer_source.h" | 58 #include "media/base/video_capturer_source.h" |
| 59 #include "net/base/filename_util.h" | 59 #include "net/base/filename_util.h" |
| 60 #include "net/base/net_errors.h" | 60 #include "net/base/net_errors.h" |
| 61 #include "services/shell/public/cpp/interface_provider.h" | 61 #include "services/shell/public/cpp/interface_provider.h" |
| 62 #include "skia/ext/platform_canvas.h" | 62 #include "skia/ext/platform_canvas.h" |
| 63 #include "third_party/WebKit/public/platform/FilePathConversion.h" | 63 #include "third_party/WebKit/public/platform/FilePathConversion.h" |
| 64 #include "third_party/WebKit/public/platform/Platform.h" | 64 #include "third_party/WebKit/public/platform/Platform.h" |
| 65 #include "third_party/WebKit/public/platform/WebPoint.h" | 65 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 66 #include "third_party/WebKit/public/platform/WebRect.h" | 66 #include "third_party/WebKit/public/platform/WebRect.h" |
| 67 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
| 67 #include "third_party/WebKit/public/platform/WebSize.h" | 68 #include "third_party/WebKit/public/platform/WebSize.h" |
| 68 #include "third_party/WebKit/public/platform/WebString.h" | 69 #include "third_party/WebKit/public/platform/WebString.h" |
| 69 #include "third_party/WebKit/public/platform/WebTaskRunner.h" | 70 #include "third_party/WebKit/public/platform/WebTaskRunner.h" |
| 70 #include "third_party/WebKit/public/platform/WebThread.h" | 71 #include "third_party/WebKit/public/platform/WebThread.h" |
| 71 #include "third_party/WebKit/public/platform/WebTraceLocation.h" | 72 #include "third_party/WebKit/public/platform/WebTraceLocation.h" |
| 72 #include "third_party/WebKit/public/platform/WebURL.h" | 73 #include "third_party/WebKit/public/platform/WebURL.h" |
| 73 #include "third_party/WebKit/public/platform/WebURLError.h" | 74 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 74 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 75 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 75 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 76 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 76 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerProm
ptReply.h" | 77 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerProm
ptReply.h" |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 session_histories_ = session_histories; | 976 session_histories_ = session_histories; |
| 976 current_entry_indexes_ = current_entry_indexes; | 977 current_entry_indexes_ = current_entry_indexes; |
| 977 CaptureDump(); | 978 CaptureDump(); |
| 978 } | 979 } |
| 979 | 980 |
| 980 void BlinkTestRunner::OnReset() { | 981 void BlinkTestRunner::OnReset() { |
| 981 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces()->ResetAll(); | 982 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces()->ResetAll(); |
| 982 Reset(true /* for_new_test */); | 983 Reset(true /* for_new_test */); |
| 983 // Navigating to about:blank will make sure that no new loads are initiated | 984 // Navigating to about:blank will make sure that no new loads are initiated |
| 984 // by the renderer. | 985 // by the renderer. |
| 985 render_view()->GetWebView()->mainFrame()->loadRequest( | 986 WebURLRequest request = WebURLRequest(GURL(url::kAboutBlankURL)); |
| 986 WebURLRequest(GURL(url::kAboutBlankURL))); | 987 request.setRequestorOrigin(blink::WebSecurityOrigin::createUnique()); |
| 988 render_view()->GetWebView()->mainFrame()->loadRequest(request); |
| 987 Send(new ShellViewHostMsg_ResetDone(routing_id())); | 989 Send(new ShellViewHostMsg_ResetDone(routing_id())); |
| 988 } | 990 } |
| 989 | 991 |
| 990 void BlinkTestRunner::OnTestFinishedInSecondaryRenderer() { | 992 void BlinkTestRunner::OnTestFinishedInSecondaryRenderer() { |
| 991 DCHECK(is_main_window_ && render_view()->GetMainRenderFrame()); | 993 DCHECK(is_main_window_ && render_view()->GetMainRenderFrame()); |
| 992 TestFinished(); | 994 TestFinished(); |
| 993 } | 995 } |
| 994 | 996 |
| 995 void BlinkTestRunner::OnTryLeakDetection() { | 997 void BlinkTestRunner::OnTryLeakDetection() { |
| 996 blink::WebFrame* main_frame = | 998 blink::WebFrame* main_frame = |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1013 void BlinkTestRunner::ReportLeakDetectionResult( | 1015 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1014 const LeakDetectionResult& report) { | 1016 const LeakDetectionResult& report) { |
| 1015 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1017 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1016 } | 1018 } |
| 1017 | 1019 |
| 1018 void BlinkTestRunner::OnDestruct() { | 1020 void BlinkTestRunner::OnDestruct() { |
| 1019 delete this; | 1021 delete this; |
| 1020 } | 1022 } |
| 1021 | 1023 |
| 1022 } // namespace content | 1024 } // namespace content |
| OLD | NEW |