[GTK] [WK2] TestWebKitWebView page-visibility fails
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Aug 2013 17:22:16 +0000 (17:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Aug 2013 17:22:16 +0000 (17:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=120406

Patch by Brian Holt <brian.holt@samsung.com> on 2013-08-29
Reviewed by Gustavo Noronha Silva.

Removed the webkit prefix for document visibility properties.

* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewPageVisibility):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154818 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp

index c636c11c7128fdda819334905528254c20b40d71..fe4fa6ad0fb97719590d8b00b8a284e1c956e895 100644 (file)
@@ -1,3 +1,15 @@
+2013-08-29  Brian Holt  <brian.holt@samsung.com>
+
+        [GTK] [WK2] TestWebKitWebView page-visibility fails
+        https://bugs.webkit.org/show_bug.cgi?id=120406
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Removed the webkit prefix for document visibility properties.
+
+        * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
+        (testWebViewPageVisibility):
+
 2013-08-28  Chris Curtis  <chris_curtis@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=119548
index 6ffe514c271539b169e4ca2d5e09c890e2643242..28a08f3021339f785027b870fe4759a638f3faca 100644 (file)
@@ -1093,9 +1093,9 @@ static void testWebViewPageVisibility(WebViewTest* test, gconstpointer)
     test->loadHtml("<html><title></title>"
         "<body><p>Test Web Page Visibility</p>"
         "<script>"
-        "document.addEventListener(\"webkitvisibilitychange\", onVisibilityChange, false);"
+        "document.addEventListener(\"visibilitychange\", onVisibilityChange, false);"
         "function onVisibilityChange() {"
-        "    document.title = document.webkitVisibilityState;"
+        "    document.title = document.visibilityState;"
         "}"
         "</script>"
         "</body></html>",
@@ -1105,13 +1105,13 @@ static void testWebViewPageVisibility(WebViewTest* test, gconstpointer)
     test->waitUntilLoadFinished();
 
     GOwnPtr<GError> error;
-    WebKitJavascriptResult* javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitVisibilityState;", &error.outPtr());
+    WebKitJavascriptResult* javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.visibilityState;", &error.outPtr());
     g_assert(javascriptResult);
     g_assert(!error.get());
     GOwnPtr<char> valueString(WebViewTest::javascriptResultToCString(javascriptResult));
     g_assert_cmpstr(valueString.get(), ==, "hidden");
 
-    javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitHidden;", &error.outPtr());
+    javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.hidden;", &error.outPtr());
     g_assert(javascriptResult);
     g_assert(!error.get());
     g_assert(WebViewTest::javascriptResultToBoolean(javascriptResult));
@@ -1120,13 +1120,13 @@ static void testWebViewPageVisibility(WebViewTest* test, gconstpointer)
     test->showInWindow();
     test->waitUntilTitleChanged();
 
-    javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitVisibilityState;", &error.outPtr());
+    javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.visibilityState;", &error.outPtr());
     g_assert(javascriptResult);
     g_assert(!error.get());
     valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
     g_assert_cmpstr(valueString.get(), ==, "visible");
 
-    javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitHidden;", &error.outPtr());
+    javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.hidden;", &error.outPtr());
     g_assert(javascriptResult);
     g_assert(!error.get());
     g_assert(!WebViewTest::javascriptResultToBoolean(javascriptResult));
@@ -1135,13 +1135,13 @@ static void testWebViewPageVisibility(WebViewTest* test, gconstpointer)
     gtk_widget_hide(GTK_WIDGET(test->m_webView));
     test->waitUntilTitleChanged();
 
-    javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitVisibilityState;", &error.outPtr());
+    javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.visibilityState;", &error.outPtr());
     g_assert(javascriptResult);
     g_assert(!error.get());
     valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
     g_assert_cmpstr(valueString.get(), ==, "hidden");
 
-    javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.webkitHidden;", &error.outPtr());
+    javascriptResult = test->runJavaScriptAndWaitUntilFinished("document.hidden;", &error.outPtr());
     g_assert(javascriptResult);
     g_assert(!error.get());
     g_assert(WebViewTest::javascriptResultToBoolean(javascriptResult));