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/webkit_test_runner.h" | 5 #include "content/shell/renderer/webkit_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/debug/debugger.h" | 13 #include "base/debug/debugger.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/md5.h" | 15 #include "base/md5.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
20 #include "base/strings/sys_string_conversions.h" | 20 #include "base/strings/sys_string_conversions.h" |
21 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
22 #include "base/time/time.h" | 22 #include "base/time/time.h" |
23 #include "content/public/common/content_switches.h" | 23 #include "content/public/common/content_switches.h" |
24 #include "content/public/common/url_constants.h" | 24 #include "content/public/common/url_constants.h" |
| 25 #include "content/public/common/webpreferences.h" |
25 #include "content/public/renderer/history_item_serialization.h" | 26 #include "content/public/renderer/history_item_serialization.h" |
26 #include "content/public/renderer/render_view.h" | 27 #include "content/public/renderer/render_view.h" |
27 #include "content/public/renderer/render_view_visitor.h" | 28 #include "content/public/renderer/render_view_visitor.h" |
28 #include "content/public/test/layouttest_support.h" | 29 #include "content/public/test/layouttest_support.h" |
29 #include "content/shell/common/shell_messages.h" | 30 #include "content/shell/common/shell_messages.h" |
30 #include "content/shell/common/shell_switches.h" | 31 #include "content/shell/common/shell_switches.h" |
31 #include "content/shell/common/webkit_test_helpers.h" | 32 #include "content/shell/common/webkit_test_helpers.h" |
32 #include "content/shell/renderer/gc_controller.h" | 33 #include "content/shell/renderer/gc_controller.h" |
33 #include "content/shell/renderer/leak_detector.h" | 34 #include "content/shell/renderer/leak_detector.h" |
34 #include "content/shell/renderer/shell_render_process_observer.h" | 35 #include "content/shell/renderer/shell_render_process_observer.h" |
(...skipping 21 matching lines...) Expand all Loading... |
56 #include "third_party/WebKit/public/web/WebDocument.h" | 57 #include "third_party/WebKit/public/web/WebDocument.h" |
57 #include "third_party/WebKit/public/web/WebElement.h" | 58 #include "third_party/WebKit/public/web/WebElement.h" |
58 #include "third_party/WebKit/public/web/WebFrame.h" | 59 #include "third_party/WebKit/public/web/WebFrame.h" |
59 #include "third_party/WebKit/public/web/WebHistoryItem.h" | 60 #include "third_party/WebKit/public/web/WebHistoryItem.h" |
60 #include "third_party/WebKit/public/web/WebKit.h" | 61 #include "third_party/WebKit/public/web/WebKit.h" |
61 #include "third_party/WebKit/public/web/WebLeakDetector.h" | 62 #include "third_party/WebKit/public/web/WebLeakDetector.h" |
62 #include "third_party/WebKit/public/web/WebScriptSource.h" | 63 #include "third_party/WebKit/public/web/WebScriptSource.h" |
63 #include "third_party/WebKit/public/web/WebTestingSupport.h" | 64 #include "third_party/WebKit/public/web/WebTestingSupport.h" |
64 #include "third_party/WebKit/public/web/WebView.h" | 65 #include "third_party/WebKit/public/web/WebView.h" |
65 #include "ui/gfx/rect.h" | 66 #include "ui/gfx/rect.h" |
66 #include "webkit/common/webpreferences.h" | |
67 | 67 |
68 using blink::Platform; | 68 using blink::Platform; |
69 using blink::WebArrayBufferView; | 69 using blink::WebArrayBufferView; |
70 using blink::WebContextMenuData; | 70 using blink::WebContextMenuData; |
71 using blink::WebDevToolsAgent; | 71 using blink::WebDevToolsAgent; |
72 using blink::WebDeviceMotionData; | 72 using blink::WebDeviceMotionData; |
73 using blink::WebDeviceOrientationData; | 73 using blink::WebDeviceOrientationData; |
74 using blink::WebElement; | 74 using blink::WebElement; |
75 using blink::WebFrame; | 75 using blink::WebFrame; |
76 using blink::WebGamepads; | 76 using blink::WebGamepads; |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 WebFrame* main_frame = render_view()->GetWebView()->mainFrame(); | 723 WebFrame* main_frame = render_view()->GetWebView()->mainFrame(); |
724 DCHECK_EQ(GURL(kAboutBlankURL), GURL(main_frame->document().url())); | 724 DCHECK_EQ(GURL(kAboutBlankURL), GURL(main_frame->document().url())); |
725 DCHECK(!main_frame->isLoading()); | 725 DCHECK(!main_frame->isLoading()); |
726 | 726 |
727 LeakDetectionResult result = leak_detector_->TryLeakDetection( | 727 LeakDetectionResult result = leak_detector_->TryLeakDetection( |
728 render_view()->GetWebView()->mainFrame()); | 728 render_view()->GetWebView()->mainFrame()); |
729 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), result)); | 729 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), result)); |
730 } | 730 } |
731 | 731 |
732 } // namespace content | 732 } // namespace content |
OLD | NEW |