Changeset 138980 in webkit
- Timestamp:
- Jan 7, 2013 1:21:28 PM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r138965 r138980 1 2013-01-07 Jochen Eisinger <jochen@chromium.org> 2 3 [chromium] move dumpAsText and friends to the TestRunner library 4 https://bugs.webkit.org/show_bug.cgi?id=106222 5 6 Reviewed by Adam Barth. 7 8 This moves dumpAsText, dumpChildFramesAsText, and dumpChildFrameScrollPositions to the TestRunner library. 9 10 * DumpRenderTree/chromium/DRTTestRunner.cpp: 11 (DRTTestRunner::DRTTestRunner): 12 (DRTTestRunner::reset): 13 * DumpRenderTree/chromium/DRTTestRunner.h: 14 (DRTTestRunner): 15 * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h: 16 (WebTestRunner::WebTestRunner::shouldDumpAsText): 17 (WebTestRunner::WebTestRunner::setShouldDumpAsText): 18 (WebTestRunner::WebTestRunner::shouldGeneratePixelResults): 19 (WebTestRunner::WebTestRunner::setShouldGeneratePixelResults): 20 (WebTestRunner::WebTestRunner::shouldDumpChildFrameScrollPositions): 21 (WebTestRunner::WebTestRunner::shouldDumpChildFramesAsText): 22 * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp: 23 (WebTestRunner::TestRunner::TestRunner): 24 (WebTestRunner::TestRunner::reset): 25 (WebTestRunner::TestRunner::shouldDumpAsText): 26 (WebTestRunner): 27 (WebTestRunner::TestRunner::setShouldDumpAsText): 28 (WebTestRunner::TestRunner::shouldGeneratePixelResults): 29 (WebTestRunner::TestRunner::setShouldGeneratePixelResults): 30 (WebTestRunner::TestRunner::shouldDumpChildFrameScrollPositions): 31 (WebTestRunner::TestRunner::shouldDumpChildFramesAsText): 32 (WebTestRunner::TestRunner::dumpAsText): 33 (WebTestRunner::TestRunner::dumpChildFrameScrollPositions): 34 (WebTestRunner::TestRunner::dumpChildFramesAsText): 35 * DumpRenderTree/chromium/TestRunner/src/TestRunner.h: 36 (TestRunner): 37 1 38 2013-01-07 Ryosuke Niwa <rniwa@webkit.org> 2 39 -
trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
r137997 r138980 118 118 bindMethod("display", &DRTTestRunner::display); 119 119 bindMethod("displayInvalidatedRegion", &DRTTestRunner::displayInvalidatedRegion); 120 bindMethod("dumpAsText", &DRTTestRunner::dumpAsText);121 120 bindMethod("dumpBackForwardList", &DRTTestRunner::dumpBackForwardList); 122 bindMethod("dumpChildFramesAsText", &DRTTestRunner::dumpChildFramesAsText);123 bindMethod("dumpChildFrameScrollPositions", &DRTTestRunner::dumpChildFrameScrollPositions);124 121 bindMethod("dumpFrameLoadCallbacks", &DRTTestRunner::dumpFrameLoadCallbacks); 125 122 bindMethod("dumpProgressFinishedCallback", &DRTTestRunner::dumpProgressFinishedCallback); … … 250 247 } 251 248 252 void DRTTestRunner::dumpAsText(const CppArgumentList& arguments, CppVariant* result)253 {254 m_dumpAsText = true;255 m_generatePixelResults = false;256 257 // Optional paramater, describing whether it's allowed to dump pixel results in dumpAsText mode.258 if (arguments.size() > 0 && arguments[0].isBool())259 m_generatePixelResults = arguments[0].value.boolValue;260 261 result->setNull();262 }263 264 249 void DRTTestRunner::dumpBackForwardList(const CppArgumentList&, CppVariant* result) 265 250 { … … 301 286 { 302 287 m_dumpResourceResponseMIMETypes = true; 303 result->setNull();304 }305 306 void DRTTestRunner::dumpChildFrameScrollPositions(const CppArgumentList&, CppVariant* result)307 {308 m_dumpChildFrameScrollPositions = true;309 result->setNull();310 }311 312 void DRTTestRunner::dumpChildFramesAsText(const CppArgumentList&, CppVariant* result)313 {314 m_dumpChildFramesAsText = true;315 288 result->setNull(); 316 289 } … … 524 497 if (m_shell) 525 498 m_shell->webViewHost()->setDeviceScaleFactor(1); 526 m_dumpAsText = false;527 499 m_dumpAsAudio = false; 528 500 m_dumpCreateView = false; … … 534 506 m_dumpResourceResponseMIMETypes = false; 535 507 m_dumpBackForwardList = false; 536 m_dumpChildFrameScrollPositions = false;537 m_dumpChildFramesAsText = false;538 508 m_dumpWindowStatusChanges = false; 539 509 m_dumpSelectionRect = false; 540 510 m_dumpTitleChanges = false; 541 511 m_dumpPermissionClientCallbacks = false; 542 m_generatePixelResults = true;543 512 m_waitUntilDone = false; 544 513 m_canOpenWindows = false; -
trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h
r137997 r138980 76 76 virtual ~DRTTestRunner(); 77 77 78 // This function sets a flag that tells the test_shell to dump pages as79 // plain text, rather than as a text representation of the renderer's state.80 // It takes an optional argument, whether to dump pixels results or not.81 void dumpAsText(const CppArgumentList&, CppVariant*);82 83 78 // This function sets a flag that tells the test_shell to print a line of 84 79 // descriptive text for each frame load callback. It takes no arguments, and … … 100 95 void dumpBackForwardList(const CppArgumentList&, CppVariant*); 101 96 102 // This function sets a flag that tells the test_shell to print out the103 // scroll offsets of the child frames. It ignores all.104 void dumpChildFrameScrollPositions(const CppArgumentList&, CppVariant*);105 106 // This function sets a flag that tells the test_shell to recursively107 // dump all frames as plain text if the dumpAsText flag is set.108 // It takes no arguments, and ignores any that may be present.109 void dumpChildFramesAsText(const CppArgumentList&, CppVariant*);110 111 97 // This function sets a flag that tells the test_shell to dump a descriptive 112 98 // line for each resource load callback. It takes no arguments, and ignores … … 283 269 bool shouldDumpAsAudio() const { return m_dumpAsAudio; } 284 270 void setShouldDumpAsAudio(bool dumpAsAudio) { m_dumpAsAudio = dumpAsAudio; } 285 bool shouldDumpAsText() { return m_dumpAsText; }286 void setShouldDumpAsText(bool value) { m_dumpAsText = value; }287 271 bool shouldDumpFrameLoadCallbacks() { return m_dumpFrameLoadCallbacks; } 288 272 void setShouldDumpFrameLoadCallbacks(bool value) { m_dumpFrameLoadCallbacks = value; } … … 301 285 bool shouldDumpTitleChanges() { return m_dumpTitleChanges; } 302 286 bool shouldDumpPermissionClientCallbacks() { return m_dumpPermissionClientCallbacks; } 303 bool shouldDumpChildFrameScrollPositions() { return m_dumpChildFrameScrollPositions; }304 bool shouldDumpChildFramesAsText() { return m_dumpChildFramesAsText; }305 bool shouldGeneratePixelResults() { return m_generatePixelResults; }306 void setShouldGeneratePixelResults(bool value) { m_generatePixelResults = value; }307 287 bool shouldDumpCreateView() { return m_dumpCreateView; } 308 288 bool canOpenWindows() { return m_canOpenWindows; } … … 397 377 TestShell* m_shell; 398 378 399 // If true, the test_shell will produce a plain text dump rather than a400 // text representation of the renderer.401 bool m_dumpAsText;402 403 379 // If true, the test_shell will output a base64 encoded WAVE file. 404 380 bool m_dumpAsAudio; … … 436 412 bool m_dumpBackForwardList; 437 413 438 // If true, the test_shell will print out the child frame scroll offsets as439 // well.440 bool m_dumpChildFrameScrollPositions;441 442 // If true and if dump_as_text_ is true, the test_shell will recursively443 // dump all frames as plain text.444 bool m_dumpChildFramesAsText;445 446 414 // If true, the test_shell will dump all changes to window.status. 447 415 bool m_dumpWindowStatusChanges; … … 453 421 // callback is invoked. Currently only implemented for allowImage. 454 422 bool m_dumpPermissionClientCallbacks; 455 456 // If true, the test_shell will generate pixel results in dumpAsText mode457 bool m_generatePixelResults;458 423 459 424 // If true, output a descriptive line each time WebViewClient::createView -
trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h
r137993 r138980 39 39 public: 40 40 virtual bool shouldDumpEditingCallbacks() const { return false; } 41 virtual bool shouldDumpAsText() const { return false; } 42 virtual void setShouldDumpAsText(bool) { } 43 virtual bool shouldGeneratePixelResults() const { return false; } 44 virtual void setShouldGeneratePixelResults(bool) { } 45 virtual bool shouldDumpChildFrameScrollPositions() const { return false; } 46 virtual bool shouldDumpChildFramesAsText() const { return false; } 41 47 }; 42 48 -
trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp
r138814 r138980 134 134 // The following modify the state of the TestRunner. 135 135 bindMethod("dumpEditingCallbacks", &TestRunner::dumpEditingCallbacks); 136 bindMethod("dumpAsText", &TestRunner::dumpAsText); 137 bindMethod("dumpChildFramesAsText", &TestRunner::dumpChildFramesAsText); 138 bindMethod("dumpChildFrameScrollPositions", &TestRunner::dumpChildFrameScrollPositions); 136 139 137 140 // The following methods interact with the WebTestProxy. … … 199 202 200 203 m_dumpEditingCallbacks = false; 204 m_dumpAsText = false; 205 m_generatePixelResults = true; 206 m_dumpChildFrameScrollPositions = false; 207 m_dumpChildFramesAsText = false; 201 208 202 209 m_globalFlag.set(false); … … 209 216 { 210 217 return m_dumpEditingCallbacks; 218 } 219 220 bool TestRunner::shouldDumpAsText() const 221 { 222 return m_dumpAsText; 223 } 224 225 void TestRunner::setShouldDumpAsText(bool value) 226 { 227 m_dumpAsText = value; 228 } 229 230 bool TestRunner::shouldGeneratePixelResults() const 231 { 232 return m_generatePixelResults; 233 } 234 235 void TestRunner::setShouldGeneratePixelResults(bool value) 236 { 237 m_generatePixelResults = value; 238 } 239 240 bool TestRunner::shouldDumpChildFrameScrollPositions() const 241 { 242 return m_dumpChildFrameScrollPositions; 243 } 244 245 bool TestRunner::shouldDumpChildFramesAsText() const 246 { 247 return m_dumpChildFramesAsText; 211 248 } 212 249 … … 911 948 } 912 949 950 void TestRunner::dumpAsText(const CppArgumentList& arguments, CppVariant* result) 951 { 952 m_dumpAsText = true; 953 m_generatePixelResults = false; 954 955 // Optional paramater, describing whether it's allowed to dump pixel results in dumpAsText mode. 956 if (arguments.size() > 0 && arguments[0].isBool()) 957 m_generatePixelResults = arguments[0].value.boolValue; 958 959 result->setNull(); 960 } 961 962 void TestRunner::dumpChildFrameScrollPositions(const CppArgumentList&, CppVariant* result) 963 { 964 m_dumpChildFrameScrollPositions = true; 965 result->setNull(); 966 } 967 968 void TestRunner::dumpChildFramesAsText(const CppArgumentList&, CppVariant* result) 969 { 970 m_dumpChildFramesAsText = true; 971 result->setNull(); 972 } 973 913 974 void TestRunner::workerThreadCount(CppVariant* result) 914 975 { -
trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h
r138814 r138980 60 60 // WebTestRunner implementation. 61 61 virtual bool shouldDumpEditingCallbacks() const OVERRIDE; 62 virtual bool shouldDumpAsText() const OVERRIDE; 63 virtual void setShouldDumpAsText(bool) OVERRIDE; 64 virtual bool shouldGeneratePixelResults() const OVERRIDE; 65 virtual void setShouldGeneratePixelResults(bool) OVERRIDE; 66 virtual bool shouldDumpChildFrameScrollPositions() const OVERRIDE; 67 virtual bool shouldDumpChildFramesAsText() const OVERRIDE; 62 68 63 69 protected: … … 185 191 void dumpEditingCallbacks(const CppArgumentList&, CppVariant*); 186 192 193 // This function sets a flag that tells the test_shell to dump pages as 194 // plain text, rather than as a text representation of the renderer's state. 195 // It takes an optional argument, whether to dump pixels results or not. 196 void dumpAsText(const CppArgumentList&, CppVariant*); 197 198 // This function sets a flag that tells the test_shell to print out the 199 // scroll offsets of the child frames. It ignores all. 200 void dumpChildFrameScrollPositions(const CppArgumentList&, CppVariant*); 201 202 // This function sets a flag that tells the test_shell to recursively 203 // dump all frames as plain text if the dumpAsText flag is set. 204 // It takes no arguments, and ignores any that may be present. 205 void dumpChildFramesAsText(const CppArgumentList&, CppVariant*); 206 187 207 /////////////////////////////////////////////////////////////////////////// 188 208 // Methods interacting with the WebTestProxy … … 231 251 bool m_dumpEditingCallbacks; 232 252 253 // If true, the test_shell will generate pixel results in dumpAsText mode 254 bool m_generatePixelResults; 255 256 // If true, the test_shell will produce a plain text dump rather than a 257 // text representation of the renderer. 258 bool m_dumpAsText; 259 260 // If true and if dump_as_text_ is true, the test_shell will recursively 261 // dump all frames as plain text. 262 bool m_dumpChildFramesAsText; 263 264 // If true, the test_shell will print out the child frame scroll offsets as 265 // well. 266 bool m_dumpChildFrameScrollPositions; 267 233 268 WebTestDelegate* m_delegate; 234 269 WebKit::WebView* m_webView;
Note: See TracChangeset
for help on using the changeset viewer.