[GTK] [WK2] TestWebKitWebView page-visibility fails

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: http://svn.webkit.org/repository/webkit/trunk@154818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 31da4579
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
......
......@@ -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));
......
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