зеркало из https://github.com/mozilla/pluotsorbet.git
Make tests pass when RELEASE=1. Fixes #1157.
This commit is contained in:
Родитель
5e79167004
Коммит
882f8a6e6f
|
@ -116,7 +116,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
// Run the Init midlet, which does nothing by itself but ensures that any
|
||||
// initialization code gets run before we start a test that depends on it.
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=midlets.InitMidlet&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=midlets.InitMidlet&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("DONE", syncFS);
|
||||
});
|
||||
|
@ -148,12 +148,12 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
}
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, basicUnitTests);
|
||||
|
||||
// Run the same unit tests again to test the compiled method cache.
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, basicUnitTests);
|
||||
|
||||
casper
|
||||
|
@ -191,7 +191,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
});
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests/alarm/MIDlet1&jad=tests/midlets/alarm/alarm.jad&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests/alarm/MIDlet1&jad=tests/midlets/alarm/alarm.jad&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("Hello World from MIDlet2", function() {
|
||||
test.pass();
|
||||
|
@ -199,7 +199,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
});
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests.background.BackgroundMIDlet1&jad=tests/midlets/background/background1.jad&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests.background.BackgroundMIDlet1&jad=tests/midlets/background/background1.jad&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("Hello World from foreground MIDlet", function() {
|
||||
test.pass();
|
||||
|
@ -207,7 +207,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
});
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests.background.BackgroundMIDlet2&jad=tests/midlets/background/background2.jad&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests.background.BackgroundMIDlet2&jad=tests/midlets/background/background2.jad&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("Hello World from foreground MIDlet", function() {
|
||||
test.pass();
|
||||
|
@ -215,7 +215,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
});
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests.background.BackgroundMIDlet3&jad=tests/midlets/background/background3.jad&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests.background.BackgroundMIDlet3&jad=tests/midlets/background/background3.jad&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("Hello World from foreground MIDlet", function() {
|
||||
test.assertTextExists("prop1=hello prop2=ciao");
|
||||
|
@ -223,7 +223,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
});
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests.sms.SMSMIDlet&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests.sms.SMSMIDlet&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
this.waitForText("START", function() {
|
||||
this.evaluate(function() {
|
||||
|
@ -240,7 +240,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
});
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests.fileui.FileUIMIDlet&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=tests.fileui.FileUIMIDlet&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
this.waitForText("START", function() {
|
||||
this.waitUntilVisible(".nokia-fileui-prompt", function() {
|
||||
|
@ -266,7 +266,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
|
||||
gfxTests.forEach(function(testCase) {
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?fontSize=12&midletClassName=" + testCase.name + "&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?fontSize=12&midletClassName=" + testCase.name + "&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("PAINTED", function() {
|
||||
this.waitForSelector("#canvas", function() {
|
||||
|
@ -365,7 +365,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
});
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=1.0.0")
|
||||
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=1.0.0&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("DONE", function() {
|
||||
test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Download");
|
||||
|
@ -375,7 +375,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
|
||||
// Run the test a second time to ensure loading the JAR stored in the FS works correctly.
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=1.0.0")
|
||||
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=1.0.0&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("DONE", function() {
|
||||
test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Load");
|
||||
|
@ -386,7 +386,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
|
||||
// Run the test that updates the MIDlet
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDletUpdater&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDletUpdater&logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
var alertText = null;
|
||||
casper.on('remote.alert', function onAlert(message) {
|
||||
|
@ -404,7 +404,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
|
||||
// Verify that the update has been applied
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=3.0.0")
|
||||
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest1.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=3.0.0&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("DONE", function() {
|
||||
test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Load after update");
|
||||
|
@ -418,7 +418,7 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
.waitForText("DONE");
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest2.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=2.0.0")
|
||||
.thenOpen("http://localhost:8000/index.html?downloadJAD=http://localhost:8000/tests/Manifest2.jad&midletClassName=tests.jaddownloader.AMIDlet&logConsole=web,page&args=2.0.0&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("DONE", function() {
|
||||
test.assertTextExists("SUCCESS 3/3", "test JAD downloader - Download with absolute URL");
|
||||
|
@ -427,14 +427,14 @@ casper.test.begin("unit tests", 19 + gfxTests.length, function(test) {
|
|||
});
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=com.sun.midp.midlet.TestMIDletPeer&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=com.sun.midp.midlet.TestMIDletPeer&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
|
||||
.waitForPopup("test.html", function() {
|
||||
test.assertEquals(this.popups.length, 1);
|
||||
test.assertTextDoesntExist("FAIL");
|
||||
});
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=midlets.TestAlertWithGauge&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=midlets.TestAlertWithGauge&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
this.waitUntilVisible(".lcdui-alert.visible .button1", function() {
|
||||
this.click(".lcdui-alert.visible .button0");
|
||||
|
|
|
@ -106,7 +106,7 @@ casper.test.begin("fs tests", 7, function(test) {
|
|||
|
||||
// Run the FileConnection TCK unit tests.
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?main=com.ibm.tck.client.TestRunner&args=-noserver&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?main=com.ibm.tck.client.TestRunner&args=-noserver&jars=tests/tests.jar&logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("All Tests Passed", function() {
|
||||
test.assertTextExists("357 tests, 318 passed, 39 excluded, 0 failed", "run FC TCK unit tests");
|
||||
|
|
Загрузка…
Ссылка в новой задаче