Commit b0cd7a95 authored by ch.dumez@samsung.com's avatar ch.dumez@samsung.com

Update several browser_tests / content_browsertests to set iframes' name

Update several browser_tests / content_browsertests to set iframes' name.
Previously, these tests were relying on the iframe's name being its id
if the name parameter was unset. However, this behavior is against
specification and other browsers. Blink is going to be updated accordingly
but we need to fix the tests on Chromium-side first before we can land the
Blink change.

BUG=347169
R=jochen@chromium.org, thakis@chromium.org

Review URL: https://codereview.chromium.org/188813003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255756 0039d316-1c4b-4281-b951-d872f2087c98
parent e6d4e148
......@@ -786,7 +786,7 @@ TEST_F(PasswordAutofillAgentTest, IframeNoFillTest) {
" <title>Title</title>"
" </head>"
" <body>"
" <iframe id='iframe' src=\"";
" <iframe name='iframe' src=\"";
const char kWebpageWithIframeEnd[] =
"\"></iframe>"
" </body>"
......
......@@ -7,7 +7,7 @@
<script type="application/x-javascript">
//<![CDATA[
function iframe_loaded() {
var iframe_doc = window.frames['iframe_id'].document;
var iframe_doc = window.frames['iframe_name'].document;
var iframe_body = iframe_doc.body;
var tester = new Tester();
// 'plugin' is the name given to the embed by webkit
......@@ -36,7 +36,7 @@
<body>
<h1>PPAPI Extension MIME Type Test</h1>
<iframe src='mime_test_data.dat'
id='iframe_id'
name='iframe_name'
width='100'
height='100'
onload='iframe_loaded()'>
......
......@@ -83,7 +83,7 @@ IN_PROC_BROWSER_TEST_F(FrameTreeBrowserTest, FrameTreeShape2) {
ASSERT_EQ(2UL, root->child_at(2)->child_count());
EXPECT_EQ(1UL, root->child_at(2)->child_at(1)->child_count());
EXPECT_EQ(0UL, root->child_at(2)->child_at(1)->child_at(0)->child_count());
EXPECT_STREQ("3-1-id",
EXPECT_STREQ("3-1-name",
root->child_at(2)->child_at(1)->child_at(0)->frame_name().c_str());
// Navigate to about:blank, which should leave only the root node of the frame
......
......@@ -6,7 +6,7 @@
Frame 2-4.
<br>
<iframe id='3-1-id' src="3-1.html"></iframe>
<iframe id='3-1-id' name="3-1-name" src="3-1.html"></iframe>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment