| Index: tools/testing/dart/browser_controller.dart
|
| ===================================================================
|
| --- tools/testing/dart/browser_controller.dart (revision 25812)
|
| +++ tools/testing/dart/browser_controller.dart (working copy)
|
| @@ -54,6 +54,8 @@
|
| return new Chrome();
|
| } else if (name == 'safari') {
|
| return new Safari();
|
| + } else if (name.startsWith('ie')) {
|
| + return new IE();
|
| } else {
|
| throw "Non supported browser";
|
| }
|
| @@ -347,6 +349,44 @@
|
| String toString() => "Chrome";
|
| }
|
|
|
| +class IE extends Browser {
|
| +
|
| + static const String binary =
|
| + "c:\\Program Files\\Internet Explorer\\iexplore.exe";
|
| +
|
| + Future<String> getVersion() {
|
| + var args = ["query",
|
| + "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Internet Explorer",
|
| + "/v",
|
| + "version"];
|
| + return Process.run("reg", args).then((result) {
|
| + if (result.exitCode == 0) {
|
| + // The string we get back looks like this:
|
| + // HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer
|
| + // version REG_SZ 9.0.8112.16421
|
| + var findString = "REG_SZ";
|
| + var index = result.stdout.indexOf("REG_SZ") + findString.length;
|
| + if (index > 0) {
|
| + return result.stdout.substring(index).trim();
|
| + }
|
| + }
|
| + return "Could not get the version of internet explorer";
|
| + });
|
| + }
|
| +
|
| +
|
| + Future<bool> start(String url) {
|
| + _logEvent("Starting ie browser on: $url");
|
| + // Get the version and log that.
|
| + return getVersion().then((version) {
|
| + _logEvent("Got version: $version");
|
| + return startBrowser(binary, [url]);
|
| + });
|
| + }
|
| + String toString() => "IE";
|
| +}
|
| +
|
| +
|
| class AndroidChrome extends Browser {
|
| static const String viewAction = 'android.intent.action.VIEW';
|
| static const String mainAction = 'android.intent.action.MAIN';
|
| @@ -822,6 +862,9 @@
|
| DebugLogger.info("Handling non standard request to: "
|
| "${request.uri.path}");
|
| }
|
| + request.response.headers.set("Cache-Control", "no-cache, no-store, must-revalidate");
|
| + request.response.headers.set("Pragma", "no-cache");
|
| + request.response.headers.set("Expires", "0");
|
| request.response.write(textResponse);
|
| request.listen((_) {}, onDone: request.response.close);
|
| request.response.done.then((_) {
|
| @@ -942,6 +985,7 @@
|
| // URL#ID
|
| var split = this.responseText.split('#');
|
| var nextTask = split[0];
|
| +
|
| current_id = split[1];
|
| reportError('Done getting task : ' + elapsed);
|
| did_start = false;
|
|
|