Changeset 79403 in webkit
- Timestamp:
- Feb 22, 2011 9:54:13 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r79387 r79403 1 2011-02-22 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 DumpRenderTree should dump as text if test path contains "dumpAsText/" 6 https://bugs.webkit.org/show_bug.cgi?id=54873 7 8 * DumpRenderTree/chromium/LayoutTestController.h: 9 (LayoutTestController::setShouldDumpAsText): 10 (LayoutTestController::setShouldGeneratePixelResults): 11 * DumpRenderTree/chromium/TestShell.cpp: 12 (TestShell::runFileTest): 13 * DumpRenderTree/gtk/DumpRenderTree.cpp: 14 (shouldDumpAsText): 15 (dump): 16 (runTest): 17 * DumpRenderTree/mac/DumpRenderTree.mm: 18 (shouldDumpAsText): 19 (runTest): 20 * DumpRenderTree/qt/DumpRenderTreeQt.cpp: 21 (WebCore::isDumpAsTextTest): 22 (WebCore::DumpRenderTree::open): 23 * DumpRenderTree/win/DumpRenderTree.cpp: 24 (shouldDumpAsText): 25 (runTest): 26 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 27 (WTR::InjectedBundlePage::dump): 28 1 29 2011-02-22 Kenneth Russell <kbr@google.com> 2 30 -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h
r78620 r79403 344 344 WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*); 345 345 bool shouldDumpAsText() { return m_dumpAsText; } 346 void setShouldDumpAsText(bool value) { m_dumpAsText = value; } 346 347 bool shouldDumpEditingCallbacks() { return m_dumpEditingCallbacks; } 347 348 bool shouldDumpFrameLoadCallbacks() { return m_dumpFrameLoadCallbacks; } … … 359 360 bool shouldDumpChildFramesAsText() { return m_dumpChildFramesAsText; } 360 361 bool shouldGeneratePixelResults() { return m_generatePixelResults; } 362 void setShouldGeneratePixelResults(bool value) { m_generatePixelResults = value; } 361 363 bool acceptsEditing() { return m_acceptsEditing; } 362 364 bool canOpenWindows() { return m_canOpenWindows; } -
trunk/Tools/DumpRenderTree/chromium/TestShell.cpp
r78699 r79403 174 174 string testUrl = m_params.testUrl.spec(); 175 175 176 bool inspectorTestMode = testUrl.find("/inspector/") != string::npos 177 || testUrl.find("\\inspector\\") != string::npos; 178 179 m_prefs.developerExtrasEnabled = inspectorTestMode 180 || testUrl.find("/inspector-enabled/") != string::npos 181 || testUrl.find("\\inspector-enabled\\") != string::npos; 182 176 m_prefs.developerExtrasEnabled = true; 183 177 applyPreferences(); 184 178 … … 187 181 m_layoutTestController->setShouldDumpFrameLoadCallbacks(true); 188 182 189 if (inspectorTestMode) 183 if (testUrl.find("/dumpAsText/") != string::npos 184 || testUrl.find("\\dumpAsText\\") != string::npos) { 185 m_layoutTestController->setShouldDumpAsText(true); 186 m_layoutTestController->setShouldGeneratePixelResults(false); 187 } 188 189 if (testUrl.find("/inspector/") != string::npos 190 || testUrl.find("\\inspector\\") != string::npos) 190 191 showDevTools(); 191 192 -
trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
r79329 r79403 104 104 { 105 105 return pathOrURL.find("inspector/") != string::npos; 106 } 107 108 static bool shouldDumpAsText(const string& pathOrURL) 109 { 110 return pathOrURL.find("dumpAsText/") != string::npos; 106 111 } 107 112 … … 514 519 515 520 if (g_str_equal(responseMimeType, "text/plain")) { 516 gLayoutTestController->setDumpAsText(true); 521 gLayoutTestController->setDumpAsText(true); 517 522 gLayoutTestController->setGeneratePixelResults(false); 518 523 } … … 640 645 if (shouldOpenWebInspector(testURL)) 641 646 gLayoutTestController->showWebInspector(); 647 if (shouldDumpAsText(testURL)) { 648 gLayoutTestController->setDumpAsText(true); 649 gLayoutTestController->setGeneratePixelResults(false); 650 } 642 651 } 643 652 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r78947 r79403 997 997 } 998 998 999 static bool shouldDumpAsText(const char* pathOrURL) 1000 { 1001 return strstr(pathOrURL, "dumpAsText/"); 1002 } 1003 999 1004 static bool shouldEnableDeveloperExtras(const char* pathOrURL) 1000 1005 { … … 1091 1096 if (shouldOpenWebInspector(pathOrURL.c_str())) 1092 1097 gLayoutTestController->showWebInspector(); 1098 if (shouldDumpAsText(pathOrURL.c_str())) { 1099 gLayoutTestController->setDumpAsText(true); 1100 gLayoutTestController->setGeneratePixelResults(false); 1101 } 1093 1102 } 1094 1103 -
trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
r78620 r79403 597 597 } 598 598 599 static bool isDumpAsTextTest(const QUrl& url) 600 { 601 if (url.path().contains("dumpAsText/")) 602 return true; 603 return false; 604 } 605 606 599 607 void DumpRenderTree::open(const QUrl& url) 600 608 { … … 607 615 if (isWebInspectorTest(url)) 608 616 layoutTestController()->showWebInspector(); 617 618 if (isDumpAsTextTest(url)) { 619 layoutTestController()->dumpAsText(); 620 setDumpPixels(false); 621 } 609 622 610 623 if (isGlobalHistoryTest(url)) -
trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp
r78620 r79403 764 764 } 765 765 766 static bool shouldDumpAsText(const char* pathOrURL) 767 { 768 return strstr(pathOrURL, "/dumpAsText/") || strstr(pathOrURL, "\\dumpAsText\\"); 769 } 770 766 771 static bool shouldEnableDeveloperExtras(const char* pathOrURL) 767 772 { … … 959 964 gLayoutTestController->showWebInspector(); 960 965 } 966 if (shouldDumpAsText(pathOrURL.c_str())) { 967 gLayoutTestController->setDumpAsText(true); 968 gLayoutTestController->setGeneratePixelResults(false); 969 } 961 970 962 971 prevTestBFItem = 0; -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r77908 r79403 494 494 InjectedBundle::shared().layoutTestController()->invalidateWaitToDumpWatchdogTimer(); 495 495 496 WKBundleFrameRef frame = WKBundlePageGetMainFrame(m_page); 497 string url = toSTD(adoptWK(WKURLCopyString(adoptWK(WKBundleFrameCopyURL(frame)).get()))); 498 if (strstr(url.c_str(), "dumpAsText/")) 499 InjectedBundle::shared().layoutTestController()->dumpAsText(); 500 496 501 switch (InjectedBundle::shared().layoutTestController()->whatToDump()) { 497 502 case LayoutTestController::RenderTree: {
Note: See TracChangeset
for help on using the changeset viewer.