Next really will be to get POST working.
A test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerImpl.java
- Forgot to add this.
M classes_spec/org/mozilla/webclient/impl/wrapper_native/HistoryImpl.java
M src_moz/HistoryImpl.cpp
- push through can{back,forward}(), forward().
M test/automated/src/classes/org/mozilla/webclient/HistoryTest.java
- exercise new methods.
git-svn-id: svn://10.0.0.236/trunk@158380 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* $Id: DocumentLoadListenerImpl.java,v 1.1 2004-06-23 19:58:12 edburns%acm.org Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun
|
||||
* Microsystems, Inc. Portions created by Sun are
|
||||
* Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Ed Burns <edburns@acm.org>
|
||||
*/
|
||||
|
||||
package org.mozilla.webclient;
|
||||
|
||||
public abstract class DocumentLoadListenerImpl implements DocumentLoadListener {
|
||||
|
||||
public void eventDispatched(WebclientEvent event) {
|
||||
if (event instanceof DocumentLoadEvent) {
|
||||
switch ((int) event.getType()) {
|
||||
case ((int) DocumentLoadEvent.END_DOCUMENT_LOAD_EVENT_MASK):
|
||||
doEndCheck();
|
||||
break;
|
||||
case ((int) DocumentLoadEvent.PROGRESS_URL_LOAD_EVENT_MASK):
|
||||
doProgressCheck();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void doEndCheck() {}
|
||||
|
||||
public void doProgressCheck() {}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: HistoryTest.java,v 1.1 2004-06-23 19:21:06 edburns%acm.org Exp $
|
||||
* $Id: HistoryTest.java,v 1.2 2004-06-23 19:58:12 edburns%acm.org Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -135,6 +135,9 @@ public class HistoryTest extends WebclientTestCase {
|
||||
// load four files.
|
||||
//
|
||||
HistoryTest.keepWaiting = true;
|
||||
|
||||
assertTrue(!history.canBack());
|
||||
assertTrue(!history.canForward());
|
||||
nav.loadURL("http://localhost:5243/HistoryTest0.html");
|
||||
|
||||
// keep waiting until the previous load completes
|
||||
@@ -143,6 +146,8 @@ public class HistoryTest extends WebclientTestCase {
|
||||
}
|
||||
|
||||
HistoryTest.keepWaiting = true;
|
||||
assertTrue(!history.canBack());
|
||||
assertTrue(!history.canForward());
|
||||
nav.loadURL("http://localhost:5243/HistoryTest1.html");
|
||||
|
||||
// keep waiting until the previous load completes
|
||||
@@ -151,6 +156,8 @@ public class HistoryTest extends WebclientTestCase {
|
||||
}
|
||||
|
||||
HistoryTest.keepWaiting = true;
|
||||
assertTrue(history.canBack());
|
||||
assertTrue(!history.canForward());
|
||||
nav.loadURL("http://localhost:5243/HistoryTest2.html");
|
||||
|
||||
// keep waiting until the previous load completes
|
||||
@@ -159,6 +166,8 @@ public class HistoryTest extends WebclientTestCase {
|
||||
}
|
||||
|
||||
HistoryTest.keepWaiting = true;
|
||||
assertTrue(history.canBack());
|
||||
assertTrue(!history.canForward());
|
||||
nav.loadURL("http://localhost:5243/HistoryTest3.html");
|
||||
|
||||
// keep waiting until the previous load completes
|
||||
@@ -180,6 +189,8 @@ public class HistoryTest extends WebclientTestCase {
|
||||
|
||||
HistoryTest.keepWaiting = true;
|
||||
historyListener.setStringToVerify("This is page 2 of the history test.");
|
||||
assertTrue(history.canBack());
|
||||
assertTrue(!history.canForward());
|
||||
history.back();
|
||||
|
||||
// keep waiting until the previous load completes
|
||||
@@ -189,6 +200,8 @@ public class HistoryTest extends WebclientTestCase {
|
||||
|
||||
HistoryTest.keepWaiting = true;
|
||||
historyListener.setStringToVerify("This is page 1 of the history test.");
|
||||
assertTrue(history.canBack());
|
||||
assertTrue(history.canForward());
|
||||
history.back();
|
||||
|
||||
// keep waiting until the previous load completes
|
||||
@@ -198,6 +211,8 @@ public class HistoryTest extends WebclientTestCase {
|
||||
|
||||
HistoryTest.keepWaiting = true;
|
||||
historyListener.setStringToVerify("This is page 0 of the history test.");
|
||||
assertTrue(history.canBack());
|
||||
assertTrue(history.canForward());
|
||||
history.back();
|
||||
|
||||
// keep waiting until the previous load completes
|
||||
|
||||
Reference in New Issue
Block a user