aboutsummaryrefslogtreecommitdiff
path: root/engines/testbed/misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/testbed/misc.cpp')
-rw-r--r--engines/testbed/misc.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/testbed/misc.cpp b/engines/testbed/misc.cpp
index 5847a8d2e4..bda0a361a7 100644
--- a/engines/testbed/misc.cpp
+++ b/engines/testbed/misc.cpp
@@ -160,10 +160,34 @@ TestExitStatus MiscTests::testMutexes() {
return kTestFailed;
}
+TestExitStatus MiscTests::testOpenUrl() {
+ Common::String info = "Testing openUrl() method.\n"
+ "In this test we'll try to open scummvm.org in your default browser.";
+
+ if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) {
+ Testsuite::logPrintf("Info! Skipping test : openUrl()\n");
+ return kTestSkipped;
+ }
+
+ if (!g_system->openUrl("http://scummvm.org/")) {
+ Testsuite::logPrintf("Info! openUrl() says it couldn't open the url (probably not supported on this platform)\n");
+ return kTestFailed;
+ }
+
+ if (Testsuite::handleInteractiveInput("Was ScummVM able to open 'http://scummvm.org/' in your default browser?", "Yes", "No", kOptionRight)) {
+ Testsuite::logDetailedPrintf("Error! openUrl() is not working!\n");
+ return kTestFailed;
+ }
+
+ Testsuite::logDetailedPrintf("openUrl() is OK\n");
+ return kTestPassed;
+}
+
MiscTestSuite::MiscTestSuite() {
addTest("Datetime", &MiscTests::testDateTime, false);
addTest("Timers", &MiscTests::testTimers, false);
addTest("Mutexes", &MiscTests::testMutexes, false);
+ addTest("openUrl", &MiscTests::testOpenUrl, true);
}
} // End of namespace Testbed