X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FLayoutTests%2Ffast%2Fworkers%2Fresources%2Fshared-worker-name.js;h=21c703c5e1d63933d8a27fe386e51addceb54691;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=f700f9e4699bc4503a76c890f239820307572756;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/LayoutTests/fast/workers/resources/shared-worker-name.js b/src/third_party/WebKit/LayoutTests/fast/workers/resources/shared-worker-name.js index f700f9e..21c703c 100644 --- a/src/third_party/WebKit/LayoutTests/fast/workers/resources/shared-worker-name.js +++ b/src/third_party/WebKit/LayoutTests/fast/workers/resources/shared-worker-name.js @@ -60,6 +60,17 @@ function test3() function test4() { + // Creating a worker with an undefined name should match an existing worker with no name. + var worker = new SharedWorker('resources/shared-worker-common.js', undefined); + worker.port.postMessage("eval self.foo"); + worker.port.onmessage = function(event) { + shouldBeEqual("creating worker with an undefined name", event.data, "self.foo: 1234"); + nextTest(); + } +} + +function test5() +{ // Creating a worker with a different name should not be the same as a worker with no name. var worker = new SharedWorker('resources/shared-worker-common.js', 'name'); worker.port.postMessage("eval self.foo"); @@ -69,7 +80,7 @@ function test4() }; } -function test5() +function test6() { // Creating a worker for an alternate URL with no name should work. var worker = new SharedWorker('resources/shared-worker-common.js?url=1'); @@ -80,7 +91,7 @@ function test5() }; } -function test6() +function test7() { // Creating a worker for an alternate URL with empty name should work. var worker = new SharedWorker('resources/shared-worker-common.js?url=2', ''); @@ -91,7 +102,7 @@ function test6() }; } -function test7() +function test8() { // Make sure we can create a shared worker with name 'null'. try { @@ -108,7 +119,7 @@ function test7() } } -function test8() +function test9() { // Creating a worker with a null name should match an existing worker with name 'null' var worker = new SharedWorker('resources/shared-worker-common.js', null); @@ -119,36 +130,8 @@ function test8() } } -function test9() -{ - // Make sure we can create a shared worker with name 'undefined'. - try { - var worker = new SharedWorker('resources/shared-worker-common.js', 'undefined'); - testPassed("created SharedWorker with name 'undefined'"); - worker.port.postMessage("eval self.foo = 1111"); - worker.port.onmessage = function(event) { - shouldBeEqual("setting self.foo", event.data, "self.foo = 1111: 1111"); - nextTest(); - }; - } catch (e) { - testFailed("SharedWorker with name 'undefined' threw an exception: " + e); - done(); - } -} - function test10() { - // Creating a worker with an undefined name should match an existing worker with name 'undefined' - var worker = new SharedWorker('resources/shared-worker-common.js', undefined); - worker.port.postMessage("eval self.foo"); - worker.port.onmessage = function(event) { - shouldBeEqual("creating worker with an undefined name", event.data, "self.foo: 1111"); - nextTest(); - } -} - -function test11() -{ // Creating a worker with a specific name, the name attribute should be set to worker correctly. var worker = new SharedWorker('resources/shared-worker-common.js', "testingNameAttribute"); worker.port.postMessage("testingNameAttribute");