Woohoo! I have loadURL working. The next step will be to get enough of
CurrentPage working so that I can "selectAll" the page, and verify that the contents are loaded correctly. Ed M build-tests.xml - enable all tests M build.xml - added compile.test passthru target M classes_spec/org/mozilla/webclient/impl/wrapper_native/WindowControlImpl.java - unpack the Rectangle into final ints M src_moz/WindowControlImpl.cpp - this was causing the deadlock: the package name was wrong. The UnsatisfiedLinkError was not caught, and vanished into nowhere. M test/automated/src/classes/org/mozilla/webclient/NavigationTest.java - we must independently make the canvas visible. Hmm. Shouldn't it automatically receive setVisible() when its parent is made visible? - do cleanup git-svn-id: svn://10.0.0.236/trunk@155326 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
f720e6b15f
commit
115ddd0456
File diff suppressed because one or more lines are too long
@ -306,5 +306,11 @@ ${myenv.MOZ_JDKHOME}/bin/java ${debug.options} org.mozilla.webclient.test.Embedd
|
||||
|
||||
</target>
|
||||
|
||||
<target name="compile.test" description="compile unit tests">
|
||||
|
||||
<ant antfile="build-tests.xml" target="compile.test"/>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
</project>
|
||||
|
||||
@ -102,17 +102,20 @@ public void createWindow(int nativeWindow, Rectangle rect)
|
||||
final int nativeWin = nativeWindow;
|
||||
final int nativeBc = getNativeBrowserControl();
|
||||
final BrowserControl bc = getBrowserControl();
|
||||
final Rectangle bounds = rect;
|
||||
final int finalX = rect.x;
|
||||
final int finalY = rect.y;
|
||||
final int finalWidth = rect.width;
|
||||
final int finalHeight = rect.height;
|
||||
|
||||
NativeEventThread.instance.pushBlockingWCRunnable(new WCRunnable() {
|
||||
public Object run() {
|
||||
nativeRealize(nativeWin, nativeBc, bounds.x,
|
||||
bounds.y, bounds.width,
|
||||
bounds.height, bc);
|
||||
|
||||
nativeRealize(nativeWin, nativeBc, finalX,
|
||||
finalY, finalWidth,
|
||||
finalHeight, bc);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
public int getNativeWebShell()
|
||||
@ -203,7 +206,7 @@ public static void main(String [] args)
|
||||
|
||||
Log.setApplicationName("WindowControlImpl");
|
||||
Log.setApplicationVersion("0.0");
|
||||
Log.setApplicationVersionDate("$Id: WindowControlImpl.java,v 1.4 2004-04-20 16:17:41 edburns%acm.org Exp $");
|
||||
Log.setApplicationVersionDate("$Id: WindowControlImpl.java,v 1.5 2004-04-22 06:41:02 edburns%acm.org Exp $");
|
||||
|
||||
try {
|
||||
org.mozilla.webclient.BrowserControlFactory.setAppData(args[0]);
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include "NativeBrowserControl.h"
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeRealize
|
||||
JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WindowControlImpl_nativeRealize
|
||||
(JNIEnv *env, jobject obj, jint windowPtr, jint nativeBCPtr, jint x, jint y,
|
||||
jint width, jint height, jobject aBrowserControlImpl)
|
||||
{
|
||||
@ -54,6 +54,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlI
|
||||
width, height);
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_mozilla_webclient_impl_wrapper_1native_WindowControlImpl_nativeSetBounds
|
||||
(JNIEnv *env, jobject obj, jint nativeBCPtr, jint x, jint y, jint w, jint h)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: NavigationTest.java,v 1.2 2004-04-20 16:17:42 edburns%acm.org Exp $
|
||||
* $Id: NavigationTest.java,v 1.3 2004-04-22 06:41:02 edburns%acm.org Exp $
|
||||
*/
|
||||
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
@ -69,6 +69,7 @@ public class NavigationTest extends WebclientTestCase {
|
||||
frame.setBounds(0, 0, 640, 480);
|
||||
frame.add(canvas, BorderLayout.CENTER);
|
||||
frame.setVisible(true);
|
||||
canvas.setVisible(true);
|
||||
|
||||
Navigation nav = (Navigation)
|
||||
firstBrowserControl.queryInterface(BrowserControl.NAVIGATION_NAME);
|
||||
@ -78,6 +79,10 @@ public class NavigationTest extends WebclientTestCase {
|
||||
|
||||
System.out.println("Loading url: " + testPage.toURL().toString());
|
||||
nav.loadURL(testPage.toURL().toString());
|
||||
frame.setVisible(false);
|
||||
BrowserControlFactory.deleteBrowserControl(firstBrowserControl);
|
||||
BrowserControlFactory.appTerminate();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user