Internet Explorer somehow caches values of person.json and people.json from previous runs. Let's use unique names to prevent that.
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 14 Dec 2014 16:29:46 +0100
changeset 17500b4afadbd494
parent 1749 0417c5f323fd
child 1751 f91eb8500d18
Internet Explorer somehow caches values of person.json and people.json from previous runs. Let's use unique names to prevent that.
.hgignore
javaquery/api/src/test/java/org/apidesign/bck2brwsr/htmlpage/JSONTest.java
pom.xml
     1.1 --- a/.hgignore	Mon Dec 08 22:13:18 2014 +0100
     1.2 +++ b/.hgignore	Sun Dec 14 16:29:46 2014 +0100
     1.3 @@ -1,4 +1,9 @@
     1.4 -^target/.*
     1.5 -.*/target/.*
     1.6 -.*orig$
     1.7 -.*~
     1.8 +^target/.*
     1.9 +.*/target/.*
    1.10 +.*orig$
    1.11 +.*~
    1.12 +\.orig\..*$
    1.13 +\.orig$
    1.14 +\.chg\..*$
    1.15 +\.rej$
    1.16 +\.conflict\~$
     2.1 --- a/javaquery/api/src/test/java/org/apidesign/bck2brwsr/htmlpage/JSONTest.java	Mon Dec 08 22:13:18 2014 +0100
     2.2 +++ b/javaquery/api/src/test/java/org/apidesign/bck2brwsr/htmlpage/JSONTest.java	Sun Dec 14 16:29:46 2014 +0100
     2.3 @@ -17,7 +17,6 @@
     2.4   */
     2.5  package org.apidesign.bck2brwsr.htmlpage;
     2.6  
     2.7 -import java.util.Arrays;
     2.8  import java.util.Iterator;
     2.9  import org.apidesign.bck2brwsr.core.JavaScriptBody;
    2.10  import org.apidesign.bck2brwsr.htmlpage.api.OnReceive;
    2.11 @@ -173,15 +172,17 @@
    2.12      
    2.13      @Http(@Http.Resource(
    2.14          content = "{'firstName': 'Sitar', 'sex': 'MALE'}", 
    2.15 -        path="/person.json", 
    2.16 +        path="/person33.json", 
    2.17          mimeType = "application/json"
    2.18      ))
    2.19      @BrwsrTest public void loadAndParseJSON() throws InterruptedException {
    2.20 +        try { throw new Exception(); } catch (Exception ex) {
    2.21 +        }
    2.22          if (js == null) {
    2.23              js = new JSONik();
    2.24              js.applyBindings();
    2.25  
    2.26 -            js.fetch("person.json");
    2.27 +            js.fetch("person33.json");
    2.28          }
    2.29      
    2.30          Person p = js.getFetched();
    2.31 @@ -200,7 +201,7 @@
    2.32      
    2.33      @Http(@Http.Resource(
    2.34          content = "$0({'firstName': 'Mitar', 'sex': 'MALE'})", 
    2.35 -        path="/person.json", 
    2.36 +        path="/person22.json", 
    2.37          mimeType = "application/javascript",
    2.38          parameters = { "callme" }
    2.39      ))
    2.40 @@ -213,7 +214,7 @@
    2.41              js = new JSONik();
    2.42              js.applyBindings();
    2.43  
    2.44 -            js.fetchViaJSONP("person.json");
    2.45 +            js.fetchViaJSONP("person22.json");
    2.46          }
    2.47      
    2.48          Person p = js.getFetched();
    2.49 @@ -237,7 +238,7 @@
    2.50      
    2.51      @Http(@Http.Resource(
    2.52          content = "{'firstName': 'Sitar', 'sex': 'MALE'}", 
    2.53 -        path="/person.json", 
    2.54 +        path="/person15.json", 
    2.55          mimeType = "application/json"
    2.56      ))
    2.57      @BrwsrTest public void loadAndParseJSONSentToArray() throws InterruptedException {
    2.58 @@ -245,7 +246,7 @@
    2.59              js = new JSONik();
    2.60              js.applyBindings();
    2.61  
    2.62 -            js.fetchArray("person.json");
    2.63 +            js.fetchArray("person15.json");
    2.64          }
    2.65          
    2.66          Person p = js.getFetched();
    2.67 @@ -260,7 +261,7 @@
    2.68      
    2.69      @Http(@Http.Resource(
    2.70          content = "[{'firstName': 'Gitar', 'sex': 'FEMALE'}]", 
    2.71 -        path="/person.json", 
    2.72 +        path="/person5.json", 
    2.73          mimeType = "application/json"
    2.74      ))
    2.75      @BrwsrTest public void loadAndParseJSONArraySingle() throws InterruptedException {
    2.76 @@ -268,7 +269,7 @@
    2.77              js = new JSONik();
    2.78              js.applyBindings();
    2.79          
    2.80 -            js.fetch("person.json");
    2.81 +            js.fetch("person5.json");
    2.82          }
    2.83          
    2.84          Person p = js.getFetched();
    2.85 @@ -309,7 +310,7 @@
    2.86      
    2.87      @Http(@Http.Resource(
    2.88          content = "{'age':[1, 2, 3]}", 
    2.89 -        path="/people.json", 
    2.90 +        path="/people8.json", 
    2.91          mimeType = "application/json"
    2.92      ))
    2.93      @BrwsrTest public void loadAndParseArrayOfIntegers() throws InterruptedException {
    2.94 @@ -317,7 +318,7 @@
    2.95              js = new JSONik();
    2.96              js.applyBindings();
    2.97          
    2.98 -            js.fetchPeopleAge("people.json");
    2.99 +            js.fetchPeopleAge("people8.json");
   2.100          }
   2.101          
   2.102          if (0 == js.getFetchedCount()) {
   2.103 @@ -336,7 +337,7 @@
   2.104      
   2.105      @Http(@Http.Resource(
   2.106          content = "{'sex':['FEMALE', 'MALE', 'MALE']}", 
   2.107 -        path="/people.json", 
   2.108 +        path="/people11.json", 
   2.109          mimeType = "application/json"
   2.110      ))
   2.111      @BrwsrTest public void loadAndParseArrayOfEnums() throws InterruptedException {
   2.112 @@ -344,7 +345,7 @@
   2.113              js = new JSONik();
   2.114              js.applyBindings();
   2.115          
   2.116 -            js.fetchPeopleSex("people.json");
   2.117 +            js.fetchPeopleSex("people11.json");
   2.118          }
   2.119          
   2.120          if (0 == js.getFetchedCount()) {
   2.121 @@ -363,14 +364,14 @@
   2.122          content = "[{'firstName': 'Gitar', 'sex': 'FEMALE'},"
   2.123          + "{'firstName': 'Peter', 'sex': 'MALE'}"
   2.124          + "]", 
   2.125 -        path="/person.json", 
   2.126 +        path="/person13.json", 
   2.127          mimeType = "application/json"
   2.128      ))
   2.129      @BrwsrTest public void loadAndParseJSONArray() throws InterruptedException {
   2.130          if (js == null) {
   2.131              js = new JSONik();
   2.132              js.applyBindings();
   2.133 -            js.fetchArray("person.json");
   2.134 +            js.fetchArray("person13.json");
   2.135          }
   2.136          
   2.137          
     3.1 --- a/pom.xml	Mon Dec 08 22:13:18 2014 +0100
     3.2 +++ b/pom.xml	Sun Dec 14 16:29:46 2014 +0100
     3.3 @@ -15,7 +15,7 @@
     3.4        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     3.5        <netbeans.version>RELEASE80</netbeans.version>
     3.6        <license>COPYING</license>
     3.7 -      <net.java.html.version>1.0</net.java.html.version>
     3.8 +      <net.java.html.version>2.0-SNAPSHOT</net.java.html.version>
     3.9        <netbeans.compile.on.save>none</netbeans.compile.on.save>
    3.10    </properties>
    3.11    <modules>