Bug 235282 - DocCommentHighlightingTests needs user interaction on Linux
Summary: DocCommentHighlightingTests needs user interaction on Linux
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 5.0   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 5.0   Edit
Assignee: Anton Leherbauer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-06-03 03:57 EDT by Emanuel Graf CLA
Modified: 2009-01-09 15:07 EST (History)
0 users

See Also:


Attachments
patch (1.21 KB, patch)
2008-06-03 04:04 EDT, Emanuel Graf CLA
no flags Details | Diff
new Patch (1.92 KB, patch)
2008-06-03 05:14 EDT, Emanuel Graf CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuel Graf CLA 2008-06-03 03:57:47 EDT
The DocCommentHighlightingTests presents a dialogbox "Unsaved editors need reopening" because the method adjustLineSeparator changes the editor content.
Comment 1 Emanuel Graf CLA 2008-06-03 04:04:58 EDT
Created attachment 103258 [details]
patch

A simple fEditor.doSave() solves this problem. The test cases still fail but this is an other issue.
Comment 2 Anton Leherbauer CLA 2008-06-03 04:42:54 EDT
(In reply to comment #1)
> Created an attachment (id=103258) [details]
> patch
> A simple fEditor.doSave() solves this problem. The test cases still fail but
> this is an other issue.

Interesting. I removed the doSave() because the tests started to fail due to the automatic removal of trailing whitespace. I am surprised that the dialog does not pop up on windows.
Anyway, to fix the test it should be sufficient to disable the removal of trailing whitespace during the test (PreferenceConstants.REMOVE_TRAILING_WHITESPACE).
Comment 3 Anton Leherbauer CLA 2008-06-03 04:56:56 EDT
(In reply to comment #2)
> I am surprised that the dialog does not pop up on windows.

Silly me. On windows, the line separator needs no adjustment, therefore the editor is not dirty.
Comment 4 Emanuel Graf CLA 2008-06-03 05:14:25 EDT
Created attachment 103267 [details]
new Patch

(In reply to comment #2)
> Anyway, to fix the test it should be sufficient to disable the removal of
> trailing whitespace during the test
> (PreferenceConstants.REMOVE_TRAILING_WHITESPACE).
> 

You're right this solves the Problem. Green bar on Linux. :)
Comment 5 Anton Leherbauer CLA 2008-06-03 05:55:59 EDT
I suppose this bug is the reason why the UI tests hang on the build server.
I'll post a message on cdt-dev that I am going to commit your patch. 
Comment 6 Anton Leherbauer CLA 2008-06-03 08:16:23 EDT
Thanks Emanuel! 
I added a line in teardown() to restore the preference default.
Fixed in 5.0 > 20080603.