[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. e9656783f680eb999fea
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. e9656783f680eb999feaa368bcf10f5c14c9ff12 |
Date: |
Fri, 29 Oct 2010 22:16:12 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via e9656783f680eb999feaa368bcf10f5c14c9ff12 (commit)
from 0c79e2efe0351e57371eab443408b5e357967015 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=e9656783f680eb999feaa368bcf10f5c14c9ff12
commit e9656783f680eb999feaa368bcf10f5c14c9ff12
Author: Sandro Santilli <address@hidden>
Date: Sat Oct 30 00:15:04 2010 +0200
Add a non-automated test for relative urls resolution. Gnash fails. The
test suggests that document.baseURI might be the answer (on the plugin side).
Worth testin with other browsers to see if that variable is always available.
diff --git a/plugin/test/baseuri/README b/plugin/test/baseuri/README
new file mode 100644
index 0000000..99a8927
--- /dev/null
+++ b/plugin/test/baseuri/README
@@ -0,0 +1,11 @@
+These files are a test for resolution of relative urls
+with different mixes of <base> tags and "base" params
+and subdir layouts.
+
+The test is not automated, but if you build test.swf in both
+root and sub/ dirs (top line of test.as contains makeswf call)
+you'll have instructions about what to expect written in the
+html page.
+
+As a facility, some javascript code shows what's the supposed
+baseURI to use for resolving relative urls.
diff --git a/plugin/test/baseuri/sub/test.as b/plugin/test/baseuri/sub/test.as
new file mode 100644
index 0000000..5891781
--- /dev/null
+++ b/plugin/test/baseuri/sub/test.as
@@ -0,0 +1,19 @@
+// makeswf -s400x100 -o test.swf test.as
+
+createTextField("tf", 50, 10, 10, 10, 10);
+tf.autoSize = true;
+tf.border = 1;
+function log(msg) {
+ tf.text += msg;
+ tf.text += "\n";
+ trace(msg);
+}
+
+xml = new XML();
+xml.onLoad = function(x) {
+ log("Loaded: " + x);
+ log("XML: " + this);
+};
+log("Started sub");
+xml.load('test.xml');
+
diff --git a/plugin/test/baseuri/sub/test.html
b/plugin/test/baseuri/sub/test.html
new file mode 100644
index 0000000..66410fb
--- /dev/null
+++ b/plugin/test/baseuri/sub/test.html
@@ -0,0 +1,28 @@
+
+<script>
+document.write('window.location.href: '+window.location.href);
+document.write('<br>');
+document.write('document.baseURI: '+document.baseURI);
+</script>
+
+<hr/>
+
+<embed type="application/x-shockwave-flash"
+ border="1"
+ src="../test.swf"
+ height="100" width="400">
+no base (expect XML:sub)
+
+<hr/>
+
+<embed type="application/x-shockwave-flash"
+ border="1"
+ src="../test.swf"
+ height="100" width="400"
+ base="..">
+base=".." (expect XML:root)
+
+<hr/>
+
+<a href="../test.html">root</a>
+
diff --git a/plugin/test/baseuri/sub/test.xml b/plugin/test/baseuri/sub/test.xml
new file mode 100644
index 0000000..62e0af5
--- /dev/null
+++ b/plugin/test/baseuri/sub/test.xml
@@ -0,0 +1 @@
+sub
diff --git a/plugin/test/baseuri/test.as b/plugin/test/baseuri/test.as
new file mode 100644
index 0000000..a8f7420
--- /dev/null
+++ b/plugin/test/baseuri/test.as
@@ -0,0 +1,19 @@
+// makeswf -s400x100 -o test.swf test.as
+
+createTextField("tf", 50, 10, 10, 10, 10);
+tf.autoSize = true;
+tf.border = 1;
+function log(msg) {
+ tf.text += msg;
+ tf.text += "\n";
+ trace(msg);
+}
+
+xml = new XML();
+xml.onLoad = function(x) {
+ log("Loaded: " + x);
+ log("XML: " + this);
+};
+log("Started root");
+xml.load('test.xml');
+
diff --git a/plugin/test/baseuri/test.html b/plugin/test/baseuri/test.html
new file mode 100644
index 0000000..79ff7f4
--- /dev/null
+++ b/plugin/test/baseuri/test.html
@@ -0,0 +1,37 @@
+<script>
+document.write('window.location.href: '+window.location.href);
+document.write('<br>');
+document.write('document.baseURI: '+document.baseURI);
+</script>
+
+<hr/>
+
+<embed type="application/x-shockwave-flash"
+ border="1"
+ src="test.swf"
+ height="100" width="400">
+src="test.swf" no base (expect XML:root)
+
+<hr/>
+
+<embed type="application/x-shockwave-flash"
+ border="1"
+ src="test.swf"
+ height="100" width="400"
+ base="sub">
+src="test.swf" base="sub" (expect XML:sub)
+
+<hr/>
+
+<embed type="application/x-shockwave-flash"
+ border="1"
+ src="sub/test.swf"
+ height="100" width="400">
+src="sub/test.swf" no base (expect XML:root)
+
+<hr/>
+
+<a href="test_base.html">based</a>
+|
+<a href="sub/test.html">sub</a>
+
diff --git a/plugin/test/baseuri/test.xml b/plugin/test/baseuri/test.xml
new file mode 100644
index 0000000..d8649da
--- /dev/null
+++ b/plugin/test/baseuri/test.xml
@@ -0,0 +1 @@
+root
diff --git a/plugin/test/baseuri/test_base.html
b/plugin/test/baseuri/test_base.html
new file mode 100644
index 0000000..e428a3a
--- /dev/null
+++ b/plugin/test/baseuri/test_base.html
@@ -0,0 +1,40 @@
+<base href="http://localhost/test/sub/" />
+
+<script>
+document.write('window.location.href: '+window.location.href);
+document.write('<br>');
+document.write('document.baseURI: '+document.baseURI);
+</script>
+
+<hr/>
+
+
+<embed type="application/x-shockwave-flash"
+ border="1"
+ src="test.swf"
+ height="100" width="400">
+src="test.swf" no base (expect XML:sub)
+
+<hr/>
+
+<embed type="application/x-shockwave-flash"
+ border="1"
+ src="test.swf"
+ height="100" width="400"
+ base="..">
+src="test.swf" base=".." (expect XML:root)
+
+<hr/>
+
+<embed type="application/x-shockwave-flash"
+ border="1"
+ src="../test.swf"
+ height="100" width="400">
+src="../test.swf" no base (expect XML:sub)
+
+<hr/>
+
+<a href="../test.html">unbased</a>
+|
+<a href="test.html">sub</a>
+
-----------------------------------------------------------------------
Summary of changes:
plugin/test/baseuri/README | 11 +++++++++
plugin/test/baseuri/sub/test.as | 19 +++++++++++++++++
plugin/test/baseuri/sub/test.html | 28 +++++++++++++++++++++++++
plugin/test/baseuri/sub/test.xml | 1 +
plugin/test/baseuri/test.as | 19 +++++++++++++++++
plugin/test/baseuri/test.html | 37 +++++++++++++++++++++++++++++++++
plugin/test/baseuri/test.xml | 1 +
plugin/test/baseuri/test_base.html | 40 ++++++++++++++++++++++++++++++++++++
8 files changed, 156 insertions(+), 0 deletions(-)
create mode 100644 plugin/test/baseuri/README
create mode 100644 plugin/test/baseuri/sub/test.as
create mode 100644 plugin/test/baseuri/sub/test.html
create mode 100644 plugin/test/baseuri/sub/test.xml
create mode 100644 plugin/test/baseuri/test.as
create mode 100644 plugin/test/baseuri/test.html
create mode 100644 plugin/test/baseuri/test.xml
create mode 100644 plugin/test/baseuri/test_base.html
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. e9656783f680eb999feaa368bcf10f5c14c9ff12,
Sandro Santilli <=