RFR: 8255940: localStorage is null after window.close() [v3]

Jay Bhaskar duke at openjdk.java.net
Sun Feb 27 05:35:28 UTC 2022


On Fri, 25 Feb 2022 23:15:54 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Jay Bhaskar has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Change Dir Path and use local Dir and set data before clearing localstorage test
>>  - Merge branch 'PRLocalstorage' of https://github.com/jaybhaskar/jfx into PRLocalstorage
>>  - Merge branch 'master' into PRLocalstorage
>
> modules/javafx.web/src/test/java/test/javafx/scene/web/LocalStorageTest.java line 59:
> 
>> 57:     private static RandomAccessFile preLockedRaf;
>> 58:     private static FileLock preLockedLock;
>> 59:     private static final Random random = new Random();
> 
> These are not needed.

Agree

> modules/javafx.web/src/test/java/test/javafx/scene/web/LocalStorageTest.java line 112:
> 
>> 110:         final WebEngine webEngine = getEngine();
>> 111:         webEngine.setJavaScriptEnabled(true);
>> 112:         webEngine.setUserDataDirectory(LOCAL_STORAGE_DIR);
> 
> This should be done for all tests, not just this one. Remember that you shouldn't assume any particular order for the tests (tests are intended to be stateless).

Agree, done

> modules/javafx.web/src/test/java/test/javafx/scene/web/LocalStorageTest.java line 126:
> 
>> 124:             //get data
>> 125:             String s = (String) view.getEngine().executeScript("document.getElementById('key').innerText;");
>> 126:             assertEquals(s, "1001");
> 
> The arguments should be switched (expected comes first).

Agree , done

> modules/javafx.web/src/test/java/test/javafx/scene/web/LocalStorageTest.java line 137:
> 
>> 135:             view.getEngine().executeScript("test_local_storage_set();");
>> 136:             String s = (String) view.getEngine().executeScript("document.getElementById('key').innerText;");
>> 137:             assertEquals(s, "1001");
> 
> Switch arguments.

Agree, done

-------------

PR: https://git.openjdk.java.net/jfx/pull/703


More information about the openjfx-dev mailing list