r73502 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73501‎ | r73502 | r73503 >
Date:00:22, 22 September 2010
Author:pdhanda
Status:ok
Tags:
Comment:
Fixed to work with the latest version of SeleniumTestCase
Modified paths:
  • /trunk/extensions/PagedTiffHandler/selenium/PagedTiffHandlerTestCases.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PagedTiffHandler/selenium/PagedTiffHandlerTestCases.php
@@ -6,7 +6,7 @@
77 public function runTest() {
88
99 // check whether Multipage.tiff is already uploaded
10 - $this->open( Selenium::getBaseUrl() .
 10+ $this->open( $this->getUrl() .
1111 '/index.php?title=Image:Multipage.tiff' );
1212
1313 $source = $this->getAttribute( "//div[@id='bodyContent']//ul@id" );
@@ -15,7 +15,7 @@
1616 }
1717
1818 // Check for language
19 - $this->open( Selenium::getBaseUrl() .
 19+ $this->open( $this->getUrl() .
2020 '/api.php?action=query&meta=userinfo&uiprop=options&format=xml');
2121
2222 $lang = $this->getAttribute( "//options/@language" );
@@ -28,8 +28,8 @@
2929
3030 public function tearDown() {
3131 if ( $this->prerequisiteError ) {
32 - $this->selenium->stop();
33 - die( 'failed: ' . $this->prerequisiteError . "\n" );
 32+ //$this->selenium->stop();
 33+ throw new MWException( 'failed: ' . $this->prerequisiteError . "\n" );
3434 }
3535 }
3636 }
@@ -37,7 +37,7 @@
3838 class SeleniumUploadTiffTest extends SeleniumTestCase {
3939 public function uploadFile( $filename ) {
4040
41 - $this->open( Selenium::getBaseUrl() .
 41+ $this->open( $this->getUrl() .
4242 '/index.php?title=Special:Upload' );
4343 $this->type( 'wpUploadFile', dirname( __FILE__ ) .
4444 "\\testImages\\" . $filename );
@@ -104,7 +104,7 @@
105105
106106 public function runTest() {
107107
108 - $this->open( Selenium::getBaseUrl() . '/index.php?title=Image:'
 108+ $this->open( $this->getUrl() . '/index.php?title=Image:'
109109 . ucfirst( $this->filename ) . '&action=delete' );
110110 $this->type( 'wpReason', 'Remove test file' );
111111 $this->click( 'mw-filedelete-submit' );
@@ -123,7 +123,7 @@
124124
125125 parent::tearDown();
126126 // Clear EmbedTiffTest page for future tests
127 - $this->open( Selenium::getBaseUrl() .
 127+ $this->open( $this->getUrl() .
128128 '/index.php?title=EmbedTiffTest&action=edit' );
129129 $this->type( 'wpTextbox1', '' );
130130 $this->click( 'wpSave' );
@@ -131,7 +131,7 @@
132132
133133 public function preparePage( $text ) {
134134
135 - $this->open( Selenium::getBaseUrl() .
 135+ $this->open( $this->getUrl() .
136136 '/index.php?title=EmbedTiffTest&action=edit' );
137137 $this->type( 'wpTextbox1', $text );
138138 $this->click( 'wpSave' );
@@ -144,7 +144,7 @@
145145 public function tearDown() {
146146 parent::tearDown();
147147 // Clear EmbedTiffTest page for future tests
148 - $this->open( Selenium::getBaseUrl() . '/index.php?title=Image:'
 148+ $this->open( $this->getUrl() . '/index.php?title=Image:'
149149 . $this->image . '&action=edit' );
150150 $this->type( 'wpTextbox1', '' );
151151 $this->click( 'wpSave' );
@@ -153,7 +153,7 @@
154154 public function prepareImagePage( $image, $text ) {
155155
156156 $this->image = $image;
157 - $this->open( Selenium::getBaseUrl() . '/index.php?title=Image:'
 157+ $this->open( $this->getUrl() . '/index.php?title=Image:'
158158 . $image . '&action=edit' );
159159 $this->type( 'wpTextbox1', $text );
160160 $this->click( 'wpSave' );
@@ -170,7 +170,7 @@
171171 "[[Category:Wiki]]\n" );
172172
173173
174 - $this->open( Selenium::getBaseUrl() . '/index.php?title=Category:Wiki' );
 174+ $this->open( $this->getUrl() . '/index.php?title=Category:Wiki' );
175175
176176 // Ergebnis chekcen
177177 $source = $this->getAttribute(

Status & tagging log