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

Unified Diff: LayoutTests/http/tests/eventsource/eventsource-bad-mime-type.html

Issue 347043002: Rework EventSource tests for better Worker test coverage. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move out CORS tests Created 6 years, 6 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 | LayoutTests/http/tests/eventsource/eventsource-bad-mime-type-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/eventsource/eventsource-bad-mime-type.html
diff --git a/LayoutTests/http/tests/eventsource/eventsource-bad-mime-type.html b/LayoutTests/http/tests/eventsource/eventsource-bad-mime-type.html
index 74b767bd78ce6304512fe687e62ceeb63553b7e1..8258b0b177ebf5246fe6cc04e92a395a919278e3 100644
--- a/LayoutTests/http/tests/eventsource/eventsource-bad-mime-type.html
+++ b/LayoutTests/http/tests/eventsource/eventsource-bad-mime-type.html
@@ -1,43 +1,3 @@
-<html>
-<body>
-<p>Test EventSource with an event-stream with incorrect mime-type.</p>
-<div id="result"></div>
-<script>
-function log(msg) {
- document.getElementById("result").innerHTML += msg + "<br>";
-}
-
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-
-var es = new EventSource("resources/bad-mime-type.asis");
-
-es.onopen = function (evt) {
- log("FAIL: got unexpected open event");
- end();
-};
-
-es.onmessage = function (evt) {
- log("FAIL: got unexpected message event");
- end();
-};
-
-es.onerror = function () {
- if (es.readyState == es.CLOSED)
- log("PASS");
- else
- log("FAIL: invalid state");
- end();
-};
-
-function end() {
- es.close();
- if (window.testRunner)
- testRunner.notifyDone();
-}
-
-</script>
-</body>
-</html>
+<!DOCTYPE HTML>
+<script src="/js-test-resources/js-test.js"></script>
+<script src="script-tests/eventsource-bad-mime-type.js"></script>
« no previous file with comments | « no previous file | LayoutTests/http/tests/eventsource/eventsource-bad-mime-type-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698