Hello andreip,

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

or point your web browser to
        http://mondrian/9089059

to review the following code:

Change 9089059 by [EMAIL PROTECTED] on 2008/11/20 15:09:29 *pending*

        Fixes Geolocation unit tests to match updated error code values.
        
        R=andreip
        [EMAIL PROTECTED]
        DELTA=8  (5 added, 0 deleted, 3 changed)
        OCL=9089059

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/common/position_table.cc#6 
edit
... 
//depot/googleclient/gears/opensource/gears/geolocation/geolocation_db_test.cc#4
 edit
... 
//depot/googleclient/gears/opensource/gears/geolocation/geolocation_test.cc#33 
edit
... 
//depot/googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js#9
 edit

8 delta lines: 5 added, 0 deleted, 3 changed

Also consider running:
        g4 lint -c 9089059

which verifies that the changelist doesn't introduce new style violations.

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 9089059 by [EMAIL PROTECTED] on 2008/11/20 15:09:29 *pending*

        Fixes Geolocation unit tests to match updated error code values.

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/common/position_table.cc#6 
edit
... 
//depot/googleclient/gears/opensource/gears/geolocation/geolocation_db_test.cc#4
 edit
... 
//depot/googleclient/gears/opensource/gears/geolocation/geolocation_test.cc#33 
edit
... 
//depot/googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js#9
 edit

==== 
//depot/googleclient/gears/opensource/gears/base/common/position_table.cc#6 - 
c:\MyDocs\Gears4/googleclient/gears/opensource/gears/base/common/position_table.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/position_table.cc   
2008-11-20 15:35:57.000000000 +0000
+++ googleclient/gears/opensource/gears/base/common/position_table.cc   
2008-11-20 15:20:28.000000000 +0000
@@ -228,6 +228,7 @@
   switch (error_code) {
     case Position::ERROR_CODE_POSITION_UNAVAILABLE:
       position->error_code = Position::ERROR_CODE_POSITION_UNAVAILABLE;
+      break;
     default:
       // Note that in previous versions, error_code was set to kint32min to
       // signify no error.
==== 
//depot/googleclient/gears/opensource/gears/geolocation/geolocation_db_test.cc#4
 - 
c:\MyDocs\Gears4/googleclient/gears/opensource/gears/geolocation/geolocation_db_test.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/geolocation/geolocation_db_test.cc      
2008-11-20 15:35:57.000000000 +0000
+++ googleclient/gears/opensource/gears/geolocation/geolocation_db_test.cc      
2008-11-20 15:20:32.000000000 +0000
@@ -115,7 +115,7 @@
     return false;
   }
   if (!ArePositionsEqual(retrieved_position, updated_position)) {
-    *error += STRING16(L"TestPositionTable(): Retrieved updated position does "
+    *error += STRING16(L"TestGeolocationDB(): Retrieved updated position does "
                        L"not match original. ");
     return false;
   }
==== 
//depot/googleclient/gears/opensource/gears/geolocation/geolocation_test.cc#33 
- 
c:\MyDocs\Gears4/googleclient/gears/opensource/gears/geolocation/geolocation_test.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/geolocation/geolocation_test.cc 
2008-11-20 15:35:57.000000000 +0000
+++ googleclient/gears/opensource/gears/geolocation/geolocation_test.cc 
2008-11-20 15:24:44.000000000 +0000
@@ -566,6 +566,7 @@
   switch (error_code) {
     case Position::ERROR_CODE_POSITION_UNAVAILABLE:
       position->error_code = Position::ERROR_CODE_POSITION_UNAVAILABLE;
+      break;
   }
 }
 
==== 
//depot/googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js#9
 - 
c:\MyDocs\Gears4/googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js
 ====
# action=edit type=text
--- 
googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js
    2008-11-20 15:35:57.000000000 +0000
+++ 
googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js
    2008-11-20 15:09:06.000000000 +0000
@@ -22,6 +22,9 @@
 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Error code values. These values must match those in geolocation.h.
+var ERROR_CODE_POSITION_UNAVAILABLE = 2;
 
 if (isUsingCCTests) {
   var internalTests = google.gears.factory.create('beta.test');
@@ -389,13 +392,13 @@
     };
 
     function noPositionErrorCallback(error) {
-      assertEqual(3, error.code);  // Location not found error code.
+      assertEqual(ERROR_CODE_POSITION_UNAVAILABLE, error.code);
       assert(error.message.search('did not provide a good position fix') > 0);
       makeMalformedRequest();
     };
 
     function malformedRequestErrorCallback(error) {
-      assertEqual(2, error.code);  // Location acquistion error code.
+      assertEqual(ERROR_CODE_POSITION_UNAVAILABLE, error.code);
       assert(error.message.search('returned error code 400') > 0);
       completeAsync();
     };

Reply via email to