Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
TestRunner should always enable all the experimental features
https://bugs.webkit.org/show_bug.cgi?id=157360
<rdar://problem/26099748>

Reviewed by Anders Carlsson.

Source/WebKit2:

Experimental features are disabled by default, but it is
a pain to enable them in every test. Instead, have the
test runner turn them all on.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesEnableAllExperimentalFeatures):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::enableAllExperimentalFeatures):
* UIProcess/WebPreferences.h:

Tools:

Call the new SPI that enables all the experimental features.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

Canonical link: https://commits.webkit.org/175469@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
grorg committed May 4, 2016
1 parent 104ea1c commit b07ea4f
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,22 @@
2016-05-04 Dean Jackson <dino@apple.com>

TestRunner should always enable all the experimental features
https://bugs.webkit.org/show_bug.cgi?id=157360
<rdar://problem/26099748>

Reviewed by Anders Carlsson.

Experimental features are disabled by default, but it is
a pain to enable them in every test. Instead, have the
test runner turn them all on.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesEnableAllExperimentalFeatures):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::enableAllExperimentalFeatures):
* UIProcess/WebPreferences.h:

2016-05-04 Gyuyoung Kim <gyuyoung.kim@webkit.org>

Add WKPreference for SelectionPaintingWithoutSelectionGaps
Expand Down
5 changes: 5 additions & 0 deletions Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Expand Up @@ -62,6 +62,11 @@ WKPreferencesRef WKPreferencesCreateCopy(WKPreferencesRef preferencesRef)
return toAPI(preferences.release().leakRef());
}

void WKPreferencesEnableAllExperimentalFeatures(WKPreferencesRef preferencesRef)
{
toImpl(preferencesRef)->enableAllExperimentalFeatures();
}

void WKPreferencesSetJavaScriptEnabled(WKPreferencesRef preferencesRef, bool javaScriptEnabled)
{
toImpl(preferencesRef)->setJavaScriptEnabled(javaScriptEnabled);
Expand Down
2 changes: 2 additions & 0 deletions Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Expand Up @@ -57,6 +57,8 @@ typedef unsigned WKJavaScriptRuntimeFlagSet;
// Creates a copy with no identifier.
WK_EXPORT WKPreferencesRef WKPreferencesCreateCopy(WKPreferencesRef);

WK_EXPORT void WKPreferencesEnableAllExperimentalFeatures(WKPreferencesRef);

// Defaults to kWKFontSmoothingLevelMedium.
WK_EXPORT void WKPreferencesSetFontSmoothingLevel(WKPreferencesRef, WKFontSmoothingLevel);
WK_EXPORT WKFontSmoothingLevel WKPreferencesGetFontSmoothingLevel(WKPreferencesRef);
Expand Down
10 changes: 10 additions & 0 deletions Source/WebKit2/UIProcess/WebPreferences.cpp
Expand Up @@ -263,6 +263,16 @@ void WebPreferences::setEnabledForFeature(bool value, const API::ExperimentalFea
}
}

void WebPreferences::enableAllExperimentalFeatures()
{
#define SET_FEATURE_ENABLED(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) \
set##KeyUpper(true); \

FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(SET_FEATURE_ENABLED)

#undef SET_FEATURE_ENABLED
}

bool WebPreferences::anyPagesAreUsingPrivateBrowsing()
{
return privateBrowsingPageCount;
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit2/UIProcess/WebPreferences.h
Expand Up @@ -67,6 +67,7 @@ class WebPreferences : public API::ObjectImpl<API::Object::Type::Preferences> {
static const Vector<RefPtr<API::Object>>& experimentalFeatures();
bool isEnabledForFeature(const API::ExperimentalFeature&) const;
void setEnabledForFeature(bool, const API::ExperimentalFeature&);
void enableAllExperimentalFeatures();

// Exposed for WebKitTestRunner use only.
void forceUpdate() { update(); }
Expand Down
13 changes: 13 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,16 @@
2016-05-04 Dean Jackson <dino@apple.com>

TestRunner should always enable all the experimental features
https://bugs.webkit.org/show_bug.cgi?id=157360
<rdar://problem/26099748>

Reviewed by Anders Carlsson.

Call the new SPI that enables all the experimental features.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

2016-05-04 Mark Lam <mark.lam@apple.com>

ES6 Function.name inferred from property names of literal objects can break some websites.
Expand Down
1 change: 1 addition & 0 deletions Tools/WebKitTestRunner/TestController.cpp
Expand Up @@ -643,6 +643,7 @@ void TestController::resetPreferencesToConsistentValues(const TestOptions& optio
// Reset preferences
WKPreferencesRef preferences = platformPreferences();
WKPreferencesResetTestRunnerOverrides(preferences);
WKPreferencesEnableAllExperimentalFeatures(preferences);
WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled(preferences, false);
WKPreferencesSetOfflineWebApplicationCacheEnabled(preferences, true);
WKPreferencesSetFontSmoothingLevel(preferences, kWKFontSmoothingLevelNoSubpixelAntiAliasing);
Expand Down

0 comments on commit b07ea4f

Please sign in to comment.