Changeset 128943 in webkit
- Timestamp:
- Sep 18, 2012 4:49:31 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r128932 r128943 1 2012-09-18 Byungwoo Lee <bw80.lee@samsung.com> 2 3 Title string should be changed when document.title is set to ''. 4 https://bugs.webkit.org/show_bug.cgi?id=96793 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Added layout tests for assigning empty string to title text. 9 And modified expected results according to the change of 10 dumpTitleChanges. 11 12 * fast/dom/title-text-property-2-expected.txt: Modified expected result. 13 * fast/dom/title-text-property-assigning-empty-string-expected.txt: Added. 14 * fast/dom/title-text-property-assigning-empty-string.html: Added. 15 * fast/dom/title-text-property-expected.txt: Modified expected result. 16 * fast/dom/title-text-property.html: Apply modified dumpTitleChanges. 17 1 18 2012-09-18 Julien Chaffraix <jchaffraix@webkit.org> 2 19 -
trunk/LayoutTests/fast/dom/title-text-property-2-expected.txt
r11962 r128943 1 TITLE CHANGED: 1. setting document.title 2 TITLE CHANGED: 2. setting title.text 1 TITLE CHANGED: '1. setting document.title' 2 TITLE CHANGED: '2. setting title.text' 3 TITLE CHANGED: '' 3 4 -
trunk/LayoutTests/fast/dom/title-text-property-expected.txt
r21687 r128943 1 TITLE CHANGED: This is the new title2 Original title is: Original Title3 Setting new title to: This is the new title4 New title is: This is the new title1 TITLE CHANGED: 'This is the new title' 2 Original title is: 'Original Title' 3 Setting new title to: 'This is the new title' 4 New title is: 'This is the new title' -
trunk/LayoutTests/fast/dom/title-text-property.html
r120792 r128943 5 5 function debugOutput(str) { 6 6 text = document.createTextNode(str); 7 debugDiv = document.getElementById('debugDiv');8 div = document.createElement 7 console = document.getElementById('console'); 8 div = document.createElement('div'); 9 9 div.appendChild(text); 10 debugDiv.appendChild(div);10 console.appendChild(div); 11 11 } 12 12 … … 18 18 19 19 titleElem = document.getElementsByTagName('title').item(0); 20 debugOutput ('Original title is: ' + titleElem.text);20 debugOutput('Original title is: \'' + titleElem.text + '\''); 21 21 22 22 newTitle = 'This is the new title'; 23 debugOutput ('Setting new title to: ' + newTitle);23 debugOutput('Setting new title to: \'' + newTitle + '\''); 24 24 titleElem.text = newTitle; 25 25 26 debugOutput ('New title is: ' + titleElem.text);26 debugOutput('New title is: \'' + titleElem.text + '\''); 27 27 } 28 28 29 29 function test() { 30 30 t = document.getElementsByTagName('title').item(0); 31 alert 31 alert(t.text); 32 32 t.text = 'new title'; 33 alert 33 alert(t.text); 34 34 } 35 35 </script> 36 36 </head> 37 37 <body onload='runTests();'> 38 <div id=' debugDiv'>38 <div id='console'> 39 39 </div> 40 40 </body> -
trunk/Source/WebCore/ChangeLog
r128941 r128943 1 2012-09-18 Byungwoo Lee <bw80.lee@samsung.com> 2 3 Title string should be changed when document.title is set to ''. 4 https://bugs.webkit.org/show_bug.cgi?id=96793 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 DocumentLoader::setTitle() function returns without anything (changing 9 m_pageTitle and calling FrameLoaderClient::setTitle()) when new title 10 string is empty. 11 So, when document.title is set to '', title string of a browser cannot 12 be changed. 13 For applying the change of document.title properly, empty string check 14 should be removed. 15 16 Test: fast/dom/title-text-property-assigning-empty-string.html 17 18 * loader/DocumentLoader.cpp: 19 (WebCore::DocumentLoader::setTitle): 20 1 21 2012-09-18 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/Source/WebCore/loader/DocumentLoader.cpp
r128762 r128943 738 738 void DocumentLoader::setTitle(const StringWithDirection& title) 739 739 { 740 if (title.isEmpty()) 741 return; 742 743 if (m_pageTitle != title) { 744 frameLoader()->willChangeTitle(this); 745 m_pageTitle = title; 746 frameLoader()->didChangeTitle(this); 747 } 740 if (m_pageTitle == title) 741 return; 742 743 frameLoader()->willChangeTitle(this); 744 m_pageTitle = title; 745 frameLoader()->didChangeTitle(this); 748 746 } 749 747 -
trunk/Source/WebKit2/ChangeLog
r128935 r128943 1 2012-09-18 Byungwoo Lee <bw80.lee@samsung.com> 2 3 Title string should be changed when document.title is set to ''. 4 https://bugs.webkit.org/show_bug.cgi?id=96793 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Added unit test for setting document.title and checking the title 9 string with title,changed signal and ewk_view_title_get() function. 10 11 * UIProcess/API/efl/tests/test_ewk2_view.cpp: 12 (TEST_F): 13 1 14 2012-09-18 Anders Carlsson <andersca@apple.com> 2 15 -
trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp
r128883 r128943 361 361 checkFullScreenProperty(webView(), false); 362 362 } 363 364 TEST_F(EWK2UnitTestBase, ewk_view_title_changed) 365 { 366 const char* titleChangedHTML = 367 "<!doctype html><head><title>Title before changed</title></head>" 368 "<body onload=\"document.title='Title after changed';\"></body>"; 369 ewk_view_html_string_load(webView(), titleChangedHTML, 0, 0); 370 waitUntilTitleChangedTo("Title after changed"); 371 EXPECT_STREQ(ewk_view_title_get(webView()), "Title after changed"); 372 373 titleChangedHTML = 374 "<!doctype html><head><title>Title before changed</title></head>" 375 "<body onload=\"document.title='';\"></body>"; 376 ewk_view_html_string_load(webView(), titleChangedHTML, 0, 0); 377 waitUntilTitleChangedTo(""); 378 EXPECT_STREQ(ewk_view_title_get(webView()), ""); 379 380 titleChangedHTML = 381 "<!doctype html><head><title>Title before changed</title></head>" 382 "<body onload=\"document.title=null;\"></body>"; 383 ewk_view_html_string_load(webView(), titleChangedHTML, 0, 0); 384 waitUntilTitleChangedTo(""); 385 EXPECT_STREQ(ewk_view_title_get(webView()), ""); 386 } -
trunk/Tools/ChangeLog
r128899 r128943 1 2012-09-18 Byungwoo Lee <bw80.lee@samsung.com> 2 3 Title string should be changed when document.title is set to ''. 4 https://bugs.webkit.org/show_bug.cgi?id=96793 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Change dump format of dumpTitleChanges more understandable. 9 Uses single quotation marks for the title string. 10 11 * DumpRenderTree/blackberry/DumpRenderTree.cpp: 12 (BlackBerry::WebKit::DumpRenderTree::didReceiveTitleForFrame): 13 * DumpRenderTree/chromium/WebViewHost.cpp: 14 (WebViewHost::didReceiveTitle): 15 * DumpRenderTree/efl/DumpRenderTreeChrome.cpp: 16 (DumpRenderTreeChrome::onFrameTitleChanged): 17 * DumpRenderTree/gtk/DumpRenderTree.cpp: 18 (webViewTitleChanged): 19 * DumpRenderTree/mac/FrameLoadDelegate.mm: 20 (-[FrameLoadDelegate webView:didReceiveTitle:forFrame:]): 21 * DumpRenderTree/qt/DumpRenderTreeQt.cpp: 22 (WebCore::DumpRenderTree::titleChanged): 23 * DumpRenderTree/win/FrameLoadDelegate.cpp: 24 (FrameLoadDelegate::didReceiveTitle): 25 * DumpRenderTree/wx/DumpRenderTreeWx.cpp: 26 (LayoutWebViewEventHandler::OnReceivedTitleEvent): 27 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 28 (WTR::InjectedBundlePage::didReceiveTitleForFrame): 29 1 30 2012-09-18 Szilard Ledan <szledan@inf.u-szeged.hu> 2 31 -
trunk/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp
r127040 r128943 638 638 639 639 if (gTestRunner->dumpTitleChanges()) 640 printf("TITLE CHANGED: %s\n", title.utf8().data());640 printf("TITLE CHANGED: '%s'\n", title.utf8().data()); 641 641 } 642 642 -
trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp
r128273 r128943 1193 1193 1194 1194 if (testRunner()->shouldDumpTitleChanges()) 1195 printf("TITLE CHANGED: %s\n", title8.data());1195 printf("TITLE CHANGED: '%s'\n", title8.data()); 1196 1196 1197 1197 setPageTitle(title); -
trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
r128393 r128943 514 514 515 515 if (!done && gTestRunner->dumpTitleChanges()) 516 printf("TITLE CHANGED: %s\n", (titleText && titleText->string) ? titleText->string : "");516 printf("TITLE CHANGED: '%s'\n", (titleText && titleText->string) ? titleText->string : ""); 517 517 518 518 if (!done && gTestRunner->dumpHistoryDelegateCallbacks()) -
trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
r128596 r128943 945 945 { 946 946 if (gTestRunner->dumpTitleChanges() && !done) 947 printf("TITLE CHANGED: %s\n", title ? title : "");947 printf("TITLE CHANGED: '%s'\n", title ? title : ""); 948 948 } 949 949 -
trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm
r128129 r128943 345 345 346 346 if (gTestRunner->dumpTitleChanges()) 347 printf("TITLE CHANGED: %s\n", [title UTF8String]);347 printf("TITLE CHANGED: '%s'\n", [title UTF8String]); 348 348 } 349 349 -
trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
r128210 r128943 1003 1003 { 1004 1004 if (m_controller->shouldDumpTitleChanges()) 1005 printf("TITLE CHANGED: %s\n", s.toUtf8().data());1005 printf("TITLE CHANGED: '%s'\n", s.toUtf8().data()); 1006 1006 } 1007 1007 -
trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp
r125516 r128943 181 181 182 182 if (::gTestRunner->dumpTitleChanges() && !done) 183 printf("TITLE CHANGED: %S\n", title ? title : L"");183 printf("TITLE CHANGED: '%S'\n", title ? title : L""); 184 184 return S_OK; 185 185 } -
trunk/Tools/DumpRenderTree/wx/DumpRenderTreeWx.cpp
r125516 r128943 130 130 { 131 131 if (gTestRunner->dumpTitleChanges() && !done) 132 wxFprintf(stdout, "TITLE CHANGED: %S\n", event.GetTitle());132 wxFprintf(stdout, "TITLE CHANGED: '%S'\n", event.GetTitle()); 133 133 } 134 134 -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r128638 r128943 1007 1007 return; 1008 1008 1009 InjectedBundle::shared().stringBuilder()->appendLiteral("TITLE CHANGED: ");1009 InjectedBundle::shared().stringBuilder()->appendLiteral("TITLE CHANGED: '"); 1010 1010 InjectedBundle::shared().stringBuilder()->append(toWTFString(title)); 1011 InjectedBundle::shared().stringBuilder()->append ('\n');1011 InjectedBundle::shared().stringBuilder()->appendLiteral("'\n"); 1012 1012 } 1013 1013
Note: See TracChangeset
for help on using the changeset viewer.