Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / workers / resources / worker-location.js
blob82e9e15efb206338b04d8e0cfb56af5626b940fc
1 function log(message)
3     document.getElementById("result").innerHTML += message + "<br>";
6 function gc()
8     if (window.GCController)
9         return GCController.collect();
11     for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
12         var s = new String("abc");
13     }
16 if (window.testRunner) {
17     testRunner.dumpAsText();
18     testRunner.waitUntilDone();
21 var worker = createWorker();
22 worker.postMessage("eval WorkerLocation");
23 worker.postMessage("eval typeof location");
24 worker.postMessage("eval location");
25 worker.postMessage("eval location.href");
26 worker.postMessage("eval location.origin");
27 worker.postMessage("eval location.protocol");
28 worker.postMessage("eval location.host");
29 worker.postMessage("eval location.hostname");
30 worker.postMessage("eval location.port");
31 worker.postMessage("eval location.pathname");
32 worker.postMessage("eval location.search");
33 worker.postMessage("eval location.hash");
34 worker.postMessage("eval foo//bar");
36 worker.onmessage = function(evt) {
37     if (!/foo\/\/bar/.test(evt.data))
38         log(evt.data.replace(new RegExp("/.*LayoutTests"), "<...>"));
39     else {
40         log("DONE");
41         if (window.testRunner)
42             testRunner.notifyDone();
43     }