Title: [202401] trunk/Source/WebCore
- Revision
- 202401
- Author
- [email protected]
- Date
- 2016-06-23 16:22:21 -0700 (Thu, 23 Jun 2016)
Log Message
Web Inspector: add assertions to catch dangling frontends that persist between tests
https://bugs.webkit.org/show_bug.cgi?id=159073
Reviewed by Joseph Pecoraro.
Based on the analysis in https://webkit.org/b/159070, we suspect that some test
flakiness might be caused by dangling frontends from previous test cases. Add an
assertion that should catch any frontends that are attached to the inspected page's
backend. There should never be any frontends connected when a test first starts.
* inspector/InspectorController.cpp:
(WebCore::InspectorController::setIsUnderTest):
* inspector/InspectorController.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (202400 => 202401)
--- trunk/Source/WebCore/ChangeLog 2016-06-23 22:52:00 UTC (rev 202400)
+++ trunk/Source/WebCore/ChangeLog 2016-06-23 23:22:21 UTC (rev 202401)
@@ -1,3 +1,19 @@
+2016-06-23 Brian Burg <[email protected]>
+
+ Web Inspector: add assertions to catch dangling frontends that persist between tests
+ https://bugs.webkit.org/show_bug.cgi?id=159073
+
+ Reviewed by Joseph Pecoraro.
+
+ Based on the analysis in https://webkit.org/b/159070, we suspect that some test
+ flakiness might be caused by dangling frontends from previous test cases. Add an
+ assertion that should catch any frontends that are attached to the inspected page's
+ backend. There should never be any frontends connected when a test first starts.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::setIsUnderTest):
+ * inspector/InspectorController.h:
+
2016-06-23 Said Abou-Hallawa <[email protected]>
requestFrameAnimation() callback timestamp should be very close to Performance.now()
Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (202400 => 202401)
--- trunk/Source/WebCore/inspector/InspectorController.cpp 2016-06-23 22:52:00 UTC (rev 202400)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp 2016-06-23 23:22:21 UTC (rev 202401)
@@ -341,6 +341,17 @@
IdentifiersFactory::setProcessId(processId);
}
+void InspectorController::setIsUnderTest(bool value)
+{
+ if (value == m_isUnderTest)
+ return;
+
+ m_isUnderTest = value;
+
+ // <rdar://problem/26768628> Try to catch suspicious scenarios where we may have a dangling frontend while running tests.
+ RELEASE_ASSERT(!m_isUnderTest || !m_frontendRouter->hasFrontends());
+}
+
void InspectorController::evaluateForTestInFrontend(const String& script)
{
m_inspectorAgent->evaluateForTestInFrontend(script);
Modified: trunk/Source/WebCore/inspector/InspectorController.h (202400 => 202401)
--- trunk/Source/WebCore/inspector/InspectorController.h 2016-06-23 22:52:00 UTC (rev 202400)
+++ trunk/Source/WebCore/inspector/InspectorController.h 2016-06-23 23:22:21 UTC (rev 202401)
@@ -107,7 +107,7 @@
WEBCORE_EXPORT Ref<Inspector::Protocol::Array<Inspector::Protocol::OverlayTypes::NodeHighlightData>> buildObjectForHighlightedNodes() const;
bool isUnderTest() const { return m_isUnderTest; }
- void setIsUnderTest(bool isUnderTest) { m_isUnderTest = isUnderTest; }
+ WEBCORE_EXPORT void setIsUnderTest(bool);
WEBCORE_EXPORT void evaluateForTestInFrontend(const String& script);
InspectorClient* inspectorClient() const { return m_inspectorClient; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes