2011-01-28 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Jan 2011 02:25:32 +0000 (02:25 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Jan 2011 02:25:32 +0000 (02:25 +0000)
        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

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/Skipped
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

index cecebec..eddc5e5 100644 (file)
@@ -1,3 +1,12 @@
+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.
index a6d11b4..be2fc7c 100644 (file)
@@ -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
index 8b3a599..9aa18ef 100644 (file)
@@ -1,3 +1,19 @@
+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.
index be4fd2e..162431e 100644 (file)
@@ -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);
     };
 
 }
index 972a606..d042431 100644 (file)
@@ -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;
     }
 
index 9778441..741ade4 100644 (file)
@@ -82,6 +82,8 @@ private:
     void didInitializePageGroup(WKBundlePageGroupRef);
     void didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody);
 
+    void resetLocalSettings();
+
     void beginTesting();
 
     WKBundleRef m_bundle;
index 3c58b26..2c2566c 100644 (file)
@@ -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
index 447e871..0c4a70d 100644 (file)
@@ -131,6 +131,8 @@ public:
     void evaluateInWebInspector(long callId, JSStringRef script);
     void setTimelineProfilingEnabled(bool);
 
+    void setPOSIXLocale(JSStringRef);
+
 private:
     static const double waitToDumpWatchdogTimerInterval;