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

Unified Diff: LayoutTests/http/tests/websocket/workers/close-before-open.html

Issue 211093005: [WebSocket] Add close-before-open layout test for workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed #2 Created 6 years, 9 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/websocket/workers/close-before-open-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/websocket/workers/close-before-open.html
diff --git a/LayoutTests/http/tests/websocket/workers/close-before-open.html b/LayoutTests/http/tests/websocket/workers/close-before-open.html
new file mode 100644
index 0000000000000000000000000000000000000000..a9b7b2d9dfd332bac7d474844032122fc58c29af
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/workers/close-before-open.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script src="/js-test-resources/testharness.js"></script>
+<script src="/js-test-resources/testharnessreport.js"></script>
+<script type="text/javascript">
+
+var test = async_test("Test that an error is shown on the console when close() is called on a WebSocket synchronously right after it's constructed.");
+test.step(function()
+{
+ var worker = new Worker("resources/close-before-open.js");
+ worker.onmessage = test.step_func(function(evt)
+ {
+ assert_equals(evt.data, "DONE", "evt.data");
+ test.done();
+ });
+});
+
+</script>
+</head>
+<body>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/http/tests/websocket/workers/close-before-open-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698