http/tests/inspector/network/har/har-page.html should actually sort dumped cookies...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jun 2018 20:41:04 +0000 (20:41 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jun 2018 20:41:04 +0000 (20:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186137

Reviewed by Joseph Pecoraro.

JavaScript does not support comparison of String data types using the minus operator. Instead
implement the string comparator using relational operators and the identity operator.

* http/tests/inspector/network/har/har-page-expected.txt:
* http/tests/inspector/network/har/har-page.html:
* platform/gtk/TestExpectations: Unskip test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232413 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/har/har-page-expected.txt
LayoutTests/http/tests/inspector/network/har/har-page.html
LayoutTests/platform/gtk/TestExpectations

index c0cb6c2..f474b57 100644 (file)
@@ -1,3 +1,17 @@
+2018-06-01  Daniel Bates  <dabates@apple.com>
+
+        http/tests/inspector/network/har/har-page.html should actually sort dumped cookies by name
+        https://bugs.webkit.org/show_bug.cgi?id=186137
+
+        Reviewed by Joseph Pecoraro.
+
+        JavaScript does not support comparison of String data types using the minus operator. Instead
+        implement the string comparator using relational operators and the identity operator.
+
+        * http/tests/inspector/network/har/har-page-expected.txt:
+        * http/tests/inspector/network/har/har-page.html:
+        * platform/gtk/TestExpectations: Unskip test.
+
 2018-06-01  Youenn Fablet  <youenn@apple.com>
 
         http/tests/appcache/deferred-events.html is flaky due to console log messages
index b0dc45a..3d05c99 100644 (file)
@@ -540,16 +540,16 @@ HAR Page Test.
               "value": "http-only"
             },
             {
+              "name": "same-site-strict",
+              "value": "same-site-strict"
+            },
+            {
               "name": "simple",
               "value": "simple"
             },
             {
               "name": "with-expiration",
               "value": "with-expiration"
-            },
-            {
-              "name": "same-site-strict",
-              "value": "same-site-strict"
             }
           ],
           "headers": "<filtered>",
@@ -607,20 +607,20 @@ HAR Page Test.
               "value": "http-only"
             },
             {
-              "name": "simple",
-              "value": "simple"
-            },
-            {
-              "name": "with-expiration",
-              "value": "with-expiration"
-            },
-            {
               "name": "same-site-implicit-strict",
               "value": "same-site-implicit-strict"
             },
             {
               "name": "same-site-strict",
               "value": "same-site-strict"
+            },
+            {
+              "name": "simple",
+              "value": "simple"
+            },
+            {
+              "name": "with-expiration",
+              "value": "with-expiration"
             }
           ],
           "headers": "<filtered>",
@@ -678,14 +678,6 @@ HAR Page Test.
               "value": "http-only"
             },
             {
-              "name": "simple",
-              "value": "simple"
-            },
-            {
-              "name": "with-expiration",
-              "value": "with-expiration"
-            },
-            {
               "name": "same-site-implicit-strict",
               "value": "same-site-implicit-strict"
             },
@@ -696,6 +688,14 @@ HAR Page Test.
             {
               "name": "same-site-strict-because-invalid-SameSite-value",
               "value": "same-site-strict-because-invalid-SameSite-value"
+            },
+            {
+              "name": "simple",
+              "value": "simple"
+            },
+            {
+              "name": "with-expiration",
+              "value": "with-expiration"
             }
           ],
           "headers": "<filtered>",
index 2258c57..7c04d6b 100644 (file)
@@ -50,9 +50,12 @@ function test()
             return "<filtered>";
         }
 
-        // Sort cookies by name to make cookie order deterministic between test runs.
-        if (key === "cookies")
-            value.sort((a, b) => { return a.name - b.name; });
+        // Sort cookies by name to make cookie order deterministic between test runs. We assume
+        // that cookies have names that consist of only ASCII characters.
+        if (key === "cookies") {
+            value.sort((a, b) => { return a.name === b.name ? 0 : (a.name < b.name ? -1 : 1); });
+            return value;
+        }
 
         // Since cache may or may not be used, timing data may be variable.
         // NOTE: SSL should always be -1 for this test case.
index 14096b0..8ef16d8 100644 (file)
@@ -3407,8 +3407,6 @@ webkit.org/b/186100 css3/color-filters/color-filter-color-property-list-item.htm
 webkit.org/b/186100 css3/color-filters/color-filter-opacity.html [ ImageOnlyFailure ]
 webkit.org/b/186100 fast/hidpi/filters-turbulence.html [ ImageOnlyFailure ]
 
-webkit.org/b/186137 http/tests/inspector/network/har/har-page.html [ Failure ]
-
 webkit.org/b/186138 imported/mozilla/css-transitions/test_event-dispatch.html [ Failure ]
 
 webkit.org/b/186139 imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property.html [ Failure ]