<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>231586</bug_id>
          
          <creation_ts>2021-10-12 09:41:43 -0700</creation_ts>
          <short_desc>[ iOS ] http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py is a flaky failure</short_desc>
          <delta_ts>2021-10-21 09:50:06 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ayumi_kojima</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>cdumez</cc>
    
    <cc>katherine_cheney</cc>
    
    <cc>webkit-bot-watchers-bugzilla</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wilander</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1803185</commentid>
    <comment_count>0</comment_count>
    <who name="">ayumi_kojima</who>
    <bug_when>2021-10-12 09:41:43 -0700</bug_when>
    <thetext>http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py

Is a flaky failure on iOS (15).

History: https://results.webkit.org/?suite=layout-tests&amp;test=http%2Ftests%2FresourceLoadStatistics%2Fswitch-session-on-navigation-to-prevalent-without-interaction.py

Result page: https://build.webkit.org/results/Apple-iPadOS-15-Simulator-Debug-WK2-Tests/r283966%20(61)/results.html

Diff:

--- /Volumes/Data/worker/ipados-simulator-15-debug-tests-wk2/build/layout-test-results/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction-expected.txt
+++ /Volumes/Data/worker/ipados-simulator-15-debug-tests-wk2/build/layout-test-results/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction-actual.txt
@@ -5,8 +5,9 @@
 
 PASS Should have and has the session cookie.
 PASS Should have and has the persistent cookie.
-PASS Origin has isolated session.
+FAIL Origin has no isolated session.
 PASS successfullyParsed is true
+Some tests failed.
 
 TEST COMPLETE</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1803186</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-10-12 09:43:54 -0700</bug_when>
    <thetext>&lt;rdar://problem/84151527&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1803188</commentid>
    <comment_count>2</comment_count>
    <who name="">ayumi_kojima</who>
    <bug_when>2021-10-12 09:48:44 -0700</bug_when>
    <thetext>Marked test expectations https://trac.webkit.org/changeset/283989/webkit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1803216</commentid>
    <comment_count>3</comment_count>
    <who name="">ayumi_kojima</who>
    <bug_when>2021-10-12 10:34:37 -0700</bug_when>
    <thetext>I was not able to reproduce the failure locally using run-webkit-tests --ios-simulator --iterations 50 --exit-after-n-failures 1 http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py --force</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1803304</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-10-12 12:23:32 -0700</bug_when>
    <thetext>Based on the Apache Access log, I think we fail on step 1:
case &quot;#step1&quot;:
                setSessionCookie();
                setPersistentCookie();
                checkCookies(true, true);
                if (testRunner.hasStatisticsIsolatedSession(prevalentOrigin))
                    testPassed(&quot;Origin has isolated session.&quot;);
                else {
                    testFailed(&quot;Origin has no isolated session.&quot;);
                    setEnableFeature(false, finishJSTest);
                }
                document.location.href = nonPrevalentOrigin + &quot;/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py#step2&quot;;
                break;


I am unclear why the session would not be recognized as isolated, since sessions are isolated unconditionally nowadays. I could only see 2 reasons:
1. We have not done any loads for that origin yet. This seems unlikely since the origin in question is &quot;http://127.0.0.1:8000&quot; and we should have just loaded the main resource of the test from this origin.
2. Something is clearing the isolated session. I do see there is a NetworkSessionCocoa::clearIsolatedSessions() for e.g.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1803476</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-10-12 15:29:13 -0700</bug_when>
    <thetext>I haven&apos;t been able to reproduce on iOS simulator so far and I currently don&apos;t have any idea of how this could fail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1807223</commentid>
    <comment_count>6</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-10-21 09:50:06 -0700</bug_when>
    <thetext>This test no longer exists. It was reverted.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>