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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <!DOCTYPE HTML>
2 <body> 2 <script src="/js-test-resources/js-test.js"></script>
3 <p>Test EventSource with an event-stream with incorrect mime-type.</p> 3 <script src="script-tests/eventsource-bad-mime-type.js"></script>
4 <div id="result"></div>
5 <script>
6 function log(msg) {
7 document.getElementById("result").innerHTML += msg + "<br>";
8 }
9
10 if (window.testRunner) {
11 testRunner.dumpAsText();
12 testRunner.waitUntilDone();
13 }
14
15 var es = new EventSource("resources/bad-mime-type.asis");
16
17 es.onopen = function (evt) {
18 log("FAIL: got unexpected open event");
19 end();
20 };
21
22 es.onmessage = function (evt) {
23 log("FAIL: got unexpected message event");
24 end();
25 };
26
27 es.onerror = function () {
28 if (es.readyState == es.CLOSED)
29 log("PASS");
30 else
31 log("FAIL: invalid state");
32 end();
33 };
34
35 function end() {
36 es.close();
37 if (window.testRunner)
38 testRunner.notifyDone();
39 }
40
41 </script>
42 </body>
43 </html>
OLDNEW
« 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