Title: [221362] releases/WebKitGTK/webkit-2.18/Tools
Revision
221362
Author
carlo...@webkit.org
Date
2017-08-30 03:14:08 -0700 (Wed, 30 Aug 2017)

Log Message

Merge r221240 - Ensure that the alert function is called in TestWebExtensions.
https://bugs.webkit.org/show_bug.cgi?id=175880

Patch by Ms2ger <ms2...@gmail.com> 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: releases/WebKitGTK/webkit-2.18/Tools/ChangeLog (221361 => 221362)


--- releases/WebKitGTK/webkit-2.18/Tools/ChangeLog	2017-08-30 10:12:18 UTC (rev 221361)
+++ releases/WebKitGTK/webkit-2.18/Tools/ChangeLog	2017-08-30 10:14:08 UTC (rev 221362)
@@ -1,3 +1,22 @@
+2017-08-28  Ms2ger  <ms2...@gmail.com>
+
+        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-20  Sam Weinig  <s...@webkit.org>
 
         StringView could use a function to strip leading/trailing characters without allocation

Modified: releases/WebKitGTK/webkit-2.18/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp (221361 => 221362)


--- releases/WebKitGTK/webkit-2.18/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp	2017-08-30 10:12:18 UTC (rev 221361)
+++ releases/WebKitGTK/webkit-2.18/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp	2017-08-30 10:14:08 UTC (rev 221362)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to