<?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>52654</bug_id>
          
          <creation_ts>2011-01-18 12:56:48 -0800</creation_ts>
          <short_desc>Add a test that calling window.open with an empty URL does not trigger an assertion or cause a crash</short_desc>
          <delta_ts>2022-07-26 10:05:36 -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>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>LATER</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 name="Jessie Berlin">jberlin</reporter>
          <assigned_to name="Jessie Berlin">jberlin</assigned_to>
          <cc>abarth</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>aroben</cc>
    
    <cc>bfulgham</cc>
    
    <cc>eric</cc>
    
    <cc>jberlin</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>336025</commentid>
    <comment_count>0</comment_count>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-01-18 12:56:48 -0800</bug_when>
    <thetext>In http://trac.webkit.org/changeset/76040 I removed some asserts that were getting triggered by calling window.open with an empty URL, but failed to add a test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336029</commentid>
    <comment_count>1</comment_count>
      <attachid>79315</attachid>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-01-18 12:59:29 -0800</bug_when>
    <thetext>Created attachment 79315
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336031</commentid>
    <comment_count>2</comment_count>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-01-18 13:01:03 -0800</bug_when>
    <thetext>(Added the link to the bug to the ChangeLog)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336038</commentid>
    <comment_count>3</comment_count>
      <attachid>79315</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-01-18 13:08:32 -0800</bug_when>
    <thetext>Comment on attachment 79315
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=79315&amp;action=review

&gt; LayoutTests/fast/dom/Window/open-window-empty-url.html:1
&gt; +&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;

Just &lt;!DOCTYPE html&gt; should be enough. That&apos;s what HTML5 recommends.

&gt; LayoutTests/fast/dom/Window/open-window-empty-url.html:21
&gt; +    &lt;script type=&quot;text/javascript&quot;&gt;
&gt; +        if (window.layoutTestController) {
&gt; +            layoutTestController.dumpAsText();
&gt; +            layoutTestController.waitUntilDone();
&gt; +            layoutTestController.setCanOpenWindows();
&gt; +        }
&gt; +        var newWindow = window.open(&quot;&quot;);
&gt; +        newWindow.close();
&gt; +        document.getElementById(&quot;results&quot;).innerText = &quot;PASS: Calling window.open() with an empty URL did not trigger any assertions or cause any crashes.&quot;;
&gt; +        if (window.layoutTestController)
&gt; +            layoutTestController.notifyDone();
&gt; +    &lt;/script&gt;
&gt; +&lt;/body&gt;

Since the whole test proceeds synchronously (before the page has even finished loading), there&apos;s no need for waitUntilDone/notifyDone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336223</commentid>
    <comment_count>4</comment_count>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-01-18 17:07:50 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 79315 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=79315&amp;action=review
&gt; 
&gt; &gt; LayoutTests/fast/dom/Window/open-window-empty-url.html:1
&gt; &gt; +&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
&gt; 
&gt; Just &lt;!DOCTYPE html&gt; should be enough. That&apos;s what HTML5 recommends.

Done.

&gt; 
&gt; &gt; LayoutTests/fast/dom/Window/open-window-empty-url.html:21
&gt; &gt; +    &lt;script type=&quot;text/javascript&quot;&gt;
&gt; &gt; +        if (window.layoutTestController) {
&gt; &gt; +            layoutTestController.dumpAsText();
&gt; &gt; +            layoutTestController.waitUntilDone();
&gt; &gt; +            layoutTestController.setCanOpenWindows();
&gt; &gt; +        }
&gt; &gt; +        var newWindow = window.open(&quot;&quot;);
&gt; &gt; +        newWindow.close();
&gt; &gt; +        document.getElementById(&quot;results&quot;).innerText = &quot;PASS: Calling window.open() with an empty URL did not trigger any assertions or cause any crashes.&quot;;
&gt; &gt; +        if (window.layoutTestController)
&gt; &gt; +            layoutTestController.notifyDone();
&gt; &gt; +    &lt;/script&gt;
&gt; &gt; +&lt;/body&gt;
&gt; 
&gt; Since the whole test proceeds synchronously (before the page has even finished loading), there&apos;s no need for waitUntilDone/notifyDone.

Removed.

Thanks for the review!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336226</commentid>
    <comment_count>5</comment_count>
      <attachid>79315</attachid>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-01-18 17:14:25 -0800</bug_when>
    <thetext>Comment on attachment 79315
Patch

Committed in r76084
http://trac.webkit.org/changeset/76084</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336335</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-01-18 22:04:48 -0800</bug_when>
    <thetext>This test crashes on the bots.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336336</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-01-18 22:05:11 -0800</bug_when>
    <thetext>Build 23847 (r76085) was the first to show failures: set([u&apos;fast/dom/Window/open-window-empty-url.html&apos;])</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336337</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-01-18 22:09:41 -0800</bug_when>
    <thetext>Reverted r76084 for reason:

