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

Unified 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: git cl dcommit 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/browser_controller.dart
diff --git a/tools/testing/dart/browser_controller.dart b/tools/testing/dart/browser_controller.dart
index 92166e4f788b424211354f59806752045cd20ca5..d98933180c60e0df173b54f0fbad5d2d3f5ec867 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -1374,13 +1374,18 @@ class BrowserTestingServer {
number_div.innerHTML = number_of_tests;
executing_div.innerHTML = url;
if (use_iframe) {
+ var embedded_iframe = document.getElementById('embedded_iframe');
+ embedded_iframe.parentNode.removeChild(embedded_iframe);
+
+ embedded_iframe = document.createElement('iframe');
+ embedded_iframe.id = 'embedded_iframe';
+ document.body.appendChild(embedded_iframe);
embedded_iframe.src = url;
} else {
- if (testing_window == undefined) {
- testing_window = window.open(url);
- } else {
- testing_window.location = url;
+ if (typeof testing_window != 'undefined') {
+ testing_window.close();
}
+ testing_window = window.open(url);
}
}
« 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