Title: [221240] trunk/Tools
- Revision
- 221240
- Author
- [email protected]
- Date
- 2017-08-28 04:46:14 -0700 (Mon, 28 Aug 2017)
Log Message
Ensure that the alert function is called in TestWebExtensions.
https://bugs.webkit.org/show_bug.cgi?id=175880
Patch by Ms2ger <[email protected]> on 2017-08-28
Reviewed by Carlos Garcia Campos.
The test relied on a bug in the HTMLDocument _javascript_ bindings: when calling
document.open() with three arguments, it would call any function set as the
"open" property on the window object, rather than just the real Window::open()
method. This bug was fixed by the removal of custom bindings for HTMLDocument
in r218437. As a result, the test no longer called alert(), which caused it to
fail.
Instead, call the window.open() function directly.
* TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
(testWebExtensionIsolatedWorld):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (221239 => 221240)
--- trunk/Tools/ChangeLog 2017-08-28 11:23:13 UTC (rev 221239)
+++ trunk/Tools/ChangeLog 2017-08-28 11:46:14 UTC (rev 221240)
@@ -1,3 +1,22 @@
+2017-08-28 Ms2ger <[email protected]>
+
+ Ensure that the alert function is called in TestWebExtensions.
+ https://bugs.webkit.org/show_bug.cgi?id=175880
+
+ Reviewed by Carlos Garcia Campos.
+
+ The test relied on a bug in the HTMLDocument _javascript_ bindings: when calling
+ document.open() with three arguments, it would call any function set as the
+ "open" property on the window object, rather than just the real Window::open()
+ method. This bug was fixed by the removal of custom bindings for HTMLDocument
+ in r218437. As a result, the test no longer called alert(), which caused it to
+ fail.
+
+ Instead, call the window.open() function directly.
+
+ * TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
+ (testWebExtensionIsolatedWorld):
+
2017-08-27 Wenson Hsieh <[email protected]>
Picking an emoji via the emoji dialog (Ctrl+Cmd+Space) fires inconsistent beforeinput events.
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp (221239 => 221240)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp 2017-08-28 11:23:13 UTC (rev 221239)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp 2017-08-28 11:46:14 UTC (rev 221240)
@@ -148,7 +148,7 @@
"top.foo = 'Foo';\n"
"document.getElementById('console').innerHTML = top.foo;\n"
"window.open = function () { alert('Main World'); }\n"
- "document.open(1, 2, 3);";
+ "window.open();";
test->runJavaScriptAndWaitUntilFinished(mainWorldScript, 0);
g_assert_cmpstr(scriptDialogResult.get(), ==, "Main World");
@@ -160,7 +160,7 @@
static const char* isolatedWorldScript =
"document.getElementById('console').innerHTML = top.foo;\n"
"window.open = function () { alert('Isolated World'); }\n"
- "document.open(1, 2, 3);";
+ "window.open();";
GUniquePtr<char> extensionBusName(g_strdup_printf("org.webkit.gtk.WebExtensionTest%u", Test::s_webExtensionID));
GRefPtr<GDBusProxy> proxy = adoptGRef(bus->createProxy(extensionBusName.get(),
"/org/webkit/gtk/WebExtensionTest" , "org.webkit.gtk.WebExtensionTest", test->m_mainLoop));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes