Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: LayoutTests/storage/websql/transaction-callback-isolated-world.html

Issue 13954010: Eliminate "temporary" and "uninitialized" isolated worlds (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 This test tests that the transaction callback is called in the right world. 4 This test tests that the transaction callback is called in the right world.
5 <div id="console"></div> 5 <div id="console"></div>
6 <script> 6 <script>
7 var transactionCallbacksInvoked = 0; 7 var transactionCallbacksInvoked = 0;
8 function done() 8 function done()
9 { 9 {
10 if ((++transactionCallbacksInvoked == 2) && (window.testRunner)) 10 if ((++transactionCallbacksInvoked == 2) && (window.testRunner))
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 document.body.foo = "FAIL: document.body.foo visible in isolated world."; 26 document.body.foo = "FAIL: document.body.foo visible in isolated world.";
27 document.body.bar = "PASS: document.body.bar visible in a callback created in th is world."; 27 document.body.bar = "PASS: document.body.bar visible in a callback created in th is world.";
28 28
29 if (window.testRunner) { 29 if (window.testRunner) {
30 testRunner.clearAllDatabases(); 30 testRunner.clearAllDatabases();
31 testRunner.dumpAsText(); 31 testRunner.dumpAsText();
32 testRunner.waitUntilDone(); 32 testRunner.waitUntilDone();
33 testRunner.evaluateScriptInIsolatedWorld( 33 testRunner.evaluateScriptInIsolatedWorld(
34 0, 34 1,
35 "function transactionCallback1(tx)\n" + 35 "function transactionCallback1(tx)\n" +
36 "{\n" + 36 "{\n" +
37 " alert(document.body.foo);\n" + 37 " alert(document.body.foo);\n" +
38 " window.location='javascript:done()';\n" + 38 " window.location='javascript:done()';\n" +
39 "}\n" + 39 "}\n" +
40 "var db1 = openDatabase('TransactionCallbackIsolatedWorld1', '1.0', '', 1);\n" + 40 "var db1 = openDatabase('TransactionCallbackIsolatedWorld1', '1.0', '', 1);\n" +
41 "db1.transaction(transactionCallback1);"); 41 "db1.transaction(transactionCallback1);");
42 42
43 var db2 = openDatabase('TransactionCallbackIsolatedWorld2', '1.0', '', 1); 43 var db2 = openDatabase('TransactionCallbackIsolatedWorld2', '1.0', '', 1);
44 db2.transaction(transactionCallback2); 44 db2.transaction(transactionCallback2);
45 } 45 }
46 </script> 46 </script>
47 </body> 47 </body>
48 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698