Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / websocket / workers / close-code-and-reason.html
index 384bdba..0c8c14d 100644 (file)
@@ -1,35 +1,7 @@
 <!DOCTYPE html>
-<html>
-<head>
 <script src="/js-test-resources/js-test.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
+<script>
 description("Test CloseEvent code and reason property in Worker.");
 
-window.jsTestIsAsync = true;
-
-function startsWith(str, prefix)
-{
-    return str.indexOf(prefix) == 0;
-}
-
-var worker = new Worker("resources/close-code-and-reason.js");
-worker.onmessage = function (event)
-{
-    var message = event.data;
-    if (startsWith(message, "PASS"))
-        testPassed(message);
-    else if (startsWith(message, "FAIL"))
-        testFailed(message)
-    else
-        debug(message);
-    if (message === "DONE")
-        finishJSTest();
-};
-
+startWorker("resources/close-code-and-reason.js");
 </script>
-</body>
-</html>