Changeset 29822 in webkit
- Timestamp:
- Jan 27, 2008 12:00:29 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r29820 r29822 1 2008-01-27 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Darin Adler. 4 5 - make some CSS2.1 tests pass on Windows by using @font-face to force 6 font fallback to match Mac OS X. 7 8 * platform/win/Skipped: 9 * platform/win/css2.1: Added. 10 * platform/win/css2.1/resources: Added. 11 * platform/win/css2.1/resources/Mac-compatible-font-fallback.css: Added. 12 * platform/win/css2.1/resources/run-webkit-tests-epilogue.html: Added. 13 * platform/win/css2.1/resources/run-webkit-tests-prologue.html: Added. 14 1 15 2008-01-27 Darin Adler <darin@apple.com> 2 16 -
trunk/LayoutTests/platform/win/Skipped
r29796 r29822 47 47 48 48 # Layout tests that depend on certain fonts don't match Mac results <rdar://problem/5075790> 49 css2.1/t0905-c5525-fltblck-00-d-ag.html50 49 css2.1/t1202-counter-09-b.html 51 50 css2.1/t1202-counters-09-b.html … … 76 75 77 76 # No advanced text <rdar://problems/4516194> 78 css2.1/t0805-c5518-brdr-t-01-e.html79 css2.1/t0805-c5519-brdr-r-00-a.html80 css2.1/t0805-c5519-brdr-r-01-e.html81 css2.1/t0805-c5520-brdr-b-01-e.html82 css2.1/t0805-c5521-brdr-l-00-a.html83 css2.1/t0805-c5521-brdr-l-01-e.html84 css2.1/t0805-c5521-ibrdr-l-00-a.html85 css2.1/t0905-c414-flt-02-c.html86 css2.1/t0905-c414-flt-03-c.html87 css2.1/t0905-c414-flt-04-c.html88 css2.1/t0905-c414-flt-fit-01-d-g.html89 css2.1/t0905-c5525-fltblck-01-d.html90 css2.1/t0905-c5525-fltcont-00-d-g.html91 css2.1/t0905-c5525-fltwidth-00-c-g.html92 css2.1/t0905-c5525-fltwidth-02-c-g.html93 css2.1/t0905-c5525-fltwidth-03-c-g.html94 css2.1/t0905-c5525-fltwrap-00-b.html95 css2.1/t1202-counter-03-b.html96 css2.1/t1202-counter-04-b.html97 css2.1/t1202-counters-03-b.html98 css2.1/t1202-counters-04-b.html99 css2.1/t1205-c566-list-stl-01-c-g.html100 css2.1/t090501-c414-flt-01-b.html101 css2.1/t090501-c414-flt-03-b-g.html102 css2.1/t090501-c414-flt-ln-01-d-g.html103 css2.1/t090501-c5525-flt-l-00-b-g.html104 css2.1/t090501-c5525-flt-r-00-b-g.html105 css2.1/t100304-c43-rpl-bbx-01-d-g.html106 77 fast/text/atsui-multiple-renderers.html 107 78 fast/text/atsui-pointtooffset-calls-cg.html -
trunk/WebKitTools/ChangeLog
r29790 r29822 1 2008-01-27 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Darin Adler. 4 5 - add support for directory prologues and epilogues to run-webkit-tests 6 - allow setting a persistent user style sheet in DumpRenderTree 7 - activate the WebKit Layout Tests font in Windows DumpRenderTree 8 9 * DumpRenderTree/LayoutTestController.cpp: 10 (clearPersistentUserStyleSheetCallback): Added. 11 (setPersistentUserStyleSheetLocationCallback): Added. 12 (LayoutTestController::staticFunctions): Added. 13 clearPersistentUserStyleSheet and setPersistentUserStyleSheet. 14 * DumpRenderTree/LayoutTestController.h: 15 * DumpRenderTree/mac/DumpRenderTree.mm: 16 (setPersistentUserStyleSheetLocation): Added. 17 (resetWebViewToConsistentStateBeforeTesting): Added the user style sheet 18 to the set of things this function resets. Now it either disables the 19 user style sheet or sets it to the persistent user style sheet and 20 enables it. 21 * DumpRenderTree/mac/DumpRenderTreeMac.h: 22 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 23 (LayoutTestController::setPersistentUserStyleSheetLocation): Added. 24 (LayoutTestController::clearPersistentUserStyleSheet): Added. 25 * DumpRenderTree/win/DumpRenderTree.cpp: 26 (setPersistentUserStyleSheetLocation): Added. 27 (initialize): Added the WebKit Layout Tests font to the set of fonts to 28 install. 29 (resetWebViewToConsistentStateBeforeTesting): See DumpRenderTree.mm. 30 * DumpRenderTree/win/DumpRenderTreeWin.h: 31 * DumpRenderTree/win/LayoutTestControllerWin.cpp: 32 (LayoutTestController::setPersistentUserStyleSheetLocation): Added. 33 (LayoutTestController::clearPersistentUserStyleSheet): Added. 34 * Scripts/run-webkit-tests: Changed to look for, and if found process in 35 DumpRenderTree, files named run-webkit-tests-prologue.html and 36 run-webkit-tests-epilogue.html in the resources subdirectory of any 37 test directory and platform test results directory. The prologues are 38 processed before the first test from the directory (and its 39 subdirectories) is run, and the epilogues are processed after the last 40 test from the directory is run. Platform-specific prologues and 41 epilogues are processed in order of specificity. 42 1 43 2008-01-25 Alexey Proskuryakov <ap@webkit.org> 2 44 -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp
r29663 r29822 225 225 } 226 226 227 static JSValueRef clearPersistentUserStyleSheetCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 228 { 229 // Has mac & windows implementation 230 LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 231 controller->clearPersistentUserStyleSheet(); 232 233 return JSValueMakeUndefined(context); 234 } 235 227 236 static JSValueRef decodeHostNameCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 228 237 { … … 432 441 LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 433 442 controller->setMainFrameIsFirstResponder(JSValueToBoolean(context, arguments[0])); 443 444 return JSValueMakeUndefined(context); 445 } 446 447 static JSValueRef setPersistentUserStyleSheetLocationCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 448 { 449 // Has mac implementation 450 if (argumentCount < 1) 451 return JSValueMakeUndefined(context); 452 453 JSRetainPtr<JSStringRef> path(Adopt, JSValueToStringCopy(context, arguments[0], exception)); 454 ASSERT(!*exception); 455 456 LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 457 controller->setPersistentUserStyleSheetLocation(path.get()); 434 458 435 459 return JSValueMakeUndefined(context); … … 599 623 { "addFileToPasteboardOnDrag", addFileToPasteboardOnDragCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 600 624 { "clearBackForwardList", clearBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 625 { "clearPersistentUserStyleSheet", clearPersistentUserStyleSheetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 601 626 { "decodeHostName", decodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 602 627 { "display", displayCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, … … 630 655 { "setCustomPolicyDelegate", setCustomPolicyDelegateCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 631 656 { "setMainFrameIsFirstResponder", setMainFrameIsFirstResponderCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 657 { "setPersistentUserStyleSheetLocation", setPersistentUserStyleSheetLocationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 632 658 { "setPrivateBrowsingEnabled", setPrivateBrowsingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 633 659 { "setPopupBlockingEnabled", setPopupBlockingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.h
r29663 r29822 64 64 void setUserStyleSheetEnabled(bool flag); 65 65 void setUserStyleSheetLocation(JSStringRef path); 66 void setPersistentUserStyleSheetLocation(JSStringRef path); 67 void clearPersistentUserStyleSheet(); 66 68 int windowCount(); 67 69 -
trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
r29380 r29822 69 69 #import <objc/objc-runtime.h> 70 70 #import <wtf/Assertions.h> 71 #import <wtf/RetainPtr.h> 71 72 72 73 @interface DumpRenderTreeEvent : NSEvent … … 113 114 static BOOL printSeparators; 114 115 static NSString *currentTest = nil; 116 static RetainPtr<CFStringRef> persistentUserStyleSheetLocation; 115 117 116 118 static WebHistoryItem *prevTestBFItem = nil; // current b/f item at the end of the previous test … … 119 121 const unsigned maxViewWidth = 800; 120 122 123 void setPersistentUserStyleSheetLocation(CFStringRef url) 124 { 125 persistentUserStyleSheetLocation = url; 126 } 121 127 122 128 static BOOL shouldIgnoreWebCoreNodeLeaks(CFStringRef URLString) … … 804 810 [preferences setJavaScriptCanOpenWindowsAutomatically:YES]; 805 811 812 if (persistentUserStyleSheetLocation) { 813 [preferences setUserStyleSheetLocation:[NSURL URLWithString:(NSString *)(persistentUserStyleSheetLocation.get())]]; 814 [preferences setUserStyleSheetEnabled:YES]; 815 } else 816 [preferences setUserStyleSheetEnabled:NO]; 817 806 818 [WebView _setUsesTestModeFocusRingColor:YES]; 807 819 } -
trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h
r29663 r29822 39 39 @class WebView; 40 40 41 typedef const struct __CFString* CFStringRef; 42 41 43 extern CFMutableArrayRef openWindowsRef; 42 44 extern CFMutableSetRef disallowedURLs; … … 51 53 52 54 WebView* createWebViewAndOffscreenWindow(); 55 void setPersistentUserStyleSheetLocation(CFStringRef); 53 56 54 57 #endif // DumpRenderTreeMac_h -
trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r29663 r29822 214 214 } 215 215 216 void LayoutTestController::setPersistentUserStyleSheetLocation(JSStringRef jsURL) 217 { 218 RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL)); 219 ::setPersistentUserStyleSheetLocation(urlString.get()); 220 } 221 222 void LayoutTestController::clearPersistentUserStyleSheet() 223 { 224 ::setPersistentUserStyleSheetLocation(0); 225 } 226 216 227 void LayoutTestController::setWindowIsKey(bool windowIsKey) 217 228 { -
trunk/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
r29790 r29822 38 38 #include "WorkQueueItem.h" 39 39 #include "WorkQueue.h" 40 #include <wtf/RetainPtr.h> 40 41 #include <wtf/Vector.h> 41 42 #include <WebCore/COMPtr.h> … … 81 82 static bool timedOut = false; 82 83 static bool threaded = false; 84 static RetainPtr<CFStringRef> persistentUserStyleSheetLocation; 83 85 84 86 static const char* currentTest; … … 108 110 const unsigned maxViewWidth = 800; 109 111 const unsigned maxViewHeight = 600; 112 113 void setPersistentUserStyleSheetLocation(CFStringRef url) 114 { 115 persistentUserStyleSheetLocation = url; 116 } 110 117 111 118 wstring urlSuitableForTestResult(const wstring& url) … … 223 230 TEXT("Times Bold.ttf"), 224 231 TEXT("Times Italic.ttf"), 225 TEXT("Times Roman.ttf") 232 TEXT("Times Roman.ttf"), 233 TEXT("WebKit Layout Tests.ttf") 226 234 }; 227 235 … … 635 643 preferences->setPrivateBrowsingEnabled(FALSE); 636 644 preferences->setJavaScriptCanOpenWindowsAutomatically(TRUE); 645 646 if (persistentUserStyleSheetLocation) { 647 Vector<wchar_t> urlCharacters(CFStringGetLength(persistentUserStyleSheetLocation.get())); 648 CFStringGetCharacters(persistentUserStyleSheetLocation.get(), CFRangeMake(0, CFStringGetLength(persistentUserStyleSheetLocation.get())), (UniChar *)urlCharacters.data()); 649 BSTR url = SysAllocStringLen(urlCharacters.data(), urlCharacters.size()); 650 preferences->setUserStyleSheetLocation(url); 651 SysFreeString(url); 652 preferences->setUserStyleSheetEnabled(TRUE); 653 } else 654 preferences->setUserStyleSheetEnabled(FALSE); 655 637 656 COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences); 638 657 if (prefsPrivate) -
trunk/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
r29450 r29822 52 52 struct IWebPolicyDelegate; 53 53 struct IWebView; 54 typedef const struct __CFString* CFStringRef; 54 55 typedef struct HWND__* HWND; 55 56 … … 69 70 HashMap<HWND, IWebView*>& windowToWebViewMap(); 70 71 72 void setPersistentUserStyleSheetLocation(CFStringRef); 73 71 74 #endif // DumpRenderTreeWin_h -
trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
r29495 r29822 482 482 } 483 483 484 void LayoutTestController::setPersistentUserStyleSheetLocation(JSStringRef jsURL) 485 { 486 RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL)); 487 ::setPersistentUserStyleSheetLocation(urlString.get()); 488 } 489 490 void LayoutTestController::clearPersistentUserStyleSheet() 491 { 492 ::setPersistentUserStyleSheetLocation(0); 493 } 494 484 495 void LayoutTestController::setWindowIsKey(bool flag) 485 496 { -
trunk/WebKitTools/Scripts/run-webkit-tests
r29674 r29822 91 91 sub recordActualResultsAndDiff($$); 92 92 sub buildPlatformHierarchy(); 93 sub epiloguesAndPrologues($$); 93 94 94 95 # Argument handling … … 467 468 next if $test eq 'results.html'; 468 469 470 my $newDumpTool = not $isDumpToolOpen; 469 471 openDumpTool(); 470 472 471 473 my $base = stripExtension($test); 472 474 475 my $dir = $base; 476 $dir =~ s|/[^/]+$||; 477 478 if ($newDumpTool || $dir ne $lastDirectory) { 479 foreach my $logue (epiloguesAndPrologues($newDumpTool ? "" : $lastDirectory, $dir)) { 480 if (isCygwin()) { 481 $logue = toWindowsPath($logue); 482 } else { 483 $logue = canonpath($logue); 484 } 485 if ($verbose) { 486 print "running epilogue or prologue $logue\n"; 487 } 488 print OUT "$logue\n"; 489 # Discard the output. 490 while (<IN>) { 491 last if /#EOF/; 492 } 493 } 494 } 495 473 496 if ($verbose) { 474 497 print "running $test -> "; 475 498 $atLineStart = 0; 476 499 } elsif (!$quiet) { 477 my $dir = $base;478 $dir =~ s|/[^/]+$||;479 500 if ($dir ne $lastDirectory) { 480 501 print "\n" unless $atLineStart; 481 502 print "$dir "; 482 $lastDirectory = $dir;483 503 } 484 504 print "."; 485 505 $atLineStart = 0; 486 506 } 507 508 $lastDirectory = $dir; 487 509 488 510 my $result; … … 1526 1548 return @hierarchy; 1527 1549 } 1550 1551 sub epiloguesAndPrologues($$) { 1552 my ($lastDirectory, $directory) = @_; 1553 my @lastComponents = split('/', $lastDirectory); 1554 my @components = split('/', $directory); 1555 1556 while (@lastComponents) { 1557 if ($lastComponents[0] ne $components[0]) { 1558 last; 1559 } 1560 shift @components; 1561 shift @lastComponents; 1562 } 1563 1564 my @result; 1565 my $leaving = $lastDirectory; 1566 foreach (@lastComponents) { 1567 my $epilogue = $leaving . "/resources/run-webkit-tests-epilogue.html"; 1568 foreach (@platformHierarchy) { 1569 push @result, catdir($_, $epilogue) if (stat(catdir($_, $epilogue))); 1570 } 1571 push @result, catdir($testDirectory, $epilogue) if (stat(catdir($testDirectory, $epilogue))); 1572 $leaving =~ s|(^\|/)[^/]+$||; 1573 } 1574 1575 my $entering = $leaving; 1576 foreach (@components) { 1577 $entering .= '/' . $_; 1578 my $prologue = $entering . "/resources/run-webkit-tests-prologue.html"; 1579 push @result, catdir($testDirectory, $prologue) if (stat(catdir($testDirectory, $prologue))); 1580 foreach (reverse @platformHierarchy) { 1581 push @result, catdir($_, $prologue) if (stat(catdir($_, $prologue))); 1582 } 1583 } 1584 return @result; 1585 }
Note: See TracChangeset
for help on using the changeset viewer.