Hello nigeltao,

I'd like you to do a code review.  Please execute
        g4 diff -c 12206781

or point your web browser to
        http://mondrian/12206781
(this changelist has been uploaded to Mondrian)

to review the following code:

Change 12206781 by n...@noel-gears on 2009/08/05 12:09:54 *pending*

        Fix user agent test: look for "Firefox/2.0" or "Firefox/3.0" only
        (no trailing period), use a regex.
        
        PRESUBMIT=passed
        R=nigeltao
        [email protected]
        DELTA=8  (0 added, 4 deleted, 4 changed)
        OCL=12206781

Affected files ...

... 
//depot/googleclient/gears/opensource/gears/test/manual/drag_and_drop_fake_event_attack.html#10
 edit
... 
//depot/googleclient/gears/opensource/gears/test/manual/drag_and_drop_set_data_attack.html#2
 edit

8 delta lines: 0 added, 4 deleted, 4 changed

If you can't do the review, please let me know as soon as possible.  During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately.  Visit
http://www/eng/code_review.html for more information.

This is a semiautomated message from "g4 mail".  Complaints or suggestions?
Mail [email protected].
Change 12206781 by n...@noel-gears on 2009/08/05 12:09:54 *pending*

        Fix user agent test: look for "Firefox/2.0" or "Firefox/3.0" only
        (no trailing period), use a regex.

Affected files ...

... 
//depot/googleclient/gears/opensource/gears/test/manual/drag_and_drop_fake_event_attack.html#10
 edit
... 
//depot/googleclient/gears/opensource/gears/test/manual/drag_and_drop_set_data_attack.html#2
 edit

==== 
//depot/googleclient/gears/opensource/gears/test/manual/drag_and_drop_fake_event_attack.html#10
 - 
c:\Users\noel.GOOGLE\src-gears/googleclient/gears/opensource/gears/test/manual/drag_and_drop_fake_event_attack.html
 ====
# action=edit type=text
--- 
googleclient/gears/opensource/gears/test/manual/drag_and_drop_fake_event_attack.html
        2009-08-05 12:10:38.000000000 +1000
+++ 
googleclient/gears/opensource/gears/test/manual/drag_and_drop_fake_event_attack.html
        2009-08-05 12:05:37.000000000 +1000
@@ -26,10 +26,8 @@
 var isIE = google.gears.factory.getBuildInfo().indexOf(';ie') > -1;
 
 var html5 = true;  // Use HTML5-defined drag event names.
-if (isFirefox && navigator.userAgent.indexOf('Firefox/2.0.') > -1)
-  html5 = false;  // FF2.0 uses "dragexit" and "dragdrop"
-if (isFirefox && navigator.userAgent.indexOf('Firefox/3.0.') > -1)
-  html5 = false;  // FF3.0 uses "dragexit" and "dragdrop"
+if (navigator.userAgent.match(/Firefox\/[2-3]\.0/))
+  html5 = false;  // FF2.0, FF3.0 use "dragexit" and "dragdrop".
 
 var isInManualDispatch = false;
 
==== 
//depot/googleclient/gears/opensource/gears/test/manual/drag_and_drop_set_data_attack.html#2
 - 
c:\Users\noel.GOOGLE\src-gears/googleclient/gears/opensource/gears/test/manual/drag_and_drop_set_data_attack.html
 ====
# action=edit type=text
--- 
googleclient/gears/opensource/gears/test/manual/drag_and_drop_set_data_attack.html
  2009-08-05 12:10:38.000000000 +1000
+++ 
googleclient/gears/opensource/gears/test/manual/drag_and_drop_set_data_attack.html
  2009-08-05 12:06:17.000000000 +1000
@@ -32,10 +32,8 @@
 var isWin32 = google.gears.factory.getBuildInfo().indexOf('win32') > -1;
 
 var html5 = true;  // Use HTML5-defined drag event names.
-if (isFirefox && navigator.userAgent.indexOf('Firefox/2.0.') > -1)
-  html5 = false;  // FF2.0 uses "dragexit" and "dragdrop"
-if (isFirefox && navigator.userAgent.indexOf('Firefox/3.0.') > -1)
-  html5 = false;  // FF3.0 uses "dragexit" and "dragdrop"
+if (navigator.userAgent.match(/Firefox\/[2-3]\.0/))
+  html5 = false;  // FF2.0, FF3.0 use "dragexit" and "dragdrop".
 
 function stopPropagation(evt) {
   if (typeof evt.stopPropagation === 'function')

Reply via email to