Skip to content
Permalink
Browse files
Clear the main frame's name between tests to get more consistent test…
… results

when running the WebKit tests with --nthly.

Reviewed by Dan Bernstein.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebViewToConsistentStateBeforeTesting):

Add SPI to WebView to allow DRT to clear the main frame's name between tests.

* Interfaces/IWebViewPrivate.idl:
* WebView.cpp:
(WebView::clearMainFrameName):
* WebView.h:

Add SPI to WebView to allow DRT to clear the main frame's name between tests.

* WebView/WebView.mm:
(-[WebView _clearMainFrameName]):
* WebView/WebViewPrivate.h:

Add a means of clearing a FrameTree's name.

* WebCore.base.exp:
* page/FrameTree.cpp:
(WebCore::FrameTree::clearName):
* page/FrameTree.h:

Update test results now that frame tree names are cleared between tests.

* fast/events/onunload-clears-onbeforeunload-expected.txt:
* fast/events/onunload-expected.txt:
* fast/events/onunload-not-on-body-expected.txt:
* fast/events/onunload-window-property-expected.txt:
* fast/forms/button-state-restore-expected.txt:
* fast/forms/form-and-frame-interaction-retains-values-expected.txt:

Canonical link: https://commits.webkit.org/28931@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
bdash committed Sep 19, 2008
1 parent 9c5d9c1 commit a6d5c3f7ed80f7f27f42afa94c1119ccb3e11e48
Showing 21 changed files with 95 additions and 12 deletions.
@@ -1,3 +1,16 @@
2008-09-18 Mark Rowe <mrowe@apple.com>

Reviewed by Dan Bernstein.

Update test results now that frame tree names are cleared between tests.

* fast/events/onunload-clears-onbeforeunload-expected.txt:
* fast/events/onunload-expected.txt:
* fast/events/onunload-not-on-body-expected.txt:
* fast/events/onunload-window-property-expected.txt:
* fast/forms/button-state-restore-expected.txt:
* fast/forms/form-and-frame-interaction-retains-values-expected.txt:

2008-09-18 Collin Jackson <collinj@webkit.org>

Reviewed by Antti Koivisto and Mark Rowe.
@@ -1,4 +1,4 @@
main frame "1" - has 1 onunload handler(s)
main frame - has 1 onunload handler(s)
ALERT: before unload
ALERT: unload
If you didn't hit an assert you PASS.
@@ -1,3 +1,3 @@
main frame "1" - has 1 onunload handler(s)
main frame - has 1 onunload handler(s)
ALERT: unload
You should have seen an unload alert appear.
@@ -1,3 +1,3 @@
frame "<!--framePath /1/<!--frame2-->-->" - has 1 onunload handler(s)
frame "<!--framePath //<!--frame2-->-->" - has 1 onunload handler(s)
ALERT: unload
you should only see one unload alert appear.
@@ -1,3 +1,3 @@
main frame "1" - has 1 onunload handler(s)
main frame - has 1 onunload handler(s)
ALERT: unload
You should have seen an unload alert appear.
@@ -1,5 +1,5 @@
main frame "1" - has 1 onunload handler(s)
main frame "1" - has 1 onunload handler(s)
main frame - has 1 onunload handler(s)
main frame - has 1 onunload handler(s)
This is a test for http://bugs.webkit.org/show_bug.cgi?id=14400 Assertion failure (SHOULD NEVER BE REACHED) going back on YouTube.

Test result: PASS
@@ -1,7 +1,7 @@


--------
Frame: '<!--framePath /1/<!--frame1-->-->'
Frame: '<!--framePath //<!--frame1-->-->'
--------
PASS

@@ -13,6 +13,6 @@ In this test the main page is loaded in a frameset, which sets the value of an i


--------
Frame: '<!--framePath /1/submitted/<!--frame0-->-->'
Frame: '<!--framePath //submitted/<!--frame0-->-->'
--------

