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

Unified Diff: tools/testing/dart/browser_controller.dart

Issue 1871883002: Make Safari tests more robust. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« test_safari.sh ('K') | « tests/html/html.status ('k') | 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 a6d061cf9bf248ff2b0506c5877135ec14badd37..529ccaee61a5811fcd44810511bf7a9f1b338163 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -1462,31 +1462,18 @@ class BrowserTestingServer {
String getDriverPage(String browserId) {
+
+ // DO NOT SUBMIT: Should only happen when starting Safari, and ideally be
ahe 2016/04/08 12:56:53 Bill, I hope you have an idea for how to integrate
+ // async.
+ Process.runSync(
+ "/usr/bin/osascript",
+ ['-e', 'tell application "Safari" to activate']);
+
var errorReportingUrl =
"http://$localIp:${errorReportingServer.port}/$browserId";
String driverContent = """
<!DOCTYPE html><html>
<head>
- <style>
- body {
- margin: 0;
- }
- .box {
- overflow: hidden;
- overflow-y: auto;
- position: absolute;
- left: 0;
- right: 0;
- }
- .controller.box {
- height: 75px;
- top: 0;
- }
- .test.box {
- top: 75px;
- bottom: 0;
- }
- </style>
<title>Driving page</title>
<script type='text/javascript'>
var STATUS_UPDATE_INTERVAL = 10000;
@@ -1617,7 +1604,8 @@ class BrowserTestingServer {
embedded_iframe_div.removeChild(embedded_iframe);
embedded_iframe = document.createElement('iframe');
embedded_iframe.id = "embedded_iframe";
- embedded_iframe.style="width:100%;height:100%";
+ embedded_iframe.width='800px';
+ embedded_iframe.height='600px';
embedded_iframe_div.appendChild(embedded_iframe);
embedded_iframe.src = url;
} else {
@@ -1794,8 +1782,13 @@ class BrowserTestingServer {
Currently executing: <span id="currently_executing"></span><br>
Unhandled error: <span id="unhandled_error"></span>
</div>
+ <div>
+ Please keep this window visible at all times. Some browsers, Safari, in
+ particular, may pause JavaScript when not visible to conserve power
+ consumption and CPU resources.
+ </div>
<div id="embedded_iframe_div" class="test box">
- <iframe style="width:100%;height:100%;" id="embedded_iframe"></iframe>
+ <iframe id="embedded_iframe"></iframe>
</div>
</body>
</html>
« test_safari.sh ('K') | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698