Title: [272609] trunk/LayoutTests
Revision
272609
Author
[email protected]
Date
2021-02-09 13:51:43 -0800 (Tue, 09 Feb 2021)

Log Message

[LayoutTests] Convert xmlhttprequest php to Python (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=220995
<rdar://problem/73630008>

Unreviewed test fix.


* http/tests/media/user-gesture-preserved-across-xmlhttprequest.html: Lengthen timeouts, Python is slightly slower than PHP.
* http/tests/xmlhttprequest/resources/download-with-delay.py: Match iteration behavior to PHP script.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (272608 => 272609)


--- trunk/LayoutTests/ChangeLog	2021-02-09 21:30:26 UTC (rev 272608)
+++ trunk/LayoutTests/ChangeLog	2021-02-09 21:51:43 UTC (rev 272609)
@@ -1,3 +1,14 @@
+2021-02-09  Jonathan Bedard  <[email protected]>
+
+        [LayoutTests] Convert xmlhttprequest php to Python (Follow-up fix)
+        https://bugs.webkit.org/show_bug.cgi?id=220995
+        <rdar://problem/73630008>
+
+        Unreviewed test fix.
+
+        * http/tests/media/user-gesture-preserved-across-xmlhttprequest.html: Lengthen timeouts, Python is slightly slower than PHP.
+        * http/tests/xmlhttprequest/resources/download-with-delay.py: Match iteration behavior to PHP script.
+
 2021-02-09  Chris Dumez  <[email protected]>
 
         Disallow alert/confirm/prompt in cross-origin-domain subframes

Modified: trunk/LayoutTests/http/tests/media/user-gesture-preserved-across-xmlhttprequest.html (272608 => 272609)


--- trunk/LayoutTests/http/tests/media/user-gesture-preserved-across-xmlhttprequest.html	2021-02-09 21:30:26 UTC (rev 272608)
+++ trunk/LayoutTests/http/tests/media/user-gesture-preserved-across-xmlhttprequest.html	2021-02-09 21:51:43 UTC (rev 272609)
@@ -139,7 +139,7 @@
             switch (method) {
             case 'xhr':
                 consoleWrite(`sending XHR, delay = ${delay}`);
-                doXHR(delay, test.timeout || 0.6, () => runTest(test));
+                doXHR(delay, test.timeout || 1.0, () => runTest(test));
                 break;
             case 'timeout':
                 consoleWrite(`setting timeout, delay = ${delay}`);
@@ -147,11 +147,11 @@
                 break;
             case 'fetch':
                 consoleWrite(`fetching, delay = ${delay}`);
-                doFetch(delay, test.timeout || 0.6, () => runTest(test));
+                doFetch(delay, test.timeout || 1.0, () => runTest(test));
                 break;
             case 'fetchblob':
                 consoleWrite(`fetching blob, delay = ${delay}`);
-                doFetchBlob(delay, test.timeout || 0.6, () => runTest(test));
+                doFetchBlob(delay, test.timeout || 1.0, () => runTest(test));
                 break;
             case 'promise':
                 consoleWrite(`promise`);
@@ -185,7 +185,7 @@
                 action : 'play',  withkey : false,  success : false,  sequence : ['100 XHR', '100 timeout'] },
 
             { title : 'gesture -> "long" XHR -> video playback: should fail',
-                action : 'play',  withkey : true,  success : false,  timeout : 0.1, sequence : ['300 XHR'] },
+                action : 'play',  withkey : true,  success : false,  timeout : 0.2, sequence : ['300 XHR'] },
 
             { title : 'gesture -> fetch -> window.open: should fail because Fetch only propagates user gesture for media',
                 action : 'popup', withkey : true,  success : false,  sequence : ['100 Fetch'] },
@@ -194,7 +194,7 @@
                 action : 'play',  withkey : true,  success : true,  sequence : ['100 Fetch'] },
 
             { title : 'gesture -> "long" Fetch -> video playback: should fail',
-                action : 'play',  withkey : true,  success : false,  timeout : 0.1, sequence : ['300 Fetch'] },
+                action : 'play',  withkey : true,  success : false,  timeout : 0.2, sequence : ['300 Fetch'] },
 
             { title : 'no gesture -> fetch -> video playback: should fail',
                 action : 'play',  withkey : false,  success : false,  sequence : ['100 Fetch'] },
@@ -206,7 +206,7 @@
                 action : 'play',  withkey : true,  success : true,  sequence : ['100 FetchBlob'] },
 
             { title : 'gesture -> fetch -> "long" blob -> video playback: should fail',
-                action : 'play',  withkey : true,  success : false,  timeout : 0.1, sequence : ['300 FetchBlob'] },
+                action : 'play',  withkey : true,  success : false,  timeout : 0.2, sequence : ['300 FetchBlob'] },
 
             { title : 'no gesture -> fetch -> blob -> video playback: should fail',
                 action : 'play',  withkey : false,  success : false,  sequence : ['100 FetchBlob'] },

Modified: trunk/LayoutTests/http/tests/xmlhttprequest/resources/download-with-delay.py (272608 => 272609)


--- trunk/LayoutTests/http/tests/xmlhttprequest/resources/download-with-delay.py	2021-02-09 21:30:26 UTC (rev 272608)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/resources/download-with-delay.py	2021-02-09 21:51:43 UTC (rev 272609)
@@ -21,7 +21,7 @@
 print(delay)
 
 for i in range(iteration):
-    print(i)
+    print(i + 1)
     print('foobar')
     sys.stdout.flush()
     time.sleep(delay / 1000)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to