Skip to content
Permalink
Browse files
2011-04-10 Daniel Bates <dbates@rim.com>
        Reviewed by Eric Seidel.

        Add layout test to ensure that window.name returns {"_blank", "_parent", "_self", "_top"}
        for a frame of the same name
        https://bugs.webkit.org/show_bug.cgi?id=58189

        Extracted common code from files LayoutTests/fast/frames/resources/frame-element-name-{left, right}.html
        into LayoutTests/fast/frames/resources/frame-element-name.html so that we can use this logic
        to test frames with arbitrary names.

        * fast/frames/frame-element-name-expected.txt:
        * fast/frames/frame-element-name.html: Modified to use resources/frame-element-name.html; Added
          test cases for "_blank", "_parent", "_self", and "_top".
        * fast/frames/resources/frame-element-name-left.html: Removed; Instead, pass expectedName to
          resources/frame-element-name.html
        * fast/frames/resources/frame-element-name-right.html: Ditto.
        * fast/frames/resources/frame-element-name.html: Added.

Canonical link: https://commits.webkit.org/73183@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Apr 11, 2011
1 parent c25fc8c commit e6e5eee2fa63adabd5857a454797da9fd82e9a6c
Showing 6 changed files with 67 additions and 27 deletions.
@@ -1,3 +1,23 @@
2011-04-10 Daniel Bates <dbates@rim.com>

Reviewed by Eric Seidel.

Add layout test to ensure that window.name returns {"_blank", "_parent", "_self", "_top"}
for a frame of the same name
https://bugs.webkit.org/show_bug.cgi?id=58189

Extracted common code from files LayoutTests/fast/frames/resources/frame-element-name-{left, right}.html
into LayoutTests/fast/frames/resources/frame-element-name.html so that we can use this logic
to test frames with arbitrary names.

* fast/frames/frame-element-name-expected.txt:
* fast/frames/frame-element-name.html: Modified to use resources/frame-element-name.html; Added
test cases for "_blank", "_parent", "_self", and "_top".
* fast/frames/resources/frame-element-name-left.html: Removed; Instead, pass expectedName to
resources/frame-element-name.html
* fast/frames/resources/frame-element-name-right.html: Ditto.
* fast/frames/resources/frame-element-name.html: Added.

2011-04-10 Dimitri Glazkov <dglazkov@chromium.org>

Reviewed by Eric Carlson.
@@ -13,3 +13,31 @@ Frame: '<!--framePath //<!--frame1-->-->'
PASS escape(window.frameElement.name) is ""
PASS escape(window.name) is ""


--------
Frame: '<!--framePath //<!--frame2-->-->'
--------
PASS escape(window.frameElement.name) is "_blank"
PASS escape(window.name) is "_blank"


--------
Frame: '_parent'
--------
PASS escape(window.frameElement.name) is "_parent"
PASS escape(window.name) is "_parent"


--------
Frame: '_self'
--------
PASS escape(window.frameElement.name) is "_self"
PASS escape(window.name) is "_self"


--------
Frame: '_top'
--------
PASS escape(window.frameElement.name) is "_top"
PASS escape(window.name) is "_top"

@@ -5,8 +5,12 @@
layoutTestController.dumpChildFramesAsText();
</script>
</head>
<frameset border="1" cols="500,*" style='border: solid 1px;'>
<frame marginwidth="1" src="resources/frame-element-name-left.html" name='left'>
<frame src="resources/frame-element-name-right.html">
<frameset border="1" cols="150,150,150,150,150,*" style='border: solid 1px;'>
<frame marginwidth="1" src="resources/frame-element-name.html?expectedName=left" name="left">
<frame src="resources/frame-element-name.html?expectedName=">
<frame src="resources/frame-element-name.html?expectedName=_blank" name="_blank">
<frame src="resources/frame-element-name.html?expectedName=_parent" name="_parent">
<frame src="resources/frame-element-name.html?expectedName=_self" name="_self">
<frame src="resources/frame-element-name.html?expectedName=_top" name="_top">
</frameset>
</html>

This file was deleted.

This file was deleted.

@@ -0,0 +1,12 @@
<head>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
<script src="../../js/resources/js-test-pre.js"></script>
</head>
<body>
<div id="console"></div>
<script>
var expectedName = window.location.search.substr("?expectedName=".length);
shouldBeEqualToString("escape(window.frameElement.name)", expectedName);
shouldBeEqualToString("escape(window.name)", expectedName);
</script>
</body>

0 comments on commit e6e5eee

Please sign in to comment.