Commit 62b20f46 authored by mjs@apple.com's avatar mjs@apple.com

2011-01-28 Maciej Stachowiak <mjs@apple.com>

        Reviewed by Darin Adler.

        WebKitTestRunner needs layoutTestController.setPOSIXLocale
        https://bugs.webkit.org/show_bug.cgi?id=42682

        * platform/mac-wk2/Skipped:
2011-01-28  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin Adler.

        WebKitTestRunner needs layoutTestController.setPOSIXLocale
        https://bugs.webkit.org/show_bug.cgi?id=42682

        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
        (WTR::InjectedBundle::resetLocalSettings):
        (WTR::InjectedBundle::didReceiveMessage):
        * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
        (WTR::LayoutTestController::setPOSIXLocale):
        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bfc7fcf5
2011-01-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Adler.
WebKitTestRunner needs layoutTestController.setPOSIXLocale
https://bugs.webkit.org/show_bug.cgi?id=42682
* platform/mac-wk2/Skipped:
2011-01-28 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed; Fixed Chromium test expectation.
......@@ -1572,11 +1572,6 @@ http/tests/security/local-user-CSS-from-remote.html
# <https://bugs.webkit.org/show_bug.cgi?id=42679>
fast/loader/user-stylesheet-fast-path.html
# WebKitTestRunner needs layoutTestController.setPOSIXLocale
# <https://bugs.webkit.org/show_bug.cgi?id=42682>
fast/css/opacity-float.html
fast/js/navigator-language.html
# WebKitTestRunner needs layoutTestController.setCacheModel
# <https://bugs.webkit.org/show_bug.cgi?id=42684>
fast/dom/HTMLScriptElement/nested-execution.html
......
2011-01-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Adler.
WebKitTestRunner needs layoutTestController.setPOSIXLocale
https://bugs.webkit.org/show_bug.cgi?id=42682
* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::resetLocalSettings):
(WTR::InjectedBundle::didReceiveMessage):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::setPOSIXLocale):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
2011-01-28 Dirk Pranke <dpranke@chromium.org>
Reviewed by Mihai Parparita.
......@@ -85,6 +85,8 @@ module WTR {
void closeWebInspector();
void evaluateInWebInspector(in long callID, in DOMString script);
void setTimelineProfilingEnabled(in boolean enabled);
void setPOSIXLocale(in DOMString locale);
};
}
......@@ -118,6 +118,11 @@ InjectedBundlePage* InjectedBundle::page() const
return m_pages[0].get();
}
void InjectedBundle::resetLocalSettings()
{
setlocale(LC_ALL, "");
}
void InjectedBundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody)
{
if (WKStringIsEqualToUTF8CString(messageName, "BeginTest")) {
......@@ -131,6 +136,9 @@ void InjectedBundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messag
return;
} else if (WKStringIsEqualToUTF8CString(messageName, "Reset")) {
m_state = Idle;
resetLocalSettings();
return;
}
......
......@@ -82,6 +82,8 @@ private:
void didInitializePageGroup(WKBundlePageGroupRef);
void didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody);
void resetLocalSettings();
void beginTesting();
WKBundleRef m_bundle;
......
......@@ -371,4 +371,11 @@ void LayoutTestController::evaluateScriptInIsolatedWorld(JSContextRef context, u
JSEvaluateScript(jsContext, script, 0, 0, 0, 0);
}
void LayoutTestController::setPOSIXLocale(JSStringRef locale)
{
char localeBuf[32];
JSStringGetUTF8CString(locale, localeBuf, sizeof(localeBuf));
setlocale(LC_ALL, localeBuf);
}
} // namespace WTR
......@@ -131,6 +131,8 @@ public:
void evaluateInWebInspector(long callId, JSStringRef script);
void setTimelineProfilingEnabled(bool);
void setPOSIXLocale(JSStringRef);
private:
static const double waitToDumpWatchdogTimerInterval;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment