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

Side by Side Diff: content/shell/webkit_test_runner.h

Issue 11316244: [content shell] add support for a testRunner.setXSSAuditorEnabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_webpreferences.cc ('k') | content/shell/webkit_test_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ 5 #ifndef CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_
6 #define CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ 6 #define CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_
7 7
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/renderer/render_view_observer.h" 10 #include "content/public/renderer/render_view_observer.h"
11 #include "content/public/renderer/render_view_observer_tracker.h" 11 #include "content/public/renderer/render_view_observer_tracker.h"
12 #include "content/shell/shell_webpreferences.h"
12 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web TestDelegate.h" 13 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web TestDelegate.h"
13 14
14 class SkCanvas; 15 class SkCanvas;
15 16
16 namespace WebKit { 17 namespace WebKit {
17 struct WebRect; 18 struct WebRect;
18 } 19 }
19 20
20 namespace WebTestRunner { 21 namespace WebTestRunner {
21 class WebTestProxyBase; 22 class WebTestProxyBase;
(...skipping 30 matching lines...) Expand all
52 virtual void printMessage(const std::string& message); 53 virtual void printMessage(const std::string& message);
53 virtual void postTask(WebTestRunner::WebTask* task); 54 virtual void postTask(WebTestRunner::WebTask* task);
54 virtual void postDelayedTask(WebTestRunner::WebTask* task, 55 virtual void postDelayedTask(WebTestRunner::WebTask* task,
55 long long ms); 56 long long ms);
56 virtual WebKit::WebString registerIsolatedFileSystem( 57 virtual WebKit::WebString registerIsolatedFileSystem(
57 const WebKit::WebVector<WebKit::WebString>& absolute_filenames); 58 const WebKit::WebVector<WebKit::WebString>& absolute_filenames);
58 virtual long long getCurrentTimeInMillisecond(); 59 virtual long long getCurrentTimeInMillisecond();
59 virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path( 60 virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path(
60 const std::string& utf8_path); 61 const std::string& utf8_path);
61 62
63 void Reset();
62 void Display(); 64 void Display();
65 void SetXSSAuditorEnabled(bool enabled);
63 66
64 void set_proxy(WebTestRunner::WebTestProxyBase* proxy) { proxy_ = proxy; } 67 void set_proxy(WebTestRunner::WebTestProxyBase* proxy) { proxy_ = proxy; }
65 68
66 private: 69 private:
67 // Message handlers. 70 // Message handlers.
68 void OnCaptureTextDump(bool as_text, bool printing, bool recursive); 71 void OnCaptureTextDump(bool as_text, bool printing, bool recursive);
69 void OnCaptureImageDump(const std::string& expected_pixel_hash); 72 void OnCaptureImageDump(const std::string& expected_pixel_hash);
70 void OnSetCurrentWorkingDirectory(const FilePath& current_working_directory); 73 void OnSetCurrentWorkingDirectory(const FilePath& current_working_directory);
71 74
72 SkCanvas* GetCanvas(); 75 SkCanvas* GetCanvas();
73 void PaintRect(const WebKit::WebRect& rect); 76 void PaintRect(const WebKit::WebRect& rect);
74 void PaintInvalidatedRegion(); 77 void PaintInvalidatedRegion();
75 void DisplayRepaintMask(); 78 void DisplayRepaintMask();
76 79
77 scoped_ptr<SkCanvas> canvas_; 80 scoped_ptr<SkCanvas> canvas_;
78 scoped_ptr<WebKit::WebContextMenuData> last_context_menu_data_; 81 scoped_ptr<WebKit::WebContextMenuData> last_context_menu_data_;
79 FilePath current_working_directory_; 82 FilePath current_working_directory_;
80 83
81 WebTestRunner::WebTestProxyBase* proxy_; 84 WebTestRunner::WebTestProxyBase* proxy_;
82 85
86 ShellWebPreferences prefs_;
83 87
84 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunner); 88 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunner);
85 }; 89 };
86 90
87 } // namespace content 91 } // namespace content
88 92
89 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ 93 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_
OLDNEW
« no previous file with comments | « content/shell/shell_webpreferences.cc ('k') | content/shell/webkit_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698