Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 178391 Details for
Bug 324732
[upload] Widget is disposed if widget is disposed while upload is in progress
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Testcase
clipboard.txt (text/plain), 1.23 KB, created by
Stefan Röck
on 2010-09-08 08:36:25 EDT
(
hide
)
Description:
Testcase
Filename:
MIME Type:
Creator:
Stefan Röck
Created:
2010-09-08 08:36:25 EDT
Size:
1.23 KB
patch
obsolete
>public void testUploadWidgetDisposed() throws InterruptedException { > final Upload upload = new Upload(getShell(), SWT.NONE, SWT.NONE); > final Display display = upload.getDisplay(); > IUploadAdapter adapter = (IUploadAdapter) upload.getAdapter(IUploadAdapter.class); > adapter.setPath("somePath"); > > Thread t = new Thread(new Runnable() { > > public void run() { > try { > Thread.sleep(200); > display.asyncExec(new Runnable() { > public void run() { > upload.dispose(); > } > }); > } catch (InterruptedException e) { > fail(e.getMessage()); > } > } > }); > t.start(); > boolean success = upload.performUpload(); > assertFalse("performUpload should return false as the upload was not successfull because the widget has been disposed", success); > > t.join(); > > SWTException exc = null; > try { > upload.getUploadItem(); > } catch ( SWTException e) { > exc = e; > } > assertNotNull("An exception should be thrown if the Upload#getUploadItem() is called on a disposed widget", exc); > if (exc != null) { > assertEquals("An ERROR_WIDGET_DISPOSED should be thrown if the Upload#getUploadItem() is called on a disposed widget", SWT.ERROR_WIDGET_DISPOSED, exc.code); > } > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 324732
: 178391 |
178401