[Mac] Unreviewed test fix after r182584
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Apr 2015 05:38:02 +0000 (05:38 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Apr 2015 05:38:02 +0000 (05:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143452

Source/WebCore:

Correct bit comparison to use the correct value for the Control-key

* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::typeForEvent):

Source/WebKit2:

Correct bit comparison to use the correct value for the Control-key

* Shared/mac/WebEventFactory.mm:
(WebKit::typeForEvent):

Tools:

Put both of these tests back to their original state now that the underlying
problem is fixed.

* TestWebKitAPI/Tests/WebKit2/MenuTypesForMouseEvents.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/mac/MenuTypesForMouseEvents.mm:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182589 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/PlatformEventFactoryMac.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/mac/WebEventFactory.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2/MenuTypesForMouseEvents.cpp
Tools/TestWebKitAPI/Tests/mac/MenuTypesForMouseEvents.mm

index 309c8f2..6419592 100644 (file)
@@ -1,3 +1,13 @@
+2015-04-08  Brent Fulgham  <bfulgham@apple.com>
+
+        [Mac] Unreviewed test fix after r182584
+        https://bugs.webkit.org/show_bug.cgi?id=143452
+
+        Correct bit comparison to use the correct value for the Control-key
+
+        * platform/mac/PlatformEventFactoryMac.mm:
+        (WebCore::typeForEvent):
+
 2015-04-08  Simon Fraser  <simon.fraser@apple.com>
 
         Add a debug assertion that will fire if we try to paint layer contents on a background thread
index 314fb1d..f32d640 100644 (file)
@@ -403,7 +403,7 @@ static int typeForEvent(NSEvent *event)
     if (mouseButtonForEvent(event) == RightButton)
         return static_cast<int>(NSMenuTypeContextMenu);
 
-    if (mouseButtonForEvent(event) == LeftButton && (modifiersForEvent(event) & NSControlKeyMask))
+    if (mouseButtonForEvent(event) == LeftButton && (modifiersForEvent(event) & PlatformEvent::CtrlKey))
         return static_cast<int>(NSMenuTypeContextMenu);
 
     return static_cast<int>(NSMenuTypeNone);
index 2183a4c..8e5fbf0 100644 (file)
@@ -1,3 +1,13 @@
+2015-04-08  Brent Fulgham  <bfulgham@apple.com>
+
+        [Mac] Unreviewed test fix after r182584
+        https://bugs.webkit.org/show_bug.cgi?id=143452
+
+        Correct bit comparison to use the correct value for the Control-key
+
+        * Shared/mac/WebEventFactory.mm:
+        (WebKit::typeForEvent):
+
 2015-04-08  Jaehun Lim  <ljaehun.lim@samsung.com>
 
         [EFL] Create PageUIClientEfl after sending CreateWebPage message
index 04fc472..7533ac7 100644 (file)
@@ -347,7 +347,7 @@ static int typeForEvent(NSEvent *event)
     if (mouseButtonForEvent(event) == WebMouseEvent::RightButton)
         return static_cast<int>(NSMenuTypeContextMenu);
     
-    if (mouseButtonForEvent(event) == WebMouseEvent::LeftButton && (modifiersForEvent(event) & NSControlKeyMask))
+    if (mouseButtonForEvent(event) == WebMouseEvent::LeftButton && (modifiersForEvent(event) & WebEvent::ControlKey))
         return static_cast<int>(NSMenuTypeContextMenu);
     
     return static_cast<int>(NSMenuTypeNone);
index 1dc7a09..35a453f 100644 (file)
@@ -1,3 +1,16 @@
+2015-04-08  Brent Fulgham  <bfulgham@apple.com>
+
+        [Mac] Unreviewed test fix after r182584
+        https://bugs.webkit.org/show_bug.cgi?id=143452
+
+        Put both of these tests back to their original state now that the underlying
+        problem is fixed.
+
+        * TestWebKitAPI/Tests/WebKit2/MenuTypesForMouseEvents.cpp:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/mac/MenuTypesForMouseEvents.mm:
+        (TestWebKitAPI::TEST):
+
 2015-04-08  Filip Pizlo  <fpizlo@apple.com>
 
         run-jsc-benchmarks geomean of preferred means shouldn't print the VMs header twice
index bb98002..f77a11a 100644 (file)
@@ -86,8 +86,7 @@ TEST(WebKit2, MenuAndButtonForNormalMiddleClick)
 
 TEST(WebKit2, MenuAndButtonForControlLeftClick)
 {
-    // Note: This is controlled by a Mouse system preference. Check settings if this is failing.
-    buildAndPerformTest(kWKEventMouseButtonLeftButton, kWKEventModifiersControlKey, "0", "none");
+    buildAndPerformTest(kWKEventMouseButtonLeftButton, kWKEventModifiersControlKey, "0", "context");
 }
 
 TEST(WebKit2, MenuAndButtonForControlRightClick)
index 0b0d305..03f0f74 100644 (file)
@@ -78,8 +78,7 @@ TEST(WebKit1, MenuAndButtonForNormalMiddleClick)
 
 TEST(WebKit1, MenuAndButtonForControlLeftClick)
 {
-    // Note: This is controlled by a Mouse system preference. Check settings if this is failing.
-    buildAndPerformTest(NSLeftMouseDown, NSControlKeyMask, WebCore::LeftButton, NSMenuTypeNone);
+    buildAndPerformTest(NSLeftMouseDown, NSControlKeyMask, WebCore::LeftButton, NSMenuTypeContextMenu);
 }
 
 TEST(WebKit1, MenuAndButtonForControlRightClick)