/*****************************************************************************
*
* Copyright (c) 2003-2005 Kupu Contributors. All rights reserved.
*
* This software is distributed under the terms of the Kupu
* License. See LICENSE.txt for license text. For a list of Kupu
* Contributors see CREDITS.txt.
*
*****************************************************************************/
// $Id: test_plone.js 15966 2005-08-11 15:16:18Z duncan $
// Various tests for html -> xhtml processing.
function KupuPloneTestCase() {
SelectionTestCase.apply(this);
this.base_setUp = this.setUp;
this.name = 'KupuPloneTestCase';
this.incontext = function(s) {
return '
line|...
var expected = '
line 1
line 2
line 3
';
this.body.innerHTML = data;
this._setSelection(10, null, 18, null, 'e 2line');
this.ui.setTextStyle('h2');
this.assertEquals(this._cleanHtml(this.body.innerHTML), expected);
}
this.testSetTextStyleTable = function() {
var data = '
';
// select ................es...................
var expected = '
';
var withheader = '
';
this.body.innerHTML = data;
var idx = _SARISSA_IS_IE ? 2 : 1;
this._setSelection(idx, null, idx+2, null, 'es');
this.ui.setTextStyle('div|te st'); // Space in class forces IE to put it in quotes!
this.assertEquals(this._cleanHtml(this.body.innerHTML), expected);
this._setSelection(idx, null, idx+2, null, 'es');
this.ui.setTextStyle('td');
this.assertEquals(this._cleanHtml(this.body.innerHTML), data);
this.ui.setTextStyle('th');
this.assertEquals(this._cleanHtml(this.body.innerHTML), withheader);
}
}
KupuPloneTestCase.prototype = new SelectionTestCase;