Bug 102676

Summary: [chromium] move methods that only use the WebKit API from DRTTestRunner to TestRunner
Product: WebKit Reporter: jochen
Component: New BugsAssignee: jochen
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

jochen
Reported 2012-11-19 04:37:01 PST
[chromium] move methods that only use the WebKit API from DRTTestRunner to TestRunner
Attachments
Patch (87.89 KB, patch)
2012-11-19 04:41 PST, jochen
no flags
Patch (87.98 KB, patch)
2012-11-19 11:29 PST, jochen
no flags
Patch for landing (88.03 KB, patch)
2012-11-19 11:41 PST, jochen
no flags
jochen
Comment 1 2012-11-19 04:41:47 PST
Tony Chang
Comment 2 2012-11-19 09:16:10 PST
Comment on attachment 174954 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=174954&action=review > Tools/ChangeLog:12 > + In addition, I've replaced parsePageNumber with the more commonly used > + cppVariantToInt32, changed logErrorToConsole to just print the error > + message instead of logging a real console error, moved abortModal to > + the list of stubbed out methods, and removed > + setAutomaticLinkDetectionEnabled which wasn't used anywhere. The ChangeLog section below is normally where you put comments like this. This section is normally about why you are making this change. > Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:732 > +void TestRunner::logErrorToConsole(const string& text) > +{ > + m_delegate->printMessage(string("CONSOLE MESSAGE: JavaScript ERROR: ") + text + "\n"); > +} Does this always produce messages in the same order if the test has a mix of console.log and calls that might go through here? I guess in practice, no test should go through this code path (i.e., will any tests fail if you change the output format and remove the prefix)? It's a bit confusing to name this logErrorToConsole when it's not actually logging an error to the javascript console. Maybe rename it to something like "printErrorMessage"?
jochen
Comment 3 2012-11-19 11:29:22 PST
jochen
Comment 4 2012-11-19 11:30:59 PST
(In reply to comment #2) > (From update of attachment 174954 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=174954&action=review > > > Tools/ChangeLog:12 > > + In addition, I've replaced parsePageNumber with the more commonly used > > + cppVariantToInt32, changed logErrorToConsole to just print the error > > + message instead of logging a real console error, moved abortModal to > > + the list of stubbed out methods, and removed > > + setAutomaticLinkDetectionEnabled which wasn't used anywhere. > > The ChangeLog section below is normally where you put comments like this. This section is normally about why you are making this change. I've moved the comment about logErrorToConsole down to the function list. The other comments refer to deleted code which is not listed below, so I left them here > > > Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:732 > > +void TestRunner::logErrorToConsole(const string& text) > > +{ > > + m_delegate->printMessage(string("CONSOLE MESSAGE: JavaScript ERROR: ") + text + "\n"); > > +} > > Does this always produce messages in the same order if the test has a mix of console.log and calls that might go through here? I guess in practice, no test should go through this code path (i.e., will any tests fail if you change the output format and remove the prefix)? Yes and yes. > > It's a bit confusing to name this logErrorToConsole when it's not actually logging an error to the javascript console. Maybe rename it to something like "printErrorMessage"? done
jochen
Comment 5 2012-11-19 11:41:35 PST
Created attachment 175012 [details] Patch for landing
jochen
Comment 6 2012-11-19 11:42:45 PST
Comment on attachment 175012 [details] Patch for landing Turns out that the css3/filters tests set a web preference we don't support, and so we actually depend on the correct format in logErrorToConsole aka printErrorMessage
WebKit Review Bot
Comment 7 2012-11-19 12:06:04 PST
Comment on attachment 175012 [details] Patch for landing Clearing flags on attachment: 175012 Committed r135184: <http://trac.webkit.org/changeset/135184>
WebKit Review Bot
Comment 8 2012-11-19 12:06:09 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.