@@ -1,3 +1,14 @@
2008-09-18 Mark Rowe <mrowe@apple.com>

Reviewed by Dan Bernstein.

Add a means of clearing a FrameTree's name.

* WebCore.base.exp:
* page/FrameTree.cpp:
(WebCore::FrameTree::clearName):
* page/FrameTree.h:

2008-09-18 David Hyatt <hyatt@apple.com>

Eliminate addToSuperview from Widget, since it was only called
@@ -535,12 +535,13 @@ __ZN7WebCore6StringC1ERKN3JSC7UStringE
__ZN7WebCore6Widget14invalidateRectERKNS_7IntRectE
__ZN7WebCore6Widget16removeFromParentEv
__ZN7WebCore6Widget16setFrameGeometryERKNS_7IntRectE
__ZNK7WebCore6Widget13frameGeometryEv
__ZN7WebCore6Widget9setParentEPNS_10ScrollViewE
__ZN7WebCore6Widget20retainPlatformWidgetEv
__ZN7WebCore6Widget21releasePlatformWidgetEv
__ZN7WebCore6Widget4hideEv
__ZN7WebCore6Widget4showEv
__ZN7WebCore6Widget5paintEPNS_15GraphicsContextERKNS_7IntRectE
__ZN7WebCore6Widget8setFocusEv
__ZN7WebCore6Widget9setParentEPNS_10ScrollViewE
__ZN7WebCore6WidgetC1EP6NSView
__ZN7WebCore6WidgetC2EP6NSView
__ZN7WebCore6WidgetD2Ev
@@ -604,6 +605,7 @@ __ZN7WebCore9FontCache21inactiveFontDataCountEv
__ZN7WebCore9FontCache21purgeInactiveFontDataEi
__ZN7WebCore9FrameTree11appendChildEN3WTF10PassRefPtrINS_5FrameEEE
__ZN7WebCore9FrameTree7setNameERKNS_12AtomicStringE
__ZN7WebCore9FrameTree9clearNameEv
__ZN7WebCore9FrameView12setMediaTypeERKNS_6StringE
__ZN7WebCore9FrameView14adjustViewSizeEv
__ZN7WebCore9FrameView14initScrollbarsEv
@@ -832,9 +834,8 @@ __ZNK7WebCore6String6lengthEv
__ZNK7WebCore6String7isEmptyEv
__ZNK7WebCore6String9substringEjj
__ZNK7WebCore6StringcvN3JSC7UStringEEv
__ZNK7WebCore6Widget13frameGeometryEv
__ZNK7WebCore6Widget14windowClipRectEv
__ZN7WebCore6Widget20retainPlatformWidgetEv
__ZN7WebCore6Widget21releasePlatformWidgetEv
__ZNK7WebCore7Element12getAttributeERKNS_13QualifiedNameE
__ZNK7WebCore7IntRectcv7_NSRectEv
__ZNK7WebCore8Document11completeURLERKNS_6StringE
@@ -48,6 +48,11 @@ void FrameTree::setName(const AtomicString& name)
m_name = parent()->tree()->uniqueChildName(name);
}

void FrameTree::clearName()
{
m_name = AtomicString();
}

