| Index: third_party/WebKit/LayoutTests/storage/domstorage/events/resources/eventTestHarness.js
|
| diff --git a/third_party/WebKit/LayoutTests/storage/domstorage/events/resources/eventTestHarness.js b/third_party/WebKit/LayoutTests/storage/domstorage/events/resources/eventTestHarness.js
|
| index 476cce58fee28029918ae502cd6e779487665aaa..f42a749ff84d3da94f8fb2d879b335b56711c970 100644
|
| --- a/third_party/WebKit/LayoutTests/storage/domstorage/events/resources/eventTestHarness.js
|
| +++ b/third_party/WebKit/LayoutTests/storage/domstorage/events/resources/eventTestHarness.js
|
| @@ -1,21 +1,14 @@
|
| -if (window.testRunner) {
|
| - testRunner.dumpAsText();
|
| - testRunner.waitUntilDone();
|
| -}
|
| +var jsTestIsAsync = true;
|
|
|
| iframe = document.createElement("IFRAME");
|
| -iframe.src = "about:blank";
|
| +iframe.src = 'about:blank';
|
| document.body.appendChild(iframe);
|
| -iframe.contentWindow.document.body.innerText = "Nothing to see here.";
|
|
|
| storageEventList = new Array();
|
| -iframe.contentWindow.onstorage = function (e) {
|
| - window.parent.storageEventList.push(e);
|
| -}
|
|
|
| function runAfterNStorageEvents(callback, expectedNumEvents)
|
| {
|
| - countStorageEvents(callback, expectedNumEvents, 0)
|
| + countStorageEvents(callback, expectedNumEvents, 0);
|
| }
|
|
|
| function countStorageEvents(callback, expectedNumEvents, times)
|
| @@ -31,36 +24,23 @@ function countStorageEvents(callback, expectedNumEvents, times)
|
| } else if (times > 50) {
|
| testFailed("Timeout: only got " + currentCount + ", expected " + expectedNumEvents + " events");
|
| callback();
|
| - } else
|
| - countStorageEvents(callback, expectedNumEvents, times+1)
|
| + } else {
|
| + countStorageEvents(callback, expectedNumEvents, times+1);
|
| + }
|
| }
|
| setTimeout(onTimeout, 20);
|
| }
|
|
|
| function testStorages(testCallback)
|
| {
|
| - // When we're done testing LocalStorage, this is run.
|
| - function allDone()
|
| - {
|
| - debug("");
|
| - debug("");
|
| - window.successfullyParsed = true;
|
| - isSuccessfullyParsed();
|
| - debug("");
|
| - localStorage.clear();
|
| - sessionStorage.clear();
|
| - if (window.testRunner)
|
| - testRunner.notifyDone()
|
| - }
|
| -
|
| // When we're done testing with SessionStorage, this is run.
|
| function runLocalStorage()
|
| {
|
| debug("");
|
| debug("");
|
| - testCallback("localStorage", allDone);
|
| + testCallback("localStorage", finishJSTest);
|
| }
|
|
|
| - // First run the test with SessionStorage.
|
| + // First run the test with SessionStorage.
|
| testCallback("sessionStorage", runLocalStorage);
|
| }
|
|
|