Changeset 46539 in webkit
- Timestamp:
- Jul 29, 2009 6:18:30 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r46537 r46539 1 2009-07-29 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> 2 3 Reviewed by Adam Treat. 4 5 [WML] Running WML tests in random order multiple times exposes subtle bugs 6 https://bugs.webkit.org/show_bug.cgi?id=27801 7 8 Some changes to fix random order WML tests, simplilfy WMLTestCase.js and reset testDocument 9 properly in enter-first-card-with-events.js. fast/wml/err-multi-access.wml still creates a layout 10 test difference on consecutive runs, though that's related to bug 27721, which has to be fixed first. 11 12 * wml/resources/WMLTestCase.js: 13 * wml/resources/enter-first-card-with-events.js: 14 (setupTestDocument): 15 (prepareTest): 16 (executeTest): 17 1 18 2009-07-29 Jan Michael Alonzo <jmalonzo@webkit.org> 2 19 -
trunk/LayoutTests/wml/resources/WMLTestCase.js
r46418 r46539 10 10 } 11 11 12 function createWMLTestCase(testDescription, substitutesVariables, testName, executeImmediately , needsReset) {12 function createWMLTestCase(testDescription, substitutesVariables, testName, executeImmediately) { 13 13 // Setup default test options 14 if (substitutesVariables == null) {14 if (substitutesVariables == null) 15 15 substitutesVariables = true; 16 }17 16 18 17 // Setup default test name … … 20 19 executeImmediately = false; // Only honored, when testName != null 21 20 testName = relativePathToLayoutTests + "/wml/resources/test-document.wml"; 22 } else if (executeImmediately == null) {21 } else if (executeImmediately == null) 23 22 executeImmediately = true; 24 }25 26 // Some tests may want to handle resetting the page state themselves27 if (needsReset == null) {28 needsReset = true;29 }30 23 31 24 // Initialize JS test … … 34 27 35 28 // Clear variable state & history 36 if (needsReset) 37 document.resetWMLPageState(); 29 document.resetWMLPageState(); 38 30 39 31 // Setup DRT specific settings -
trunk/LayoutTests/wml/resources/enter-first-card-with-events.js
r46418 r46539 1 1 /// [Name] enter-first-card-with-events.js 2 2 3 createWMLTestCase("Tests entering first card backwards that has intrinsic events set", false, "resources/enter-first-card-with-events.wml", false, false); 4 5 var ranOnce = false; 6 var resultIndicatorElement; 3 createWMLTestCase("Tests entering first card backwards that has intrinsic events set", false, "resources/enter-first-card-with-events.wml", false); 7 4 8 5 function setupTestDocument() { 9 resultIndicatorElement = testDocument.getElementById("resultIndicator"); 6 var resultIndicatorElement = testDocument.getElementById("resultIndicator"); 7 if (resultIndicatorElement.textContent == "DONE") 8 completeTest(); 10 9 } 11 10 12 11 function prepareTest() { 13 if (resultIndicatorElement.textContent == "DONE") 14 completeTest(); 15 else 16 executeTest(); 12 startTest(25, 15); 17 13 } 18 14 19 15 function executeTest() { 20 16 startTest(25, 15); 17 18 // Force re-setup of the test document, as we check for completion upon setupTestDocument() 19 testDocument = undefined; 21 20 } 22 21 -
trunk/WebCore/ChangeLog
r46535 r46539 1 2009-07-29 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> 2 3 Reviewed by Adam Treat. 4 5 [WML] Running WML tests in random order multiple times exposes subtle bugs 6 https://bugs.webkit.org/show_bug.cgi?id=27801 7 8 Remove superflous assertions regarding the parent node. Under certain circumstances 9 these can even fire (related to garbage collection while destructing). Fixes random order 10 WML tests (run-webkit-tests fast/wml wml http/tests/wml fast/wml ... --random) 11 12 The wml/enter-first-card-with-events.html test relied on a bug in our implementation of 13 WMLPageState::reset() - the history stack should still contain the current card afterwards. 14 Fix that bug by preserving the first item in BackForwardList::clearWMLPageHistory(). 15 16 * history/BackForwardList.cpp: Preserve first item in history stack, as demanded by the spec. 17 (WebCore::BackForwardList::clearWMLPageHistory): 18 * wml/WMLDoElement.cpp: 19 (WebCore::WMLDoElement::insertedIntoDocument): 20 (WebCore::WMLDoElement::removedFromDocument): 21 * wml/WMLNoopElement.cpp: 22 (WebCore::WMLNoopElement::insertedIntoDocument): 23 * wml/WMLOnEventElement.cpp: 24 (WebCore::eventHandlingParent): 25 * wml/WMLPostfieldElement.cpp: 26 (WebCore::WMLPostfieldElement::insertedIntoDocument): 27 (WebCore::WMLPostfieldElement::removedFromDocument): 28 * wml/WMLSetvarElement.cpp: 29 (WebCore::WMLSetvarElement::insertedIntoDocument): 30 (WebCore::WMLSetvarElement::removedFromDocument): 31 * wml/WMLTaskElement.cpp: 32 (WebCore::WMLTaskElement::insertedIntoDocument): 33 (WebCore::WMLTaskElement::removedFromDocument): 34 * wml/WMLTimerElement.cpp: 35 (WebCore::WMLTimerElement::insertedIntoDocument): 36 (WebCore::WMLTimerElement::removedFromDocument): 37 1 38 2009-07-29 Yongjun Zhang <yongjun.zhang@nokia.com> 2 39 -
trunk/WebCore/history/BackForwardList.cpp
r46418 r46539 269 269 void BackForwardList::clearWMLPageHistory() 270 270 { 271 RefPtr<HistoryItem> currentItem = this->currentItem(); 272 271 273 int size = m_entries.size(); 272 274 for (int i = 0; i < size; ++i) … … 276 278 m_entryHash.clear(); 277 279 m_current = NoCurrentItemIndex; 280 281 // Spec: The history stack may be reset to a state where it only contains the current card. 282 addItem(currentItem); 278 283 } 279 284 #endif -
trunk/WebCore/wml/WMLDoElement.cpp
r46510 r46539 114 114 115 115 Node* parent = parentNode(); 116 ASSERT(parent);117 118 116 if (!parent || !parent->isWMLElement()) 119 117 return; … … 126 124 { 127 125 Node* parent = parentNode(); 128 ASSERT(parent);129 126 130 127 if (parent && parent->isWMLElement()) { -
trunk/WebCore/wml/WMLNoopElement.cpp
r46474 r46539 46 46 47 47 Node* parent = parentNode(); 48 ASSERT(parent);49 50 48 if (!parent || !parent->isWMLElement()) 51 49 return; -
trunk/WebCore/wml/WMLOnEventElement.cpp
r46510 r46539 63 63 static inline WMLEventHandlingElement* eventHandlingParent(Node* parent) 64 64 { 65 ASSERT(parent);66 65 if (!parent || !parent->isWMLElement()) 67 66 return 0; -
trunk/WebCore/wml/WMLPostfieldElement.cpp
r46510 r46539 45 45 46 46 Node* parent = parentNode(); 47 ASSERT(parent); 48 49 if (!parent->hasTagName(goTag)) 50 return; 51 52 static_cast<WMLGoElement*>(parent)->registerPostfieldElement(this); 47 if (parent && parent->hasTagName(goTag)) 48 static_cast<WMLGoElement*>(parent)->registerPostfieldElement(this); 53 49 } 54 50 … … 56 52 { 57 53 Node* parent = parentNode(); 58 ASSERT(parent); 59 60 if (parent->hasTagName(goTag)) 54 if (parent && parent->hasTagName(goTag)) 61 55 static_cast<WMLGoElement*>(parent)->deregisterPostfieldElement(this); 62 56 -
trunk/WebCore/wml/WMLSetvarElement.cpp
r46510 r46539 57 57 58 58 Node* parent = parentNode(); 59 ASSERT(parent);60 61 59 if (!parent || !parent->isWMLElement()) 62 60 return; … … 69 67 { 70 68 Node* parent = parentNode(); 71 ASSERT(parent);72 73 69 if (parent && parent->isWMLElement()) { 74 70 if (static_cast<WMLElement*>(parent)->isWMLTaskElement()) -
trunk/WebCore/wml/WMLTaskElement.cpp
r46510 r46539 49 49 50 50 Node* parent = parentNode(); 51 ASSERT(parent);52 53 51 if (!parent || !parent->isWMLElement()) 54 52 return; … … 65 63 { 66 64 Node* parent = parentNode(); 67 ASSERT(parent);68 69 65 if (parent && parent->isWMLElement()) { 70 66 if (parent->hasTagName(anchorTag)) -
trunk/WebCore/wml/WMLTimerElement.cpp
r46510 r46539 60 60 61 61 Node* parent = parentNode(); 62 ASSERT(parent);63 64 62 if (!parent || !parent->isWMLElement()) 65 63 return; … … 74 72 { 75 73 Node* parent = parentNode(); 76 ASSERT(parent); 77 78 if (parent && parent->isWMLElement()) { 79 if (parent->hasTagName(cardTag)) { 80 m_card->setIntrinsicEventTimer(0); 81 m_card = 0; 82 } 74 if (parent && parent->isWMLElement() && parent->hasTagName(cardTag)) { 75 m_card->setIntrinsicEventTimer(0); 76 m_card = 0; 83 77 } 84 78
Note: See TracChangeset
for help on using the changeset viewer.