OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "public/platform/WebRect.h" | 45 #include "public/platform/WebRect.h" |
46 #include "public/platform/WebURLError.h" | 46 #include "public/platform/WebURLError.h" |
47 #include "public/platform/WebURLRequest.h" | 47 #include "public/platform/WebURLRequest.h" |
48 #include <map> | 48 #include <map> |
49 #include <memory> | 49 #include <memory> |
50 #include <string> | 50 #include <string> |
51 | 51 |
52 namespace WebKit { | 52 namespace WebKit { |
53 class WebAccessibilityObject; | 53 class WebAccessibilityObject; |
54 class WebCachedURLRequest; | 54 class WebCachedURLRequest; |
| 55 class WebColorChooser; |
| 56 class WebColorChooserClient; |
55 class WebDataSource; | 57 class WebDataSource; |
56 class WebDeviceOrientationClient; | 58 class WebDeviceOrientationClient; |
57 class WebDeviceOrientationClientMock; | 59 class WebDeviceOrientationClientMock; |
58 class WebDragData; | 60 class WebDragData; |
59 class WebFrame; | 61 class WebFrame; |
60 class WebGeolocationClient; | 62 class WebGeolocationClient; |
61 class WebGeolocationClientMock; | 63 class WebGeolocationClientMock; |
62 class WebImage; | 64 class WebImage; |
63 class WebMediaPlayer; | 65 class WebMediaPlayer; |
64 class WebMediaPlayerClient; | 66 class WebMediaPlayerClient; |
(...skipping 10 matching lines...) Expand all Loading... |
75 class WebURL; | 77 class WebURL; |
76 class WebURLResponse; | 78 class WebURLResponse; |
77 class WebUserMediaClient; | 79 class WebUserMediaClient; |
78 class WebView; | 80 class WebView; |
79 struct WebConsoleMessage; | 81 struct WebConsoleMessage; |
80 struct WebContextMenuData; | 82 struct WebContextMenuData; |
81 struct WebPluginParams; | 83 struct WebPluginParams; |
82 struct WebPoint; | 84 struct WebPoint; |
83 struct WebSize; | 85 struct WebSize; |
84 struct WebWindowFeatures; | 86 struct WebWindowFeatures; |
| 87 typedef unsigned WebColor; |
85 } | 88 } |
86 | 89 |
87 class SkCanvas; | 90 class SkCanvas; |
88 | 91 |
89 namespace WebTestRunner { | 92 namespace WebTestRunner { |
90 | 93 |
91 class MockWebSpeechInputController; | 94 class MockWebSpeechInputController; |
92 class MockWebSpeechRecognizer; | 95 class MockWebSpeechRecognizer; |
93 class SpellCheckClient; | 96 class SpellCheckClient; |
94 class TestInterfaces; | 97 class TestInterfaces; |
95 class WebTestDelegate; | 98 class WebTestDelegate; |
96 class WebTestInterfaces; | 99 class WebTestInterfaces; |
97 class WebTestRunner; | 100 class WebTestRunner; |
98 class WebUserMediaClientMock; | 101 class WebUserMediaClientMock; |
99 | 102 |
100 class WEBTESTRUNNER_EXPORT WebTestProxyBase { | 103 class WEBTESTRUNNER_EXPORT WebTestProxyBase { |
101 public: | 104 public: |
102 void setInterfaces(WebTestInterfaces*); | 105 void setInterfaces(WebTestInterfaces*); |
103 void setDelegate(WebTestDelegate*); | 106 void setDelegate(WebTestDelegate*); |
104 | 107 |
105 void reset(); | 108 void reset(); |
106 | 109 |
107 WebKit::WebSpellCheckClient *spellCheckClient() const; | 110 WebKit::WebSpellCheckClient *spellCheckClient() const; |
| 111 WebKit::WebColorChooser* createColorChooser(WebKit::WebColorChooserClient*,
const WebKit::WebColor&); |
108 | 112 |
109 std::string captureTree(bool debugRenderTree); | 113 std::string captureTree(bool debugRenderTree); |
110 SkCanvas* capturePixels(); | 114 SkCanvas* capturePixels(); |
111 | 115 |
112 void setLogConsoleOutput(bool enabled); | 116 void setLogConsoleOutput(bool enabled); |
113 | 117 |
114 // FIXME: Make this private again. | 118 // FIXME: Make this private again. |
115 void scheduleComposite(); | 119 void scheduleComposite(); |
116 | 120 |
| 121 void didOpenChooser(); |
| 122 void didCloseChooser(); |
| 123 bool isChooserShown(); |
| 124 |
117 #if WEBTESTRUNNER_IMPLEMENTATION | 125 #if WEBTESTRUNNER_IMPLEMENTATION |
118 void display(); | 126 void display(); |
119 void displayInvalidatedRegion(); | 127 void displayInvalidatedRegion(); |
120 void discardBackingStore(); | 128 void discardBackingStore(); |
121 | 129 |
122 WebKit::WebDeviceOrientationClientMock* deviceOrientationClientMock(); | 130 WebKit::WebDeviceOrientationClientMock* deviceOrientationClientMock(); |
123 WebKit::WebGeolocationClientMock* geolocationClientMock(); | 131 WebKit::WebGeolocationClientMock* geolocationClientMock(); |
124 MockWebSpeechInputController* speechInputControllerMock(); | 132 MockWebSpeechInputController* speechInputControllerMock(); |
125 MockWebSpeechRecognizer* speechRecognizerMock(); | 133 MockWebSpeechRecognizer* speechRecognizerMock(); |
126 #endif | 134 #endif |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 std::auto_ptr<WebUserMediaClientMock> m_userMediaClient; | 224 std::auto_ptr<WebUserMediaClientMock> m_userMediaClient; |
217 | 225 |
218 // Painting. | 226 // Painting. |
219 std::auto_ptr<SkCanvas> m_canvas; | 227 std::auto_ptr<SkCanvas> m_canvas; |
220 WebKit::WebRect m_paintRect; | 228 WebKit::WebRect m_paintRect; |
221 bool m_isPainting; | 229 bool m_isPainting; |
222 std::map<unsigned, std::string> m_resourceIdentifierMap; | 230 std::map<unsigned, std::string> m_resourceIdentifierMap; |
223 std::map<unsigned, WebKit::WebURLRequest> m_requestMap; | 231 std::map<unsigned, WebKit::WebURLRequest> m_requestMap; |
224 | 232 |
225 bool m_logConsoleOutput; | 233 bool m_logConsoleOutput; |
| 234 int m_chooserCount; |
226 | 235 |
227 std::auto_ptr<WebKit::WebGeolocationClientMock> m_geolocationClient; | 236 std::auto_ptr<WebKit::WebGeolocationClientMock> m_geolocationClient; |
228 std::auto_ptr<WebKit::WebDeviceOrientationClientMock> m_deviceOrientationCli
ent; | 237 std::auto_ptr<WebKit::WebDeviceOrientationClientMock> m_deviceOrientationCli
ent; |
229 std::auto_ptr<MockWebSpeechRecognizer> m_speechRecognizer; | 238 std::auto_ptr<MockWebSpeechRecognizer> m_speechRecognizer; |
230 std::auto_ptr<MockWebSpeechInputController> m_speechInputController; | 239 std::auto_ptr<MockWebSpeechInputController> m_speechInputController; |
231 | 240 |
232 private: | 241 private: |
233 WebTestProxyBase(WebTestProxyBase&); | 242 WebTestProxyBase(WebTestProxyBase&); |
234 WebTestProxyBase& operator=(const WebTestProxyBase&); | 243 WebTestProxyBase& operator=(const WebTestProxyBase&); |
235 }; | 244 }; |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 if (policy == WebKit::WebNavigationPolicyIgnore) | 599 if (policy == WebKit::WebNavigationPolicyIgnore) |
591 return policy; | 600 return policy; |
592 return Base::decidePolicyForNavigation(frame, request, type, defaultPoli
cy, isRedirect); | 601 return Base::decidePolicyForNavigation(frame, request, type, defaultPoli
cy, isRedirect); |
593 } | 602 } |
594 virtual bool willCheckAndDispatchMessageEvent(WebKit::WebFrame* sourceFrame,
WebKit::WebFrame* targetFrame, WebKit::WebSecurityOrigin target, WebKit::WebDOM
MessageEvent event) | 603 virtual bool willCheckAndDispatchMessageEvent(WebKit::WebFrame* sourceFrame,
WebKit::WebFrame* targetFrame, WebKit::WebSecurityOrigin target, WebKit::WebDOM
MessageEvent event) |
595 { | 604 { |
596 if (WebTestProxyBase::willCheckAndDispatchMessageEvent(sourceFrame, targ
etFrame, target, event)) | 605 if (WebTestProxyBase::willCheckAndDispatchMessageEvent(sourceFrame, targ
etFrame, target, event)) |
597 return true; | 606 return true; |
598 return Base::willCheckAndDispatchMessageEvent(sourceFrame, targetFrame,
target, event); | 607 return Base::willCheckAndDispatchMessageEvent(sourceFrame, targetFrame,
target, event); |
599 } | 608 } |
| 609 virtual WebKit::WebColorChooser* createColorChooser(WebKit::WebColorChooserC
lient* client, const WebKit::WebColor& color) |
| 610 { |
| 611 return WebTestProxyBase::createColorChooser(client, color); |
| 612 } |
600 }; | 613 }; |
601 | 614 |
602 } | 615 } |
603 | 616 |
604 #endif // WebTestProxy_h | 617 #endif // WebTestProxy_h |
OLD | NEW |