Crashes on the bots

Committed r76102: &lt;http://trac.webkit.org/changeset/76102&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336338</commentid>
    <comment_count>9</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-01-18 22:10:23 -0800</bug_when>
    <thetext>It&apos;s always sad to roll out a test case, but it seems the bug wasn&apos;t actually fixed before this test was added. :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336436</commentid>
    <comment_count>10</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-01-19 05:09:09 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; Reverted r76084 for reason:
&gt; 
&gt; Crashes on the bots
&gt; 
&gt; Committed r76102: &lt;http://trac.webkit.org/changeset/76102&gt;

Thanks for rolling it out. Which bots was it crashing on?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336461</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-01-19 06:09:00 -0800</bug_when>
    <thetext>http://trac.webkit.org/changeset/76084 might have broken Chromium Linux Release</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336640</commentid>
    <comment_count>12</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-01-19 10:54:20 -0800</bug_when>
    <thetext>Leopard and Snow Leopard iirc.  Sorry for not writing that in my rollout text.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>339174</commentid>
    <comment_count>13</comment_count>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-01-24 12:16:44 -0800</bug_when>
    <thetext>&lt;rdar://problem/8908391&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886795</commentid>
    <comment_count>14</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-26 09:44:13 -0700</bug_when>
    <thetext>I changed the test case from the patch into JS Fiddle:

Link - https://jsfiddle.net/sd65xt31/show

It does not trigger any crash in Safari 15.6 on macOS 12.5 and it just triggers &quot;Pop-up Blocker&quot; and then after it shows (after allowing):

___

Test that calling window.open(&quot;&quot;); does not trigger any assertions or cause any crashes.

PASS: Calling window.open() with an empty URL did not trigger any assertions or cause any crashes.

___

It is same across all other browsers (Chrome Canary 106 and Firefox Nightly 104). I think if we don&apos;t need to land this test case, since it works across all browsers - we can close this as &quot;RESOLVED CONFIGURATION CHANGED&quot;. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886805</commentid>
    <comment_count>15</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-26 10:05:36 -0700</bug_when>
    <thetext>This is about adding debug asserts.

At this point, I don&apos;t think keeping this 11 year old bug is the way to address this. If we have had a need to add an assertion in this code, we would have done it meanwhile. -&gt; Later.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>79315</attachid>
            <date>2011-01-18 12:59:29 -0800</date>
            <delta_ts>2011-01-18 17:14:25 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>addTestFor52654.patch</filename>
            <type>text/plain</type>
            <size>2333</size>
            <attacher name="Jessie Berlin">jberlin</attacher>
            
              <data encoding="base64">SW5kZXg6IExheW91dFRlc3RzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBMYXlvd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JyZXN1bHRzIj48L2Rpdj4KKyAgICA8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlw
dCI+CisgICAgICAgIGlmICh3aW5kb3cubGF5b3V0VGVzdENvbnRyb2xsZXIpIHsKKyAgICAgICAg
ICAgIGxheW91dFRlc3RDb250cm9sbGVyLmR1bXBBc1RleHQoKTsKKyAgICAgICAgICAgIGxheW91
dFRlc3RDb250cm9sbGVyLndhaXRVbnRpbERvbmUoKTsKKyAgICAgICAgICAgIGxheW91dFRlc3RD
b250cm9sbGVyLnNldENhbk9wZW5XaW5kb3dzKCk7CisgICAgICAgIH0KKyAgICAgICAgdmFyIG5l
d1dpbmRvdyA9IHdpbmRvdy5vcGVuKCIiKTsKKyAgICAgICAgbmV3V2luZG93LmNsb3NlKCk7Cisg
ICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJyZXN1bHRzIikuaW5uZXJUZXh0ID0gIlBB
U1M6IENhbGxpbmcgd2luZG93Lm9wZW4oKSB3aXRoIGFuIGVtcHR5IFVSTCBkaWQgbm90IHRyaWdn
ZXIgYW55IGFzc2VydGlvbnMgb3IgY2F1c2UgYW55IGNyYXNoZXMuIjsKKyAgICAgICAgaWYgKHdp
bmRvdy5sYXlvdXRUZXN0Q29udHJvbGxlcikKKyAgICAgICAgICAgIGxheW91dFRlc3RDb250cm9s
bGVyLm5vdGlmeURvbmUoKTsKKyAgICA8L3NjcmlwdD4KKzwvYm9keT4KKzwvaHRtbD4KKwo=
</data>

          </attachment>
      

    </bug>

</bugzilla>