Diff
Modified: trunk/LayoutTests/ChangeLog (93813 => 93814)
--- trunk/LayoutTests/ChangeLog 2011-08-25 20:21:40 UTC (rev 93813)
+++ trunk/LayoutTests/ChangeLog 2011-08-25 20:26:39 UTC (rev 93814)
@@ -1,3 +1,15 @@
+2011-08-25 Anders Carlsson <[email protected]>
+
+ Return the correct value for NPNVsupportsCarbonBool
+ https://bugs.webkit.org/show_bug.cgi?id=66964
+
+ Reviewed by Adam Roben.
+
+ Add test.
+
+ * platform/mac/plugins/supports-carbon-event-model-expected.txt: Added.
+ * platform/mac/plugins/supports-carbon-event-model.html: Added.
+
2011-08-24 Peter Kasting <[email protected]>
[chromium] Further attempts to clean up the test expectations by being
Added: trunk/LayoutTests/platform/mac/plugins/supports-carbon-event-model-expected.txt (0 => 93814)
--- trunk/LayoutTests/platform/mac/plugins/supports-carbon-event-model-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/plugins/supports-carbon-event-model-expected.txt 2011-08-25 20:26:39 UTC (rev 93814)
@@ -0,0 +1,3 @@
+
+This tests that WebKit correctly reports that the Carbon event model is supported.
+SUCCESS!
Added: trunk/LayoutTests/platform/mac/plugins/supports-carbon-event-model.html (0 => 93814)
--- trunk/LayoutTests/platform/mac/plugins/supports-carbon-event-model.html (rev 0)
+++ trunk/LayoutTests/platform/mac/plugins/supports-carbon-event-model.html 2011-08-25 20:26:39 UTC (rev 93814)
@@ -0,0 +1,16 @@
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
+
+<embed id="testPlugin"
+ type="application/x-webkit-test-netscape"
+ test="supports-carbon-event-model">
+</embed>
+
+<div>
+ This tests that WebKit correctly reports that the Carbon event model is supported.
+</div>
+<div id="result">FAILURE</div>
+</body>
+</html>
Modified: trunk/Source/WebKit2/ChangeLog (93813 => 93814)
--- trunk/Source/WebKit2/ChangeLog 2011-08-25 20:21:40 UTC (rev 93813)
+++ trunk/Source/WebKit2/ChangeLog 2011-08-25 20:26:39 UTC (rev 93814)
@@ -1,3 +1,14 @@
+2011-08-25 Anders Carlsson <[email protected]>
+
+ Return the correct value for NPNVsupportsCarbonBool
+ https://bugs.webkit.org/show_bug.cgi?id=66964
+
+ Reviewed by Adam Roben.
+
+ * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
+ (WebKit::NPN_GetValue):
+ Remove a FIXME and set the value to true.
+
2011-08-25 Alexis Menard <[email protected]>
[Qt][WK2] Remove QWKContext class and make sure the WebProcessProxy life is correctly managed.
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp (93813 => 93814)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp 2011-08-25 20:21:40 UTC (rev 93813)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp 2011-08-25 20:26:39 UTC (rev 93814)
@@ -489,8 +489,7 @@
#endif
#ifndef NP_NO_CARBON
case NPNVsupportsCarbonBool:
- // FIXME: We should support the Carbon event model.
- *(NPBool*)value = false;
+ *(NPBool*)value = true;
break;
#endif
#elif PLATFORM(WIN)
Modified: trunk/Tools/ChangeLog (93813 => 93814)
--- trunk/Tools/ChangeLog 2011-08-25 20:21:40 UTC (rev 93813)
+++ trunk/Tools/ChangeLog 2011-08-25 20:26:39 UTC (rev 93814)
@@ -1,3 +1,19 @@
+2011-08-25 Anders Carlsson <[email protected]>
+
+ Return the correct value for NPNVsupportsCarbonBool
+ https://bugs.webkit.org/show_bug.cgi?id=66964
+
+ Add a test.
+
+ Reviewed by Adam Roben.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/TestNetscapePlugIn/Tests/mac/SupportsCarbonEventModel.cpp: Added.
+ (SupportsCarbonEventModel::SupportsCarbonEventModel):
+ (SupportsCarbonEventModel::testConvert):
+ (SupportsCarbonEventModel::runTest):
+ (SupportsCarbonEventModel::NPP_New):
+
2011-08-25 Dimitri Glazkov <[email protected]>
garden-o-matic summary view should not be broken.
Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj (93813 => 93814)
--- trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj 2011-08-25 20:21:40 UTC (rev 93813)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj 2011-08-25 20:26:39 UTC (rev 93814)
@@ -32,6 +32,7 @@
141BF439096A455900E0753C /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE8257EF08D22389000507AB /* Carbon.framework */; };
141BF453096A45EB00E0753C /* PluginObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 141BF447096A45C800E0753C /* PluginObject.h */; };
14770FE20A22ADF7009342EE /* GCController.h in Headers */ = {isa = PBXBuildFile; fileRef = 14770FE00A22ADF7009342EE /* GCController.h */; };
+ 1A14C8A51406DE0400B254F7 /* SupportsCarbonEventModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A14C8A31406DE0400B254F7 /* SupportsCarbonEventModel.cpp */; };
1A215A8111F2609C008AD0F5 /* PluginTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A215A7F11F2609C008AD0F5 /* PluginTest.cpp */; };
1A215A8211F2609C008AD0F5 /* PluginTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A215A8011F2609C008AD0F5 /* PluginTest.h */; };
1A215BE711F27658008AD0F5 /* DocumentOpenInDestroyStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A215A7511F26072008AD0F5 /* DocumentOpenInDestroyStream.cpp */; };
@@ -214,6 +215,7 @@
141BF447096A45C800E0753C /* PluginObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PluginObject.h; sourceTree = "<group>"; };
141BF448096A45C800E0753C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; name = Info.plist; path = mac/Info.plist; sourceTree = "<group>"; };
14770FE00A22ADF7009342EE /* GCController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCController.h; sourceTree = "<group>"; };
+ 1A14C8A31406DE0400B254F7 /* SupportsCarbonEventModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SupportsCarbonEventModel.cpp; sourceTree = "<group>"; };
1A215A7511F26072008AD0F5 /* DocumentOpenInDestroyStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentOpenInDestroyStream.cpp; sourceTree = "<group>"; };
1A215A7F11F2609C008AD0F5 /* PluginTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginTest.cpp; sourceTree = "<group>"; };
1A215A8011F2609C008AD0F5 /* PluginTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginTest.h; sourceTree = "<group>"; };
@@ -519,6 +521,7 @@
isa = PBXGroup;
children = (
1A31EB3713466AC100017372 /* ConvertPoint.cpp */,
+ 1A14C8A31406DE0400B254F7 /* SupportsCarbonEventModel.cpp */,
);
path = mac;
sourceTree = "<group>";
@@ -827,6 +830,7 @@
1A5CC1F5137DD2EC00A5D7E7 /* GetURLWithJavaScriptURL.cpp in Sources */,
1AFF66BC137DEFD200791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp in Sources */,
4AD6A11413C8124000EA9737 /* FormValue.cpp in Sources */,
+ 1A14C8A51406DE0400B254F7 /* SupportsCarbonEventModel.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Added: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/SupportsCarbonEventModel.cpp (0 => 93814)
--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/SupportsCarbonEventModel.cpp (rev 0)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/SupportsCarbonEventModel.cpp 2011-08-25 20:26:39 UTC (rev 93814)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "PluginTest.h"
+
+using namespace std;
+
+// Test that we report that we support the Carbon event model in 32-bit.
+class SupportsCarbonEventModel : public PluginTest {
+public:
+ SupportsCarbonEventModel(NPP npp, const string& identifier)
+ : PluginTest(npp, identifier)
+ {
+ }
+
+private:
+ bool runTest()
+ {
+#ifdef NP_NO_CARBON
+ // There's no support for Carbon, so we can't test anything.
+ return true;
+#else
+ NPBool supportsCarbonEventModel = false;
+ if (NPN_GetValue(NPNVsupportsCarbonBool, &supportsCarbonEventModel) != NPERR_NO_ERROR)
+ return false;
+
+ return supportsCarbonEventModel;
+#endif
+ }
+
+ virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved)
+ {
+ if (runTest())
+ executeScript("document.getElementById('result').innerHTML = 'SUCCESS!'");
+
+ return NPERR_NO_ERROR;
+ }
+};
+
+static PluginTest::Register<SupportsCarbonEventModel> supportsCarbonEventModel("supports-carbon-event-model");