Hello michaeln,

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

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

to review the following code:

Change 10401956 by a...@ace-gears on 2009/03/06 15:13:52 *pending*

        Apparently safari already uses the js function name "createCookie".
        Changing name of new test helper function to avoid errors.
        
        R=michaeln
        [email protected]
        DELTA=9  (0 added, 0 deleted, 9 changed)
        OCL=10401956

Affected files ...

... 
//depot/googleclient/gears/opensource/gears/test/testcases/localserver_noworker_tests.js#7
 edit
... //depot/googleclient/gears/opensource/gears/test/tester/assert.js#15 edit

9 delta lines: 0 added, 0 deleted, 9 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 10401956 by a...@ace-gears on 2009/03/06 15:13:52 *pending*

        Apparently safari already uses the js function name "createCookie".
        Changing name of new test helper function to avoid errors.
        
        OCL=10401956

Affected files ...

... 
//depot/googleclient/gears/opensource/gears/test/testcases/localserver_noworker_tests.js#7
 edit
... //depot/googleclient/gears/opensource/gears/test/tester/assert.js#15 edit

==== 
//depot/googleclient/gears/opensource/gears/test/testcases/localserver_noworker_tests.js#7
 - 
c:/gears/googleclient/gears/opensource/gears/test/testcases/localserver_noworker_tests.js
 ====
# action=edit type=text
--- 
googleclient/gears/opensource/gears/test/testcases/localserver_noworker_tests.js
    2009-03-06 15:13:59.000000000 -0800
+++ 
googleclient/gears/opensource/gears/test/testcases/localserver_noworker_tests.js
    2009-03-06 15:12:11.000000000 -0800
@@ -58,7 +58,7 @@
   localServer.removeStore(STORE_NAME, REQUIRED_COOKE);
   var resourceStore = localServer.createStore(STORE_NAME, REQUIRED_COOKE);
 
-  createCookie('a', '1');
+  createTestCookie('a', '1');
   startAsync();
   resourceStore.capture(CAPTURE_URI, function(url, success, id) {
     assert(success, 'Failed to capture');
@@ -80,15 +80,15 @@
       assert(content.startsWith(EXPECTED_CONTENT),
              'Unexpected content in resource');
 
-      createCookie('a', '2');
+      createTestCookie('a', '2');
       assert(!localServer.canServeLocally(RENAME_URI),
              'Should not servable with the wrong cookie');
 
-      createCookie('a', '1');
+      createTestCookie('a', '1');
       assert(localServer.canServeLocally(RENAME_URI),
              'Should be on again');
 
-      eraseCookie('a');
+      eraseTestCookie('a');
       assert(!localServer.canServeLocally(RENAME_URI),
              'Should not be servable with no cookie');
 
==== //depot/googleclient/gears/opensource/gears/test/tester/assert.js#15 - 
c:/gears/googleclient/gears/opensource/gears/test/tester/assert.js ====
# action=edit type=text
--- googleclient/gears/opensource/gears/test/tester/assert.js   2009-03-06 
15:13:59.000000000 -0800
+++ googleclient/gears/opensource/gears/test/tester/assert.js   2009-03-06 
15:11:35.000000000 -0800
@@ -446,7 +446,7 @@
 
 // cookie functions courtesy ppk: http://www.quirksmode.org/js/cookies.html
 
-function createCookie(name, value, optDays) {
+function createTestCookie(name, value, optDays) {
   if (optDays) {
     var date = new Date();
     date.setTime(date.getTime()+(optDays*24*60*60*1000));
@@ -456,7 +456,7 @@
   document.cookie = name+"="+value+expires+"; path=/";
 }
 
-function readCookie(name) {
+function readTestCookie(name) {
   var nameEQ = name + "=";
   var ca = document.cookie.split(';');
   for(var i=0;i < ca.length;i++) {
@@ -467,6 +467,6 @@
   return null;
 }
 
-function eraseCookie(name) {
-  createCookie(name,"",-1);
-}
+function eraseTestCookie(name) {
+  createTestCookie(name,"",-1);
+}

Reply via email to