Changeset 80061 in webkit
- Timestamp:
- Mar 1, 2011 4:21:37 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r80060 r80061 335 335 * platform/gtk/fast/block/positioning/auto/vertical-lr/: 7 tests. 336 336 * platform/gtk/fast/block/positioning/auto/vertical-rl/: 7 tests. 337 338 2011-02-23 Joseph Pecoraro <joepeck@webkit.org> 339 340 Reviewed by Timothy Hatcher. 341 342 All Console Messages should be passed to ChromeClients. 343 https://bugs.webkit.org/show_bug.cgi?id=54926 344 345 Passing more message types to the ChromeClient allows 346 some more messages to get output during tests. Specifically 347 HTML, XML, and Other message types. 348 349 * inspector/audits/audits-panel-functional.html: correct a legitimate HTML parse error. 350 * http/tests/security/cross-origin-xsl-BLOCKED-expected.txt: 351 * http/tests/security/mixedContent/insecure-css-in-main-frame-expected.txt: 352 * http/tests/security/mixedContent/insecure-iframe-in-main-frame-expected.txt: 353 * http/tests/security/mixedContent/insecure-image-in-main-frame-expected.txt: 354 * http/tests/security/mixedContent/insecure-plugin-in-iframe-expected.txt: 355 * http/tests/security/mixedContent/insecure-script-in-iframe-expected.txt: 356 * http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame-expected.txt: 357 * http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt: 358 * http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame-expected.txt: 359 * http/tests/security/xss-DENIED-xml-external-entity-expected.txt: 360 * http/tests/security/xss-DENIED-xsl-document-expected.txt: 361 * http/tests/security/xss-DENIED-xsl-external-entity-expected.txt: 362 * platform/mac/fast/xsl/xslt-mismatched-tags-in-xslt-expected.txt: 363 * platform/mac/fast/xsl/xslt-missing-namespace-in-xslt-expected.txt: 364 * platform/mac/http/tests/inspector/console-websocket-error-expected.txt: 337 365 338 366 2011-02-23 Joseph Pecoraro <joepeck@webkit.org> -
trunk/LayoutTests/http/tests/security/cross-origin-xsl-BLOCKED-expected.txt
r34719 r80061 1 CONSOLE MESSAGE: line 1: Unsafe attempt to load URL http://localhost:8000/security/resources/forbidden-stylesheet.xsl from frame with URL http://127.0.0.1:8000/security/resources/cross-origin-xsl.xml. Domains, protocols and ports must match. 2 1 3 This test loads the XML document in an iframe so that it can call dumpAsText(). This test passes if the iframe below is blank. 2 4 -
trunk/LayoutTests/http/tests/security/mixedContent/insecure-css-in-main-frame-expected.txt
r74995 r80061 4 4 main frame - didFinishLoadForFrame 5 5 main frame - didCommitLoadForFrame 6 CONSOLE MESSAGE: line 1: The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-css.html displayed insecure content from http://127.0.0.1:8080/security/mixedContent/resources/style.css%22. 7 6 8 didDisplayInsecureContent 7 9 main frame - didFinishDocumentLoadForFrame -
trunk/LayoutTests/http/tests/security/mixedContent/insecure-iframe-in-main-frame-expected.txt
r48284 r80061 5 5 main frame - didCommitLoadForFrame 6 6 frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame 7 CONSOLE MESSAGE: line 1: The page at about:blank displayed insecure content from http://127.0.0.1:8080/security/mixedContent/resources/boring.html. 8 7 9 didDisplayInsecureContent 8 10 main frame - didFinishDocumentLoadForFrame -
trunk/LayoutTests/http/tests/security/mixedContent/insecure-image-in-main-frame-expected.txt
r48284 r80061 4 4 main frame - didFinishLoadForFrame 5 5 main frame - didCommitLoadForFrame 6 CONSOLE MESSAGE: line 1: The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-image.html displayed insecure content from http://127.0.0.1:8080/security/resources/compass.jpg. 7 6 8 didDisplayInsecureContent 7 9 main frame - didFinishDocumentLoadForFrame -
trunk/LayoutTests/http/tests/security/mixedContent/insecure-plugin-in-iframe-expected.txt
r49700 r80061 5 5 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame 6 6 main frame - didHandleOnloadEventsForFrame 7 CONSOLE MESSAGE: line 1: The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-plugin.html ran insecure content from http://127.0.0.1:8000/security/mixedContent/resources/dummy.swf. 8 7 9 didRunInsecureContent 8 10 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame -
trunk/LayoutTests/http/tests/security/mixedContent/insecure-script-in-iframe-expected.txt
r48284 r80061 2 2 main frame - didFinishDocumentLoadForFrame 3 3 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame 4 CONSOLE MESSAGE: line 1: The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-script.html ran insecure content from http://127.0.0.1:8080/security/mixedContent/resources/script.js. 5 4 6 didRunInsecureContent 5 7 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame -
trunk/LayoutTests/http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame-expected.txt
r48284 r80061 5 5 main frame - didCommitLoadForFrame 6 6 frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame 7 CONSOLE MESSAGE: line 1: The page at about:blank displayed insecure content from http://127.0.0.1:8080/security/resources/redir.php?url=https://127.0.0.1:8443/security/mixedContent/resources/boring.html. 8 7 9 didDisplayInsecureContent 8 10 main frame - didFinishDocumentLoadForFrame -
trunk/LayoutTests/http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt
r48284 r80061 2 2 main frame - didFinishDocumentLoadForFrame 3 3 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame 4 CONSOLE MESSAGE: line 1: The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-redirect-http-to-https-script.html ran insecure content from http://127.0.0.1:8080/security/resources/redir.php?url=https://127.0.0.1:8443/security/mixedContent/resources/script.js. 5 4 6 didRunInsecureContent 5 7 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame -
trunk/LayoutTests/http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame-expected.txt
r48284 r80061 5 5 main frame - didCommitLoadForFrame 6 6 frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame 7 CONSOLE MESSAGE: line 1: The page at about:blank displayed insecure content from http://127.0.0.1:8080/security/resources/redir.php?url=https://127.0.0.1:8443/security/mixedContent/resources/boring.html. 8 7 9 didDisplayInsecureContent 8 10 main frame - didFinishDocumentLoadForFrame -
trunk/LayoutTests/http/tests/security/xss-DENIED-xml-external-entity-expected.txt
r42738 r80061 1 CONSOLE MESSAGE: line 1: Unsafe attempt to load URL http://localhost:8000/security/resources/target.xml from frame with URL http://127.0.0.1:8000/security/xss-DENIED-xml-external-entity.xhtml. Domains, protocols and ports must match. 2 1 3 This test includes a cross-origin external entity. It passes if the load fails and thus there is no text below this line. 2 4 -
trunk/LayoutTests/http/tests/security/xss-DENIED-xsl-document-expected.txt
r34533 r80061 1 CONSOLE MESSAGE: line 1: Unsafe attempt to load URL http://localhost:8000/security/resources/target.xml from frame with URL http://127.0.0.1:8000/security/xss-DENIED-xsl-document.xml. Domains, protocols and ports must match. 2 1 3 This test includes content via a cross-origin document() command. It passes if the load fails and thus there is no text below this line. -
trunk/LayoutTests/http/tests/security/xss-DENIED-xsl-external-entity-expected.txt
r34534 r80061 1 CONSOLE MESSAGE: line 1: Unsafe attempt to load URL http://localhost:8000/security/resources/target.xml from frame with URL http://127.0.0.1:8000/security/xss-DENIED-xsl-external-entity.xml. Domains, protocols and ports must match. 2 3 CONSOLE MESSAGE: line 1: Unsafe attempt to load URL http://localhost:8000/security/resources/target.xml from frame with URL http://127.0.0.1:8000/security/xss-DENIED-xsl-external-entity.xml. Domains, protocols and ports must match. 4 1 5 This test includes a cross-origin external entity. It passes if the load fails and thus there is no text below this line. 2 6 -
trunk/LayoutTests/inspector/audits/audits-panel-functional.html
r79218 r80061 40 40 } 41 41 </script> 42 </script>43 42 </head> 44 43 -
trunk/LayoutTests/platform/mac/fast/xsl/xslt-mismatched-tags-in-xslt-expected.txt
r25970 r80061 1 CONSOLE MESSAGE: line 9: Opening and ending tag mismatch: p line 8 and body 2 3 CONSOLE MESSAGE: line 10: Opening and ending tag mismatch: body line 6 and html 4 5 CONSOLE MESSAGE: line 11: Opening and ending tag mismatch: html line 5 and xsl:template 6 7 CONSOLE MESSAGE: line 12: Opening and ending tag mismatch: template line 4 and stylesheet 8 9 CONSOLE MESSAGE: line 12: Premature end of data in tag stylesheet line 2 10 1 11 layer at (0,0) size 800x600 2 12 RenderView at (0,0) size 800x600 -
trunk/LayoutTests/platform/mac/fast/xsl/xslt-missing-namespace-in-xslt-expected.txt
r25970 r80061 1 CONSOLE MESSAGE: line 8: Namespace prefix foo on bar is not defined 2 1 3 layer at (0,0) size 800x600 2 4 RenderView at (0,0) size 800x600 -
trunk/LayoutTests/platform/mac/http/tests/inspector/console-websocket-error-expected.txt
r78463 r80061 1 1 CONSOLE MESSAGE: line 32: testDNSLookup: Test started. 2 CONSOLE MESSAGE: line 0: WebSocket network error: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.) 2 3 CONSOLE MESSAGE: line 43: testDNSLookup: onclose is called. 3 4 CONSOLE MESSAGE: line 50: testSSLCertificate: Test started. 5 CONSOLE MESSAGE: line 0: WebSocket network error: OSStatus Error -9812: valid cert chain, untrusted root 4 6 CONSOLE MESSAGE: line 64: testSSLCertificate: onclose is called. 5 7 WebSocket's network errors should be logged to console. -
trunk/Source/WebCore/ChangeLog
r80060 r80061 743 743 744 744 2011-03-01 Joseph Pecoraro <joepeck@webkit.org> 745 746 Reviewed by Timothy Hatcher. 747 748 All Console Messages should be passed to ChromeClients. 749 https://bugs.webkit.org/show_bug.cgi?id=54926 750 751 Do not filter the message type here, allow clients 752 to filter and deal with the different message types. 753 754 * page/Console.cpp: 755 (WebCore::Console::addMessage): 756 757 2011-02-23 Joseph Pecoraro <joepeck@webkit.org> 745 758 746 759 Reviewed by Kenneth Rohde Christiansen. -
trunk/Source/WebCore/page/Console.cpp
r76493 r80061 144 144 return; 145 145 146 if (source == JSMessageSource) 147 page->chrome()->client()->addMessageToConsole(source, type, level, message, lineNumber, sourceURL); 146 page->chrome()->client()->addMessageToConsole(source, type, level, message, lineNumber, sourceURL); 148 147 149 148 if (callStack) -
trunk/Source/WebKit/mac/ChangeLog
r80059 r80061 1 2011-02-23 Joseph Pecoraro <joepeck@webkit.org> 2 3 Reviewed by Timothy Hatcher. 4 5 All Console Messages should be passed to ChromeClients. 6 https://bugs.webkit.org/show_bug.cgi?id=54926 7 8 Add a new private UIDelegate method, -webView:addMessageToConsole:withSource:, 9 which supersedes -webView:addMessageToConsole if it exists. The new delegate 10 does not filter to only JavaScript originated console messages. The old 11 delegate is left around for clients that expect filtered messages, like 12 DashCode and older versions of Safari. 13 14 The dictionary message passed to the delegate now includes more information 15 about the message source, type, and level. 16 17 * WebCoreSupport/WebChromeClient.mm: 18 (stringForMessageSource): 19 (stringForMessageType): 20 (stringForMessageLevel): 21 (WebChromeClient::addMessageToConsole): 22 * WebView/WebUIDelegatePrivate.h: 23 1 24 2011-03-01 Levi Weintraub <leviw@chromium.org> 2 25 -
trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
r76983 r80061 80 80 #import "NetscapePluginHostManager.h" 81 81 #endif 82 83 NSString *WebConsoleMessageHTMLMessageSource = @"HTMLMessageSource"; 84 NSString *WebConsoleMessageWMLMessageSource = @"WMLMessageSource"; 85 NSString *WebConsoleMessageXMLMessageSource = @"XMLMessageSource"; 86 NSString *WebConsoleMessageJSMessageSource = @"JSMessageSource"; 87 NSString *WebConsoleMessageCSSMessageSource = @"CSSMessageSource"; 88 NSString *WebConsoleMessageOtherMessageSource = @"OtherMessageSource"; 89 90 NSString *WebConsoleMessageLogMessageType = @"LogMessageType"; 91 NSString *WebConsoleMessageObjectMessageType = @"ObjectMessageType"; 92 NSString *WebConsoleMessageTraceMessageType = @"TraceMessageType"; 93 NSString *WebConsoleMessageStartGroupMessageType = @"StartGroupMessageType"; 94 NSString *WebConsoleMessageStartGroupCollapsedMessageType = @"StartGroupCollapsedMessageType"; 95 NSString *WebConsoleMessageEndGroupMessageType = @"EndGroupMessageType"; 96 NSString *WebConsoleMessageAssertMessageType = @"AssertMessageType"; 97 NSString *WebConsoleMessageUncaughtExceptionMessageType = @"UncaughtExceptionMessageType"; 98 NSString *WebConsoleMessageNetworkErrorMessageType = @"NetworkErrorMessageType"; 99 100 NSString *WebConsoleMessageTipMessageLevel = @"TipMessageLevel"; 101 NSString *WebConsoleMessageLogMessageLevel = @"LogMessageLevel"; 102 NSString *WebConsoleMessageWarningMessageLevel = @"WarningMessageLevel"; 103 NSString *WebConsoleMessageErrorMessageLevel = @"ErrorMessageLevel"; 104 NSString *WebConsoleMessageDebugMessageLevel = @"DebugMessageLevel"; 82 105 83 106 @interface NSApplication (WebNSApplicationDetails) … … 329 352 } 330 353 354 inline static NSString *stringForMessageSource(MessageSource source) 355 { 356 switch (source) { 357 case HTMLMessageSource: 358 return WebConsoleMessageHTMLMessageSource; 359 case WMLMessageSource: 360 return WebConsoleMessageWMLMessageSource; 361 case XMLMessageSource: 362 return WebConsoleMessageXMLMessageSource; 363 case JSMessageSource: 364 return WebConsoleMessageJSMessageSource; 365 case CSSMessageSource: 366 return WebConsoleMessageCSSMessageSource; 367 case OtherMessageSource: 368 return WebConsoleMessageOtherMessageSource; 369 } 370 ASSERT_NOT_REACHED(); 371 return @""; 372 } 373 374 inline static NSString *stringForMessageType(MessageType type) 375 { 376 switch (type) { 377 case LogMessageType: 378 return WebConsoleMessageLogMessageType; 379 case ObjectMessageType: 380 return WebConsoleMessageObjectMessageType; 381 case TraceMessageType: 382 return WebConsoleMessageTraceMessageType; 383 case StartGroupMessageType: 384 return WebConsoleMessageStartGroupMessageType; 385 case StartGroupCollapsedMessageType: 386 return WebConsoleMessageStartGroupCollapsedMessageType; 387 case EndGroupMessageType: 388 return WebConsoleMessageEndGroupMessageType; 389 case AssertMessageType: 390 return WebConsoleMessageAssertMessageType; 391 case UncaughtExceptionMessageType: 392 return WebConsoleMessageUncaughtExceptionMessageType; 393 case NetworkErrorMessageType: 394 return WebConsoleMessageNetworkErrorMessageType; 395 } 396 ASSERT_NOT_REACHED(); 397 return @""; 398 } 399 400 inline static NSString *stringForMessageLevel(MessageLevel level) 401 { 402 switch (level) { 403 case TipMessageLevel: 404 return WebConsoleMessageTipMessageLevel; 405 case LogMessageLevel: 406 return WebConsoleMessageLogMessageLevel; 407 case WarningMessageLevel: 408 return WebConsoleMessageWarningMessageLevel; 409 case ErrorMessageLevel: 410 return WebConsoleMessageErrorMessageLevel; 411 case DebugMessageLevel: 412 return WebConsoleMessageDebugMessageLevel; 413 } 414 ASSERT_NOT_REACHED(); 415 return @""; 416 } 417 331 418 void WebChromeClient::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned int lineNumber, const String& sourceURL) 332 419 { 333 420 id delegate = [m_webView UIDelegate]; 334 SEL selector = @selector(webView:addMessageToConsole:); 335 if (![delegate respondsToSelector:selector]) 336 return; 337 421 BOOL respondsToNewSelector = NO; 422 423 SEL selector = @selector(webView:addMessageToConsole:withSource:); 424 if ([delegate respondsToSelector:selector]) 425 respondsToNewSelector = YES; 426 else { 427 // The old selector only takes JSMessageSource messages. 428 if (source != JSMessageSource) 429 return; 430 selector = @selector(webView:addMessageToConsole:); 431 if (![delegate respondsToSelector:selector]) 432 return; 433 } 434 435 NSString *messageSource = stringForMessageSource(source); 338 436 NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: 339 (NSString *)message, @"message", [NSNumber numberWithUnsignedInt:lineNumber], @"lineNumber", 340 (NSString *)sourceURL, @"sourceURL", NULL]; 341 342 CallUIDelegate(m_webView, selector, dictionary); 437 (NSString *)message, @"message", 438 [NSNumber numberWithUnsignedInt:lineNumber], @"lineNumber", 439 (NSString *)sourceURL, @"sourceURL", 440 messageSource, @"MessageSource", 441 stringForMessageType(type), @"MessageType", 442 stringForMessageLevel(level), @"MessageLevel", 443 NULL]; 444 445 if (respondsToNewSelector) 446 CallUIDelegate(m_webView, selector, dictionary, messageSource); 447 else 448 CallUIDelegate(m_webView, selector, dictionary); 343 449 344 450 [dictionary release]; -
trunk/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h
r69600 r80061 93 93 }; 94 94 95 // Message Sources. 96 extern NSString *WebConsoleMessageHTMLMessageSource; 97 extern NSString *WebConsoleMessageWMLMessageSource; 98 extern NSString *WebConsoleMessageXMLMessageSource; 99 extern NSString *WebConsoleMessageJSMessageSource; 100 extern NSString *WebConsoleMessageCSSMessageSource; 101 extern NSString *WebConsoleMessageOtherMessageSource; 102 103 // Message Types. 104 extern NSString *WebConsoleMessageLogMessageType; 105 extern NSString *WebConsoleMessageObjectMessageType; 106 extern NSString *WebConsoleMessageTraceMessageType; 107 extern NSString *WebConsoleMessageStartGroupMessageType; 108 extern NSString *WebConsoleMessageStartGroupCollapsedMessageType; 109 extern NSString *WebConsoleMessageEndGroupMessageType; 110 extern NSString *WebConsoleMessageAssertMessageType; 111 extern NSString *WebConsoleMessageUncaughtExceptionMessageType; 112 extern NSString *WebConsoleMessageNetworkErrorMessageType; 113 114 // Message Levels. 115 extern NSString *WebConsoleMessageTipMessageLevel; 116 extern NSString *WebConsoleMessageLogMessageLevel; 117 extern NSString *WebConsoleMessageWarningMessageLevel; 118 extern NSString *WebConsoleMessageErrorMessageLevel; 119 extern NSString *WebConsoleMessageDebugMessageLevel; 120 95 121 @class WebSecurityOrigin; 96 122 … … 112 138 113 139 - (void)webView:(WebView *)webView addMessageToConsole:(NSDictionary *)message; 140 141 /*! 142 @method webView:addMessageToConsole:withSource: 143 @param webView The WebView sending the delegate method. 144 @param message A dictionary representation of the console message. 145 @param source Where the message came from. See WebConsoleMessageHTMLMessageSource and other source types. 146 @discussion The dictionary contains the following keys: 147 148 <dl> 149 <dt>message</dt> 150 <dd>The message itself.</dd> 151 <dt>lineNumber</dt> 152 <dd>If this came from a file, this is the line number in the file this message originates from.</dd> 153 <dt>sourceURL</dt> 154 <dd>If this came from a file, this is the URL to the file this message originates from.</dd> 155 <dt>MessageSource</dt> 156 <dd> 157 Where the message came from. HTML, XML, JavaScript, CSS, etc. 158 See WebConsoleMessageHTMLMessageSource and similar constants. 159 </dd> 160 <dt>MessageType</dt> 161 <dd> 162 Class of message. Start / End of a Group, a Log, Network related, etc. 163 See WebConsoleMessageLogMessageType and similar constants. 164 </dd> 165 <dt>MessageLevel</dt> 166 <dd> 167 Severity level of the message. Tip, Log, Warning, etc. 168 See WebConsoleMessageTipMessageLevel and similar constants. 169 </dd> 170 </dl> 171 */ 172 - (void)webView:(WebView *)webView addMessageToConsole:(NSDictionary *)message withSource:(NSString *)source; 114 173 115 174 - (NSView *)webView:(WebView *)webView plugInViewWithArguments:(NSDictionary *)arguments; -
trunk/Tools/ChangeLog
r80057 r80061 1 2011-02-23 Joseph Pecoraro <joepeck@webkit.org> 2 3 Reviewed by Timothy Hatcher. 4 5 All Console Messages should be passed to ChromeClients. 6 https://bugs.webkit.org/show_bug.cgi?id=54926 7 8 Update DumpRenderTree's UIDelegate to use the new console message delegate. 9 10 * DumpRenderTree/mac/UIDelegate.mm: 11 (-[UIDelegate webView:addMessageToConsole:withSource:]): 12 1 13 2011-03-01 Dirk Pranke <dpranke@chromium.org> 2 14 -
trunk/Tools/DumpRenderTree/mac/UIDelegate.mm
r66251 r80061 58 58 } 59 59 60 - (void)webView:(WebView *)sender addMessageToConsole:(NSDictionary *)dictionary 60 - (void)webView:(WebView *)sender addMessageToConsole:(NSDictionary *)dictionary withSource:(NSString *)source 61 61 { 62 62 NSString *message = [dictionary objectForKey:@"message"];
Note: See TracChangeset
for help on using the changeset viewer.