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

Side by Side Diff: tools/testing/dart/browser_controller.dart

Issue 241783003: Fix Browser Controller to not reuse iFrames, which can sometimes cause bad state to be left between… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 library browser; 4 library browser;
5 5
6 import "dart:async"; 6 import "dart:async";
7 import "dart:convert" show LineSplitter, UTF8; 7 import "dart:convert" show LineSplitter, UTF8;
8 import "dart:core"; 8 import "dart:core";
9 import "dart:io"; 9 import "dart:io";
10 10
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 // negative value. 1367 // negative value.
1368 contactBrowserController( 1368 contactBrowserController(
1369 'GET', '$nextTestPath/$browserId', newTaskHandler, "", false); 1369 'GET', '$nextTestPath/$browserId', newTaskHandler, "", false);
1370 } 1370 }
1371 1371
1372 function run(url) { 1372 function run(url) {
1373 number_of_tests++; 1373 number_of_tests++;
1374 number_div.innerHTML = number_of_tests; 1374 number_div.innerHTML = number_of_tests;
1375 executing_div.innerHTML = url; 1375 executing_div.innerHTML = url;
1376 if (use_iframe) { 1376 if (use_iframe) {
1377 var embedded_iframe = document.getElementById('embedded_iframe');
1378 embedded_iframe.parentNode.removeChild(embedded_iframe);
Jennifer Messerly 2014/04/17 22:29:05 you might need to remove it from https://developer
1379
1380 embedded_iframe = document.createElement('iframe');
1381 embedded_iframe.id = 'embedded_iframe';
1382 document.body.appendChild(embedded_iframe);
1377 embedded_iframe.src = url; 1383 embedded_iframe.src = url;
1378 } else { 1384 } else {
1379 if (testing_window == undefined) { 1385 if (testing_window != undefined) {
1380 testing_window = window.open(url); 1386 testing_window.close();
1381 } else {
1382 testing_window.location = url;
1383 } 1387 }
1388 testing_window = window.open(url);
1384 } 1389 }
1385 } 1390 }
1386 1391
1387 window.onerror = function (message, url, lineNumber) { 1392 window.onerror = function (message, url, lineNumber) {
1388 if (url) { 1393 if (url) {
1389 reportError(url + ':' + lineNumber + ':' + message); 1394 reportError(url + ':' + lineNumber + ':' + message);
1390 } else { 1395 } else {
1391 reportError(message); 1396 reportError(message);
1392 } 1397 }
1393 } 1398 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 1492
1488 getNextTask(); 1493 getNextTask();
1489 } 1494 }
1490 1495
1491 </script> 1496 </script>
1492 </head> 1497 </head>
1493 <body onload="startTesting()"> 1498 <body onload="startTesting()">
1494 Dart test driver, number of tests: <div id="number"></div><br> 1499 Dart test driver, number of tests: <div id="number"></div><br>
1495 Currently executing: <div id="currently_executing"></div><br> 1500 Currently executing: <div id="currently_executing"></div><br>
1496 Unhandled error: <div id="unhandled_error"></div> 1501 Unhandled error: <div id="unhandled_error"></div>
1497 <iframe id="embedded_iframe"></iframe> 1502 <iframe id="embedded_iframe"></iframe>
Jennifer Messerly 2014/04/17 22:29:05 one idea here would be to make this a div and add
1498 </body> 1503 </body>
1499 </html> 1504 </html>
1500 """; 1505 """;
1501 return driverContent; 1506 return driverContent;
1502 } 1507 }
1503 } 1508 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698