|
Lines 21-26
Link Here
|
| 21 |
import org.eclipse.rwt.lifecycle.*; |
21 |
import org.eclipse.rwt.lifecycle.*; |
| 22 |
import org.eclipse.swt.SWT; |
22 |
import org.eclipse.swt.SWT; |
| 23 |
import org.eclipse.swt.browser.*; |
23 |
import org.eclipse.swt.browser.*; |
|
|
24 |
import org.eclipse.swt.internal.widgets.IBrowserAdapter; |
| 24 |
import org.eclipse.swt.widgets.Display; |
25 |
import org.eclipse.swt.widgets.Display; |
| 25 |
import org.eclipse.swt.widgets.Shell; |
26 |
import org.eclipse.swt.widgets.Shell; |
| 26 |
|
27 |
|
|
Lines 95-100
Link Here
|
| 95 |
assertEquals( "http://eclipse.org/rip", BrowserLCA.getUrl( browser ) ); |
96 |
assertEquals( "http://eclipse.org/rip", BrowserLCA.getUrl( browser ) ); |
| 96 |
} |
97 |
} |
| 97 |
|
98 |
|
|
|
99 |
public void testResetUrlChanged_NotInitialized() throws IOException { |
| 100 |
Display display = new Display(); |
| 101 |
Shell shell = new Shell( display ); |
| 102 |
Fixture.markInitialized( display ); |
| 103 |
Browser browser = new Browser( shell, SWT.NONE ); |
| 104 |
browser.setUrl( "http://eclipse.org/rap" ); |
| 105 |
Fixture.fakeResponseWriter(); |
| 106 |
|
| 107 |
BrowserLCA lca = new BrowserLCA(); |
| 108 |
lca.renderChanges( browser ); |
| 109 |
|
| 110 |
assertFalse( getAdapter( browser).getAndResetUrlChanged() ); |
| 111 |
} |
| 112 |
|
| 113 |
public void testResetUrlChanged_Initialized() throws IOException { |
| 114 |
Display display = new Display(); |
| 115 |
Shell shell = new Shell( display ); |
| 116 |
Fixture.markInitialized( display ); |
| 117 |
Browser browser = new Browser( shell, SWT.NONE ); |
| 118 |
Fixture.markInitialized( browser ); |
| 119 |
browser.setUrl( "http://eclipse.org/rap" ); |
| 120 |
Fixture.fakeResponseWriter(); |
| 121 |
|
| 122 |
BrowserLCA lca = new BrowserLCA(); |
| 123 |
lca.renderChanges( browser ); |
| 124 |
|
| 125 |
assertFalse( getAdapter( browser).getAndResetUrlChanged() ); |
| 126 |
} |
| 127 |
|
| 98 |
public void testRenderUrl() throws IOException { |
128 |
public void testRenderUrl() throws IOException { |
| 99 |
Display display = new Display(); |
129 |
Display display = new Display(); |
| 100 |
Fixture.markInitialized( display ); |
130 |
Fixture.markInitialized( display ); |
|
Lines 337-342
Link Here
|
| 337 |
assertEquals( "completed", log.get( 1 ) ); |
367 |
assertEquals( "completed", log.get( 1 ) ); |
| 338 |
} |
368 |
} |
| 339 |
|
369 |
|
|
|
370 |
private static IBrowserAdapter getAdapter( final Browser browser ) { |
| 371 |
return ( IBrowserAdapter )browser.getAdapter( IBrowserAdapter.class ); |
| 372 |
} |
| 373 |
|
| 340 |
protected void setUp() throws Exception { |
374 |
protected void setUp() throws Exception { |
| 341 |
Fixture.setUp(); |
375 |
Fixture.setUp(); |
| 342 |
} |
376 |
} |