Changeset 237811 in webkit


Ignore:
Timestamp:
Nov 5, 2018 9:54:22 AM (5 years ago)
Author:
Chris Dumez
Message:

Resync html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name WPT tests
https://bugs.webkit.org/show_bug.cgi?id=191214

Reviewed by Geoff Garen.

Resync html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name WPT tests from
upstream c583bcd7eb.

  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01-expected.txt:
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html:
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window.js: Added.

(test.frame.contentWindow.onpagehide):
(test.frame.contentDocument.onvisibilitychange):
(test.frame.contentWindow.onbeforeunload):
(test.frame.contentWindow.onunload):
(test):
(async_test):

  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/non_automated/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt:
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html:
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/message-opener.html:
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/w3c-import.log:
Location:
trunk/LayoutTests
Files:
4 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r237798 r237811  
     12018-11-05  Chris Dumez  <cdumez@apple.com>
     2
     3        Resync html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name WPT tests
     4        https://bugs.webkit.org/show_bug.cgi?id=191214
     5
     6        Reviewed by Geoff Garen.
     7
     8        Resync html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name WPT tests from
     9        upstream c583bcd7eb.
     10
     11        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01-expected.txt:
     12        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html:
     13        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window-expected.txt: Added.
     14        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window.html: Added.
     15        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window.js: Added.
     16        (test.frame.contentWindow.onpagehide):
     17        (test.frame.contentDocument.onvisibilitychange):
     18        (test.frame.contentWindow.onbeforeunload):
     19        (test.frame.contentWindow.onunload):
     20        (test):
     21        (async_test):
     22        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/non_automated/w3c-import.log:
     23        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt:
     24        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html:
     25        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/message-opener.html:
     26        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/w3c-import.log:
     27        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/w3c-import.log:
     28
    1292018-11-05  Ali Juma  <ajuma@chromium.org>
    230
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01-expected.txt

    r204844 r237811  
    11
    22PASS first argument: absolute url
    3 PASS first argument: empty url
     3FAIL first argument: empty url assert_equals: win.document.charset expected "UTF-8" but got "windows-1252"
    44PASS second argument: passing a non-empty name
    55PASS second argument: setting name after opening
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html

    r204844 r237811  
    2121  this.add_cleanup(function() { win.close(); });
    2222  assert_equals(win.location.href, 'about:blank', 'win.location.href');
     23  assert_equals(win.document.charset, 'UTF-8', 'win.document.charset');
    2324}, 'first argument: empty url');
    2425
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/non_automated/w3c-import.log

    r215822 r237811  
    22Do NOT modify these tests directly in WebKit.
    33Instead, create a pull request on the WPT github:
    4         https://github.com/w3c/web-platform-tests
     4        https://github.com/web-platform-tests/wpt
    55
    66Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt

    r237002 r237811  
    11
    22PASS tokenization should skip window features separators before `name`
    3 FAIL feature `name` should be converted to ASCII lowercase assert_equals: "noopener=NOOPENER" should activate feature "noopener" expected null but got object "[object Window]"
     3PASS feature `name` should be converted to ASCII lowercase
    44PASS after `name`, tokenization should skip window features separators that are not "=" or ","
    5 FAIL Tokenizing should ignore window feature separators except "," after initial "=" and before value assert_equals: "noopener
    6 =\r noopener," should activate feature "noopener" expected null but got object "[object Window]"
    7 FAIL Tokenizing should read characters until first window feature separator as `value` assert_equals: "noopener=noopener" should set "noopener" expected null but got object "[object Window]"
    8 FAIL "noopener" should be based on name (key), not value assert_equals: "noopener=false" should activate feature "noopener" expected null but got object "[object Window]"
     5PASS Tokenizing should ignore window feature separators except "," after initial "=" and before value
     6PASS Tokenizing should read characters until first window feature separator as `value`
     7PASS Integer values other than 0 should activate the feature
     8PASS Integer value of 0 should not activate the feature
    99PASS invalid feature names should not tokenize as "noopener"
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html

    r215945 r237811  
    4141    '  NOopener',
    4242    '=NOOPENER',
    43     'noopener=NOOPENER', // => ('noopener', 'noopener')
    44     'NOOPENER=noopener' // => ('noopener', 'noopener')
     43    'noopener=1',
     44    'NOOPENER=1',
     45    'NOOPENER=yes',
     46    'noopener=YES',
    4547  ];
    4648  featureVariants.forEach(feature => {
     
    8385    'noopener=\n ,',
    8486    'noopener = \t ,',
    85     'noopener\n=\r noopener,', // => ('noopener', 'noopener')
     87    'noopener\n=\r 1,', // => ('noopener', '1')
    8688    'noopener=,yes', // => ('noopener'), ('yes')
    87     'noopener= foo=,', // => ('noopener', 'foo')
     89    'noopener= yes=,', // => ('noopener', 'yes')
    8890    'noopener = \u000Cyes' // => ('noopener', 'yes')
    8991  ];
     
    9799  // Tokenizing `value` should collect any non-separator code points until first separator
    98100  var featureVariants = [
    99     'noopener=noopener', // => ('noopener', 'noopener')
     101    'noopener=1', // => ('noopener', 'noopener')
    100102    'noopener=yes', // => ('noopener', 'yes')
    101103    'noopener = yes ,', // => ('noopener', 'yes')
     
    104106    'noopener=yes\ts', // => ('noopener', 'yes'), ('s', '')
    105107    'noopener==', // => ('noopener', '')
    106     'noopener=0\n,', // => ('noopener', '0')
     108    'noopener=1\n,', // => ('noopener', '1')
    107109    '==noopener===', // => ('noopener', '')
    108110    'noopener==\u000C' // => ('noopener', '')
     
    115117
    116118test (t => {
    117   // If tokenizedFeatures contains an entry with the key "noopener"...disown opener
    118   // i.e. `value` should be irrelevant
    119119  var featureVariants = [
    120     'noopener=false',
    121     ',noopener=0, ',
    122     'foo=bar,noopener=noopener,',
    123     'noopener=true',
    124     'noopener=foo\nbar\t'
     120    'noopener=1',
     121    'noopener=2',
     122    'noopener=12345',
     123    'noopener=1.5',
     124    'noopener=-1',
    125125  ];
    126126  featureVariants.forEach(feature => {
     
    128128    assert_equals(win, null, `"${feature}" should activate feature "noopener"`);
    129129  });
    130 }, '"noopener" should be based on name (key), not value');
     130}, 'Integer values other than 0 should activate the feature');
     131
     132test (t => {
     133  var featureVariants = [
     134    'noopener=0',
     135    'noopener=0.5',
     136    'noopener=error',
     137  ];
     138  featureVariants.forEach(feature => {
     139    var win = window.open(windowURL, '', feature);
     140    assert_not_equals(win, null, `"${feature}" should NOT activate feature "noopener"`);
     141  });
     142}, 'Integer value of 0 should not activate the feature');
    131143
    132144test (t => {
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/message-opener.html

    r215822 r237811  
    22<script>
    33var prefixedMessage = new PrefixedMessageResource();
    4 window.addEventListener('load', () => {
     4var max = 50, attempts = 0;
     5function sendCoordinates() {
     6  // Certain windowing systems position windows asynchronously.
     7  // As a result, the window may not be positioned yet when the
     8  // load event fires. To accommodate this, allow waiting up to
     9  // 5 seconds for positioning to take place.
     10  if (!window.screenX && !window.screenY && ++attempts < max) {
     11    setTimeout(sendCoordinates, 100);
     12    return;
     13  }
    514  prefixedMessage.postToOpener({
    615    left: window.screenX,
     
    918    height: window.innerHeight
    1019  });
    11 });
     20}
     21window.addEventListener('load', sendCoordinates);
    1222</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/w3c-import.log

    r215822 r237811  
    22Do NOT modify these tests directly in WebKit.
    33Instead, create a pull request on the WPT github:
    4         https://github.com/w3c/web-platform-tests
     4        https://github.com/web-platform-tests/wpt
    55
    66Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/w3c-import.log

    r215822 r237811  
    22Do NOT modify these tests directly in WebKit.
    33Instead, create a pull request on the WPT github:
    4         https://github.com/w3c/web-platform-tests
     4        https://github.com/web-platform-tests/wpt
    55
    66Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
     
    2323/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_unload.html
    2424/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html
     25/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window.js
    2526/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html
    2627/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-screenx-screeny.html
  • trunk/LayoutTests/platform/wk2/TestExpectations

    r236216 r237811  
    771771
    772772webkit.org/b/187766 http/wpt/service-workers/update-service-worker.https.html [ Pass Timeout ]
     773
     774# Newly imported test that is flaky on WebKit2 only.
     775imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window.html [ Pass Failure ]
     776
Note: See TracChangeset for help on using the changeset viewer.