Title: [212630] trunk/Tools
- Revision
- 212630
- Author
- carlo...@webkit.org
- Date
- 2017-02-20 02:03:09 -0800 (Mon, 20 Feb 2017)
Log Message
Unreviewed. Fix GTK+ test /webkit2/WebKitWebView/default-menu.
It can happen that the window onload event is dispatched after the load finished is received in the UI
process. Move the script to select the text to the body instead of using a window onload handler.
* TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:
(testContextMenuDefaultMenu):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (212629 => 212630)
--- trunk/Tools/ChangeLog 2017-02-20 10:01:22 UTC (rev 212629)
+++ trunk/Tools/ChangeLog 2017-02-20 10:03:09 UTC (rev 212630)
@@ -1,3 +1,13 @@
+2017-02-20 Carlos Garcia Campos <cgar...@igalia.com>
+
+ Unreviewed. Fix GTK+ test /webkit2/WebKitWebView/default-menu.
+
+ It can happen that the window onload event is dispatched after the load finished is received in the UI
+ process. Move the script to select the text to the body instead of using a window onload handler.
+
+ * TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:
+ (testContextMenuDefaultMenu):
+
2017-02-20 Manuel Rego Casasnovas <r...@igalia.com>
[css-grid] Remove compilation flag ENABLE_CSS_GRID_LAYOUT
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp (212629 => 212630)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp 2017-02-20 10:01:22 UTC (rev 212629)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp 2017-02-20 10:03:09 UTC (rev 212630)
@@ -371,16 +371,7 @@
GUniquePtr<char> baseDir(g_strdup_printf("file://%s/", Test::getResourcesDir().data()));
const char* linksHTML =
- "<html><head>"
- " <script>"
- " window._onload_ = function () {"
- " window.getSelection().removeAllRanges();"
- " var select_range = document.createRange();"
- " select_range.selectNodeContents(document.getElementById('text_to_select'));"
- " window.getSelection().addRange(select_range);"
- " }"
- " </script>"
- "</head><body>"
+ "<html><body>"
" <a style='position:absolute; left:1; top:1' href='' title='WebKitGTK+ Title'>WebKitGTK+ Website</a>"
" <img style='position:absolute; left:1; top:10' src='' width=5 height=5></img>"
" <a style='position:absolute; left:1; top:20' href='' title='WebKitGTK+ Logo'><img src='' width=5 height=5></img></a>"
@@ -388,6 +379,12 @@
" <video style='position:absolute; left:1; top:50' width='300' height='300' controls='controls' preload='none'><source src='' type='video/mpeg' /></video>"
" <audio style='position:absolute; left:1; top:60' width='50' height='20' controls='controls' preload='none'><source src='' type='audio/ogg' /></audio>"
" <p style='position:absolute; left:1; top:90' id='text_to_select'>Lorem ipsum.</p>"
+ " <script>"
+ " window.getSelection().removeAllRanges();"
+ " var select_range = document.createRange();"
+ " select_range.selectNodeContents(document.getElementById('text_to_select'));"
+ " window.getSelection().addRange(select_range);"
+ " </script>"
"</body></html>";
test->loadHtml(linksHTML, baseDir.get());
test->waitUntilLoadFinished();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes