http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73502
Revision: 73502
Author: pdhanda
Date: 2010-09-22 00:22:49 +0000 (Wed, 22 Sep 2010)
Log Message:
-----------
Fixed to work with the latest version of SeleniumTestCase
Modified Paths:
--------------
trunk/extensions/PagedTiffHandler/selenium/PagedTiffHandlerTestCases.php
Modified:
trunk/extensions/PagedTiffHandler/selenium/PagedTiffHandlerTestCases.php
===================================================================
--- trunk/extensions/PagedTiffHandler/selenium/PagedTiffHandlerTestCases.php
2010-09-22 00:18:47 UTC (rev 73501)
+++ trunk/extensions/PagedTiffHandler/selenium/PagedTiffHandlerTestCases.php
2010-09-22 00:22:49 UTC (rev 73502)
@@ -6,7 +6,7 @@
public function runTest() {
// check whether Multipage.tiff is already uploaded
- $this->open( Selenium::getBaseUrl() .
+ $this->open( $this->getUrl() .
'/index.php?title=Image:Multipage.tiff' );
$source = $this->getAttribute(
"//d...@id='bodyContent']//u...@id" );
@@ -15,7 +15,7 @@
}
// Check for language
- $this->open( Selenium::getBaseUrl() .
+ $this->open( $this->getUrl() .
'/api.php?action=query&meta=userinfo&uiprop=options&format=xml');
$lang = $this->getAttribute( "//options/@language" );
@@ -28,8 +28,8 @@
public function tearDown() {
if ( $this->prerequisiteError ) {
- $this->selenium->stop();
- die( 'failed: ' . $this->prerequisiteError . "\n" );
+ //$this->selenium->stop();
+ throw new MWException( 'failed: ' .
$this->prerequisiteError . "\n" );
}
}
}
@@ -37,7 +37,7 @@
class SeleniumUploadTiffTest extends SeleniumTestCase {
public function uploadFile( $filename ) {
- $this->open( Selenium::getBaseUrl() .
+ $this->open( $this->getUrl() .
'/index.php?title=Special:Upload' );
$this->type( 'wpUploadFile', dirname( __FILE__ ) .
"\\testImages\\" . $filename );
@@ -104,7 +104,7 @@
public function runTest() {
- $this->open( Selenium::getBaseUrl() . '/index.php?title=Image:'
+ $this->open( $this->getUrl() . '/index.php?title=Image:'
. ucfirst( $this->filename ) . '&action=delete' );
$this->type( 'wpReason', 'Remove test file' );
$this->click( 'mw-filedelete-submit' );
@@ -123,7 +123,7 @@
parent::tearDown();
// Clear EmbedTiffTest page for future tests
- $this->open( Selenium::getBaseUrl() .
+ $this->open( $this->getUrl() .
'/index.php?title=EmbedTiffTest&action=edit' );
$this->type( 'wpTextbox1', '' );
$this->click( 'wpSave' );
@@ -131,7 +131,7 @@
public function preparePage( $text ) {
- $this->open( Selenium::getBaseUrl() .
+ $this->open( $this->getUrl() .
'/index.php?title=EmbedTiffTest&action=edit' );
$this->type( 'wpTextbox1', $text );
$this->click( 'wpSave' );
@@ -144,7 +144,7 @@
public function tearDown() {
parent::tearDown();
// Clear EmbedTiffTest page for future tests
- $this->open( Selenium::getBaseUrl() . '/index.php?title=Image:'
+ $this->open( $this->getUrl() . '/index.php?title=Image:'
. $this->image . '&action=edit' );
$this->type( 'wpTextbox1', '' );
$this->click( 'wpSave' );
@@ -153,7 +153,7 @@
public function prepareImagePage( $image, $text ) {
$this->image = $image;
- $this->open( Selenium::getBaseUrl() . '/index.php?title=Image:'
+ $this->open( $this->getUrl() . '/index.php?title=Image:'
. $image . '&action=edit' );
$this->type( 'wpTextbox1', $text );
$this->click( 'wpSave' );
@@ -170,7 +170,7 @@
"[[Category:Wiki]]\n" );
- $this->open( Selenium::getBaseUrl() .
'/index.php?title=Category:Wiki' );
+ $this->open( $this->getUrl() . '/index.php?title=Category:Wiki'
);
// Ergebnis chekcen
$source = $this->getAttribute(
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs