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

Unified Diff: test/runner/browser/internet_explorer_test.dart

Issue 1088933006: Add IE support. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 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 | « lib/src/runner/browser/server.dart ('k') | test/runner/runner_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/browser/internet_explorer_test.dart
diff --git a/test/runner/browser/safari_test.dart b/test/runner/browser/internet_explorer_test.dart
similarity index 56%
copy from test/runner/browser/safari_test.dart
copy to test/runner/browser/internet_explorer_test.dart
index 29c7b80ecefc3c787556c5c88d86f62e94a441aa..47c7d09fa716ea40a662b940c183c338f4137f9a 100644
--- a/test/runner/browser/safari_test.dart
+++ b/test/runner/browser/internet_explorer_test.dart
@@ -2,12 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-@TestOn("vm && mac-os")
+@TestOn("vm && windows")
import 'dart:async';
import 'package:test/test.dart';
-import 'package:test/src/runner/browser/safari.dart';
+import 'package:test/src/runner/browser/internet_explorer.dart';
import 'package:test/src/util/io.dart';
import 'package:shelf/shelf.dart' as shelf;
import 'package:shelf/shelf_io.dart' as shelf_io;
@@ -69,75 +69,36 @@ void main() {
webSockets = null;
});
- test("starts Safari with the given URL", () {
+ test("starts IE with the given URL", () {
javaScript = '''
var webSocket = new WebSocket(window.location.href.replace("http://", "ws://"));
webSocket.addEventListener("open", function() {
webSocket.send("loaded!");
});
''';
- var safari = new Safari(baseUrlForAddress(server.address, server.port));
+ var ie = new InternetExplorer(
+ baseUrlForAddress(server.address, server.port));
return webSockets.first.then((webSocket) {
return webSocket.first.then(
(message) => expect(message, equals("loaded!")));
- }).whenComplete(safari.close);
- });
-
- test("doesn't preserve state across runs", () {
- javaScript = '''
-localStorage.setItem("data", "value");
-
-var webSocket = new WebSocket(window.location.href.replace("http://", "ws://"));
-webSocket.addEventListener("open", function() {
- webSocket.send("done");
-});
-''';
- var safari = new Safari(baseUrlForAddress(server.address, server.port));
-
- var first = true;
- webSockets.listen(expectAsync((webSocket) {
- if (first) {
- // The first request will set local storage data. We can't kill the
- // old safari and start a new one until we're sure that that has
- // finished.
- webSocket.first.then((_) {
- safari.close();
-
- javaScript = '''
-var webSocket = new WebSocket(window.location.href.replace("http://", "ws://"));
-webSocket.addEventListener("open", function() {
- webSocket.send(localStorage.getItem("data"));
-});
-''';
- safari = new Safari(baseUrlForAddress(server.address, server.port));
- first = false;
- });
- } else {
- // The second request will return the local storage data. This should
- // be null, indicating that no data was saved between runs.
- expect(
- webSocket.first
- .then((message) => expect(message, equals('null')))
- .whenComplete(safari.close),
- completes);
- }
- }, count: 2));
+ }).whenComplete(ie.close);
});
});
test("a process can be killed synchronously after it's started", () {
return shelf_io.serve(expectAsync((_) {}, count: 0), 'localhost', 0)
.then((server) {
- var safari = new Safari(baseUrlForAddress(server.address, server.port));
- return safari.close().whenComplete(server.close);
+ var ie = new InternetExplorer(
+ baseUrlForAddress(server.address, server.port));
+ return ie.close().whenComplete(server.close);
});
});
test("reports an error in onExit", () {
- var safari = new Safari("http://dart-lang.org",
+ var ie = new InternetExplorer("http://dart-lang.org",
executable: "_does_not_exist");
- expect(safari.onExit, throwsA(isApplicationException(startsWith(
- "Failed to start Safari: $noSuchFileMessage"))));
+ expect(ie.onExit, throwsA(isApplicationException(startsWith(
+ "Failed to start Internet Explorer: $noSuchFileMessage"))));
});
}
« no previous file with comments | « lib/src/runner/browser/server.dart ('k') | test/runner/runner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698