Frame* FrameTree::parent(bool checkForDisconnectedFrame) const
{
if (checkForDisconnectedFrame && m_thisFrame->isDisconnected())
@@ -39,6 +39,7 @@ namespace WebCore {

const AtomicString& name() const { return m_name; }
void setName(const AtomicString&);
void clearName();
Frame* parent(bool checkForDisconnectedFrame = false) const;
void setParent(Frame* parent) { m_parent = parent; }

@@ -1,3 +1,13 @@
2008-09-18 Mark Rowe <mrowe@apple.com>

Reviewed by Dan Bernstein.

Add SPI to WebView to allow DRT to clear the main frame's name between tests.

* WebView/WebView.mm:
(-[WebView _clearMainFrameName]):
* WebView/WebViewPrivate.h:

2008-09-18 Darin Adler <darin@apple.com>

Reviewed by Sam Weinig.
@@ -1707,6 +1707,11 @@ - (void)_setCustomHTMLTokenizerChunkSize:(int)chunkSize
return _private->page->setCustomHTMLTokenizerChunkSize(chunkSize);
}

- (void)_clearMainFrameName
{
_private->page->mainFrame()->tree()->clearName();
}

@end

@implementation _WebSafeForwarder
@@ -371,6 +371,7 @@ Could be worth adding to the API.

// SPI for DumpRenderTree
- (void)_executeCoreCommandByName:(NSString *)name value:(NSString *)value;
- (void)_clearMainFrameName;

- (void)_setCustomHTMLTokenizerTimeDelay:(double)timeDelay;
- (void)_setCustomHTMLTokenizerChunkSize:(int)chunkSize;
@@ -1,3 +1,14 @@
2008-09-18 Mark Rowe <mrowe@apple.com>

Reviewed by Dan Bernstein.

Add SPI to WebView to allow DRT to clear the main frame's name between tests.

* Interfaces/IWebViewPrivate.idl:
* WebView.cpp:
(WebView::clearMainFrameName):
* WebView.h:

2008-09-16 Alp Toker <alp@nuanti.com>

Suggested by Dave Hyatt.
@@ -122,6 +122,7 @@ interface IWebViewPrivate : IUnknown

// SPI for DumpRenderTree
HRESULT executeCoreCommandByName([in] BSTR name, [in] BSTR value);
HRESULT clearMainFrameName();

HRESULT windowAncestryDidChange();

@@ -2835,6 +2835,13 @@ HRESULT STDMETHODCALLTYPE WebView::executeCoreCommandByName(BSTR bName, BSTR bVa
return S_OK;
}

HRESULT STDMETHODCALLTYPE WebView::clearMainFrameName()
{
m_page->mainFrame()->tree()->clearName();

return S_OK;
}

HRESULT STDMETHODCALLTYPE WebView::markAllMatchesForText(
BSTR str, BOOL caseSensitive, BOOL highlight, UINT limit, UINT* matches)
{
@@ -598,6 +598,8 @@ class WebView

virtual HRESULT STDMETHODCALLTYPE executeCoreCommandByName(BSTR name, BSTR value);

virtual HRESULT STDMETHODCALLTYPE clearMainFrameName();

virtual HRESULT STDMETHODCALLTYPE markAllMatchesForText(
BSTR search, BOOL caseSensitive, BOOL highlight, UINT limit, UINT* matches);

@@ -1,3 +1,15 @@
2008-09-18 Mark Rowe <mrowe@apple.com>

Reviewed by Dan Bernstein.

Clear the main frame's name between tests to get more consistent test results
when running the WebKit tests with --nthly.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebViewToConsistentStateBeforeTesting):

2008-09-18 Stephanie Lewis <slewis@apple.com>

Really fix tiger jsc tests.
@@ -945,6 +945,7 @@ static void resetWebViewToConsistentStateBeforeTesting()
[webView setTabKeyCyclesThroughElements:YES];
[webView setPolicyDelegate:nil];
[webView _setDashboardBehavior:WebDashboardBehaviorUseBackwardCompatibilityMode to:NO];
[webView _clearMainFrameName];

WebPreferences *preferences = [webView preferences];
[preferences setPrivateBrowsingEnabled:NO];
@@ -665,6 +665,8 @@ static void resetWebViewToConsistentStateBeforeTesting()
HWND viewWindow;
if (SUCCEEDED(webViewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))) && viewWindow)
SetFocus(viewWindow);

webViewPrivate->clearMainFrameName();
}

static void runTest(const char* pathOrURL)

0 comments on commit a6d5c3f

Please sign in to comment.