Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / workers / worker-structure-message.html
blob10749affbe128bc6b3081b0a5e960b2d06fec884
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>Test that pages and workers can send Structure Message to one another.</p>
5 <p>On success, you will see a series of "PASS" messages, followed by "DONE".</p>
6 <div id=result></div>
7 <script>
8 function log(message)
10 document.getElementById("result").innerHTML += message + "<br>";
13 if (window.testRunner) {
14 testRunner.dumpAsText();
15 testRunner.waitUntilDone();
18 var worker = new Worker("resources/worker-structure-message.js");
19 worker.onmessage = function(evt) {
20 log(evt.data);
21 if (evt.data.indexOf("FAIL") == 0) {
22 done();
24 worker.onmessage = function(evt) {
25 if (evt.data.operation == 'find-edges' &&
26 ArrayBuffer.prototype.isPrototypeOf(evt.data.input) &&
27 evt.data.input.byteLength == 20 &&
28 evt.data.threshold == 0.6) {
29 log("PASS: Receive correct structure message from Worker.");
31 else
32 log("FAIL: Receive error structure message from Worker.");
33 done();
37 var buf = new ArrayBuffer(20);
38 worker.postMessage({
39 operation: 'find-edges',
40 input: buf,
41 threshold: 0.6
42 });
44 function done()
46 log("DONE");
47 if (window.testRunner)
48 testRunner.notifyDone();
51 </script>
52 </body>
53 </html>