hust-marx / firebreath

Automatically exported from code.google.com/p/firebreath
0 stars 0 forks source link

Regression in code for event handler binding from JS #138

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. build FBTestPlugin from firebreath-1.4 
2. apply this patch to test.html
commit aa4cf097474596b52390605b807b8e037379ace3

diff --git a/examples/FBTestPlugin/test.html b/examples/FBTestPlugin/test.html
index 5262155..986d1a1 100644
--- a/examples/FBTestPlugin/test.html
+++ b/examples/FBTestPlugin/test.html
@@ -107,6 +107,7 @@
             addTest("location", "Get page location test");
             addTest("mathApiAdd", "Use custom JSAPI coming in from script");
             addTest("countArray", "Count array length returned from JSAPI objec
+                       addTest("fireEvent", "Event bind and fire test");
             addTest("dialog", "Dialog callback test");
             markFailed("loaded");
             injectPlugin($("#pluginContainer"), pluginLoaded);
@@ -204,6 +205,15 @@
             }
             else
                 markPassed("countArray");
+                       plugin.onfired = function (str) {
+                               if (str == "some string")
+                                       markPassed("fireEvent");
+                               else 
+                                       markFailed("fireEvent");
+                       };
+                                               
+                       plugin.testEvent("some string");
+                                               
             try {
                 thread = plugin.createThreadRunner();

3. run test with FBTestPlugin from firebreath-1.3 and 1.4

What is the expected output? What do you see instead?
This JS code worked in IE8 and NPAPI browsers with FBTestPlugin builded from 
firebreath-1.3
But IE does not pass this test with FBTestPlugin from firebreath-1.4

What version of FireBreath are you using? On what operating system and
browsers?
Windows 7-32bit IE8
git revision 031de0ccd0990644523706e711e5e0c5f91dec94

What version of your compiler or IDE are you using?
VS2008

Original issue reported on code.google.com by bignikita on 3 Feb 2011 at 10:34

GoogleCodeExporter commented 9 years ago
good catch; fixed.

Original comment by richarda...@gmail.com on 8 Feb 2011 at 3:40