[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11350: Fix compile. Add/enable test
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11350: Fix compile. Add/enable tests. Clean up a bit. |
Date: |
Fri, 31 Jul 2009 08:45:06 +0200 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 11350
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Fri 2009-07-31 08:45:06 +0200
message:
Fix compile. Add/enable tests. Clean up a bit.
modified:
libcore/TextField.cpp
libcore/TextField.h
testsuite/actionscript.all/TextField.as
testsuite/actionscript.all/TextFieldHTML.as
testsuite/actionscript.all/TextFormat.as
------------------------------------------------------------
revno: 11349.1.1
committer: Benjamin Wolsey <address@hidden>
branch nick: temp
timestamp: Fri 2009-07-31 07:15:54 +0200
message:
_top_visible_line is now called _scroll.
modified:
libcore/TextField.h
------------------------------------------------------------
revno: 11349.1.2
committer: Benjamin Wolsey <address@hidden>
branch nick: temp
timestamp: Fri 2009-07-31 07:23:22 +0200
message:
Run tests now that the crash is fixed and expect failures.
modified:
testsuite/actionscript.all/TextFieldHTML.as
------------------------------------------------------------
revno: 11349.1.3
committer: Benjamin Wolsey <address@hidden>
branch nick: temp
timestamp: Fri 2009-07-31 07:27:56 +0200
message:
Actually test the array assignment. Gnash still fails.
modified:
testsuite/actionscript.all/TextFormat.as
------------------------------------------------------------
revno: 11349.1.4
committer: Benjamin Wolsey <address@hidden>
branch nick: temp
timestamp: Fri 2009-07-31 07:34:30 +0200
message:
Add tests for restrict.
modified:
testsuite/actionscript.all/TextField.as
------------------------------------------------------------
revno: 11349.1.5
committer: Benjamin Wolsey <address@hidden>
branch nick: temp
timestamp: Fri 2009-07-31 07:37:51 +0200
message:
Expect failure.
modified:
testsuite/actionscript.all/TextField.as
------------------------------------------------------------
revno: 11349.1.6
committer: Benjamin Wolsey <address@hidden>
branch nick: temp
timestamp: Fri 2009-07-31 07:42:04 +0200
message:
Drop ADDED comments and some unneeded includes.
modified:
libcore/TextField.cpp
libcore/TextField.h
=== modified file 'libcore/TextField.cpp'
--- a/libcore/TextField.cpp 2009-07-30 22:10:16 +0000
+++ b/libcore/TextField.cpp 2009-07-31 05:42:04 +0000
@@ -825,8 +825,6 @@
if ( tf.rightMarginDefined() ) setRightMargin(tf.rightMargin());
if ( tf.colorDefined() ) setTextColor(tf.color());
if ( tf.underlinedDefined() ) setUnderlined(tf.underlined());
-
- // ADDED (completed)
if ( tf.bulletDefined() ) setBullet(tf.bullet());
if ( tf.displayDefined() ) setDisplay(tf.display());
if ( tf.tabStopsDefined() ) setTabStops(tf.tabStops());
@@ -2538,7 +2536,6 @@
}
}
-// ADDED
void
TextField::setBullet(bool b)
{
@@ -2547,7 +2544,6 @@
}
}
-// ADDED
void
TextField::setTabStops(const std::vector<int>& tabStops)
{
@@ -2561,7 +2557,6 @@
set_invalidated();
}
-// ADDED
void
TextField::setURL(std::string url)
{
@@ -2571,7 +2566,6 @@
}
}
-// ADDED
void
TextField::setTarget(std::string target)
{
@@ -2582,7 +2576,6 @@
}
}
-// ADDED
void
TextField::setDisplay(TextFormatDisplay display)
{
=== modified file 'libcore/TextField.h'
--- a/libcore/TextField.h 2009-07-30 21:37:46 +0000
+++ b/libcore/TextField.h 2009-07-31 05:42:04 +0000
@@ -20,11 +20,9 @@
#include "InteractiveObject.h" // for inheritance
#include "styles.h" // for line_style
-#include "fill_style.h"
#include "Range2d.h"
#include "rect.h" // for inlines
#include "Font.h" // for visibility of font add_ref/drop_ref
-#include "Array_as.h"
#include <vector>
@@ -672,7 +670,7 @@
bool m_has_focus;
size_t m_cursor;
- size_t _top_visible_line;
+ size_t _scroll;
void show_cursor(Renderer& renderer, const SWFMatrix& mat);
float m_xcursor;
float m_ycursor;
=== modified file 'testsuite/actionscript.all/TextField.as'
--- a/testsuite/actionscript.all/TextField.as 2009-07-09 09:40:13 +0000
+++ b/testsuite/actionscript.all/TextField.as 2009-07-31 05:37:51 +0000
@@ -504,14 +504,34 @@
xcheck_equals(typeof(tf.restrict), 'null');
check(!tf.hasOwnProperty('restrict'));
+xcheck_equals(typeof(tf.restrict), 'null');
tf.text = "Hello World";
tf.restrict = "olH";
+check_equals(typeof(tf.restrict), 'string');
check_equals(tf.text, "Hello World");
tf.text = "Hello World"; // override
// doesn't influence explicit setting, only GUI modification
// of the textfield (TODO: test with a MovieTester)
check_equals(tf.text, "Hello World");
+tf.restrict = "";
+check_equals(tf.restrict, "");
+check_equals(typeof(tf.restrict), 'string');
+tf.restrict = "ä";
+check_equals(tf.restrict, "ä");
+check_equals(typeof(tf.restrict), 'string');
+
+tf.restrict = 9;
+check_equals(tf.restrict, "9");
+check_equals(typeof(tf.restrict), 'string');
+
+o = {};
+o.toString = function() { return "üöä"; };
+o.valueOf = function() { return 8; };
+
+tf.restrict = o;
+check_equals(tf.restrict, "üöä");
+check_equals(typeof(tf.restrict), 'string');
// Check TextField._rotation
@@ -1072,11 +1092,11 @@
//------------------------------------------------------------
#if OUTPUT_VERSION == 6
- check_totals(465);
+ check_totals(475);
#elif OUTPUT_VERSION == 7
- check_totals(468);
+ check_totals(478);
#elif OUTPUT_VERSION == 8
- check_totals(469);
+ check_totals(479);
#endif
#endif
=== modified file 'testsuite/actionscript.all/TextFieldHTML.as'
--- a/testsuite/actionscript.all/TextFieldHTML.as 2009-07-30 08:31:32
+0000
+++ b/testsuite/actionscript.all/TextFieldHTML.as 2009-07-31 05:23:22
+0000
@@ -88,38 +88,35 @@
// WARNING!! The disabled code crashes Gnash at the moment.
// When that's fixed, this code can be reenabled to get the totals() pass,
// and the failures in this section (only!) can be expected.
-#if 0
// A color string that is this short doesn't change the color.
tf.htmlText = '<font color="#ff">too short</font>';
- check_equals(tf.text, "too short");
+ xcheck_equals(tf.text, "too short");
format = tf.getTextFormat(1, 4);
- check_equals(format.color, 0x0000ff);
+ xcheck_equals(format.color, 0x0000ff);
// When it's three characters it does change the color.
tf.htmlText = '<font color="#ff0">a bit short</font>';
- check_equals(tf.text, "a bit short");
+ xcheck_equals(tf.text, "a bit short");
format = tf.getTextFormat(1, 4);
- check_equals(format.color, 0x000ff0);
+ xcheck_equals(format.color, 0x000ff0);
// Without a hash it sets the color to black.
tf.htmlText = '<font color="ff00ff">no hash</font>';
- check_equals(tf.text, "no hash");
+ xcheck_equals(tf.text, "no hash");
format = tf.getTextFormat(1, 4);
check_equals(format.color, 0);
tf.htmlText = '<font color="hi">no hash 2</font>';
- check_equals(tf.text, "no hash 2");
+ xcheck_equals(tf.text, "no hash 2");
format = tf.getTextFormat(1, 4);
check_equals(format.color, 0);
tf.htmlText = '<font color="">empty</font>';
- check_equals(tf.text, "empty");
+ xcheck_equals(tf.text, "empty");
format = tf.getTextFormat(1, 4);
check_equals(format.color, 0);
-#endif
-
// Extra long strings are truncated, but the end counts, not the beginning.
tf.htmlText = '<font color="#ff00ffffee">long</font>';
xcheck_equals(tf.text, "long");
@@ -132,6 +129,6 @@
format = tf.getTextFormat(1, 4);
xcheck_equals(format.color, 0x00ff00);
- xtotals(30);
+ totals(30);
#endif
=== modified file 'testsuite/actionscript.all/TextFormat.as'
--- a/testsuite/actionscript.all/TextFormat.as 2009-07-30 21:34:40 +0000
+++ b/testsuite/actionscript.all/TextFormat.as 2009-07-31 05:27:56 +0000
@@ -102,18 +102,19 @@
check_equals(tfObj.size, 2);
check_equals(tfObj.font, 'fname');
+
+// Check tabStops property.
+// The passed array is processed before assignment, not simply stored.
tf = new TextFormat();
o = {};
-//o.valueOf = function() { return 6; };
+o.valueOf = function() { return 6; };
o.toString = function() { return "string"; };
a = [ o ];
tf.tabStops = a;
-trace(tf.tabStops);
-
-
-
-
-check_totals(63);
+check_equals(a.toString(), "string");
+xcheck_equals(tf.tabStops.toString(), "6");
+
+check_totals(65);
- [Gnash-commit] /srv/bzr/gnash/trunk r11350: Fix compile. Add/enable tests. Clean up a bit.,
Benjamin Wolsey <=