Modified: trunk/Tools/WebKitTestRunner/Options.cpp (230165 => 230166)
--- trunk/Tools/WebKitTestRunner/Options.cpp 2018-04-02 17:51:34 UTC (rev 230165)
+++ trunk/Tools/WebKitTestRunner/Options.cpp 2018-04-02 18:09:04 UTC (rev 230166)
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2013 University of Szeged. All rights reserved.
* Copyright (C) 2013 Samsung Electronics. All rights reserved.
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,89 +32,74 @@
namespace WTR {
-Options::Options()
- : useWaitToDumpWatchdogTimer(true)
- , forceNoTimeout(false)
- , verbose(false)
- , gcBetweenTests(false)
- , shouldDumpPixelsForAllTests(false)
- , printSupportedFeatures(false)
- , forceComplexText(false)
- , shouldUseAcceleratedDrawing(false)
- , shouldUseRemoteLayerTree(false)
- , shouldShowWebView(false)
- , shouldShowTouches(false)
+static bool handleOptionNoTimeout(Options& options, const char*, const char*)
{
-}
-
-bool handleOptionNoTimeout(Options& options, const char*, const char*)
-{
options.useWaitToDumpWatchdogTimer = false;
options.forceNoTimeout = true;
return true;
}
-bool handleOptionVerbose(Options& options, const char*, const char*)
+static bool handleOptionVerbose(Options& options, const char*, const char*)
{
options.verbose = true;
return true;
}
-bool handleOptionGcBetweenTests(Options& options, const char*, const char*)
+static bool handleOptionGcBetweenTests(Options& options, const char*, const char*)
{
options.gcBetweenTests = true;
return true;
}
-bool handleOptionPixelTests(Options& options, const char*, const char*)
+static bool handleOptionPixelTests(Options& options, const char*, const char*)
{
options.shouldDumpPixelsForAllTests = true;
return true;
}
-bool handleOptionPrintSupportedFeatures(Options& options, const char*, const char*)
+static bool handleOptionPrintSupportedFeatures(Options& options, const char*, const char*)
{
options.printSupportedFeatures = true;
return true;
}
-bool handleOptionComplexText(Options& options, const char*, const char*)
+static bool handleOptionComplexText(Options& options, const char*, const char*)
{
options.forceComplexText = true;
return true;
}
-bool handleOptionAcceleratedDrawing(Options& options, const char*, const char*)
+static bool handleOptionAcceleratedDrawing(Options& options, const char*, const char*)
{
options.shouldUseAcceleratedDrawing = true;
return true;
}
-bool handleOptionRemoteLayerTree(Options& options, const char*, const char*)
+static bool handleOptionRemoteLayerTree(Options& options, const char*, const char*)
{
options.shouldUseRemoteLayerTree = true;
return true;
}
-bool handleOptionShowWebView(Options& options, const char*, const char*)
+static bool handleOptionShowWebView(Options& options, const char*, const char*)
{
options.shouldShowWebView = true;
return true;
}
-
-bool handleOptionShowTouches(Options& options, const char*, const char*)
+
+static bool handleOptionShowTouches(Options& options, const char*, const char*)
{
options.shouldShowTouches = true;
return true;
}
-bool handleOptionAllowedHost(Options& options, const char*, const char* host)
+static bool handleOptionAllowedHost(Options& options, const char*, const char* host)
{
options.allowedHosts.push_back(host);
return true;
}
-bool handleOptionUnmatched(Options& options, const char* option, const char*)
+static bool handleOptionUnmatched(Options& options, const char* option, const char*)
{
if (option[0] && option[1] && option[0] == '-' && option[1] == '-')
return true;
Modified: trunk/Tools/WebKitTestRunner/Options.h (230165 => 230166)
--- trunk/Tools/WebKitTestRunner/Options.h 2018-04-02 17:51:34 UTC (rev 230165)
+++ trunk/Tools/WebKitTestRunner/Options.h 2018-04-02 18:09:04 UTC (rev 230166)
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2013 University of Szeged. All rights reserved.
* Copyright (C) 2013 Samsung Electronics. All rights reserved.
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,8 +25,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Options_h
-#define Options_h
+#pragma once
#include <functional>
#include <stdio.h>
@@ -37,18 +36,17 @@
namespace WTR {
struct Options {
- Options();
- bool useWaitToDumpWatchdogTimer;
- bool forceNoTimeout;
- bool verbose;
- bool gcBetweenTests;
- bool shouldDumpPixelsForAllTests;
- bool printSupportedFeatures;
- bool forceComplexText;
- bool shouldUseAcceleratedDrawing;
- bool shouldUseRemoteLayerTree;
- bool shouldShowWebView;
- bool shouldShowTouches;
+ bool useWaitToDumpWatchdogTimer { true };
+ bool forceNoTimeout { false };
+ bool verbose { false };
+ bool gcBetweenTests { false };
+ bool shouldDumpPixelsForAllTests { false };
+ bool printSupportedFeatures { false };
+ bool forceComplexText { false };
+ bool shouldUseAcceleratedDrawing { false };
+ bool shouldUseRemoteLayerTree { false };
+ bool shouldShowWebView { false };
+ bool shouldShowTouches { false };
std::vector<std::string> paths;
std::vector<std::string> allowedHosts;
};
@@ -77,4 +75,3 @@
} // namespace WTR
-#endif // Options_h