Hello michaeln,
I'd like you to do a code review. Please execute
g4 diff -c 11450046
or point your web browser to
http://mondrian/11450046
to review the following code:
Change 11450046 by nigel...@nigeltao-srcgears1 on 2009/06/10 11:54:06 *pending*
Added test case for "display:none IFRAME crashes browser", bug 881,
fixed by OCL 11397520.
PRESUBMIT=passed
R=michaeln
[email protected]
DELTA=52 (52 added, 0 deleted, 0 changed)
OCL=11450046
Affected files ...
...
//depot/googleclient/gears/opensource/gears/test/testcases/factory_tests.js#5
edit
...
//depot/googleclient/gears/opensource/gears/test/tester/run_gears_init.html#1
add
52 delta lines: 52 added, 0 deleted, 0 changed
Also consider running:
g4 lint -c 11450046
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 11450046 by nigel...@nigeltao-srcgears1 on 2009/06/10 11:54:06 *pending*
Added test case for "display:none IFRAME crashes browser", bug 881,
fixed by OCL 11397520.
Affected files ...
...
//depot/googleclient/gears/opensource/gears/test/testcases/factory_tests.js#5
edit
...
//depot/googleclient/gears/opensource/gears/test/tester/run_gears_init.html#1
add
====
//depot/googleclient/gears/opensource/gears/test/testcases/factory_tests.js#5 -
/home/nigeltao/srcgears1/googleclient/gears/opensource/gears/test/testcases/factory_tests.js
====
# action=edit type=text
--- googleclient/gears/opensource/gears/test/testcases/factory_tests.js
2009-06-10 11:47:17.000000000 +1000
+++ googleclient/gears/opensource/gears/test/testcases/factory_tests.js
2009-06-10 11:50:50.000000000 +1000
@@ -98,3 +98,17 @@
hasPermission = google.gears.factory.getPermission('', '', '');
assertEqual(hasPermission, true);
}
+
+function testInvisibleIframeDoesntCrash() {
+ // This one cannot run in a worker.
+ if (typeof document == 'undefined') {
+ return;
+ }
+
+ // We're simply testing that a display:none styled IFRAME does not crash the
+ // browser (this is http://code.google.com/p/gears/issues/detail?id=881 ).
+ var iframe = document.createElement('iframe');
+ iframe.src = 'run_gears_init.html';
+ iframe.style.display = 'none';
+ document.body.appendChild(iframe);
+}
====
//depot/googleclient/gears/opensource/gears/test/tester/run_gears_init.html#1 -
/home/nigeltao/srcgears1/googleclient/gears/opensource/gears/test/tester/run_gears_init.html
====
# action=add type=text
--- /dev/null 1970-01-01 10:00:00.000000000 +1000
+++ googleclient/gears/opensource/gears/test/tester/run_gears_init.html
2009-06-10 11:43:30.000000000 +1000
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+
+<!--
+Copyright 2007, Google Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ 3. Neither the name of Google Inc. nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+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.
+
+-->
+
+<html>
+<head>
+<title>run_gears_init</title>
+<script src='../../sdk/gears_init.js'></script>
+<body>
+<p>This page simply runs gears_init.js to create a Gears Factory.</p>
+</body>
+</html>