diff options
-rw-r--r-- | chrome/renderer/render_view.cc | 6 | ||||
-rw-r--r-- | chrome/renderer/render_view_unittest_mac.mm | 13 | ||||
-rw-r--r-- | chrome/test/render_view_test.h | 2 |
3 files changed, 12 insertions, 9 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index ac31fde..8bcc309 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1520,9 +1520,9 @@ bool RenderView::handleCurrentKeyboardEvent() { bool did_execute_command = false; for (; it != end; ++it) { - // In gtk, it's possible to bind multiple edit commands to one key (but it's - // the exception). Once one edit command is not executed, it seems safest to - // not execute the rest. + // In gtk and cocoa, it's possible to bind multiple edit commands to one + // key (but it's the exception). Once one edit command is not executed, it + // seems safest to not execute the rest. if (!frame->executeCommand(WebString::fromUTF8(it->name), WebString::fromUTF8(it->value))) break; diff --git a/chrome/renderer/render_view_unittest_mac.mm b/chrome/renderer/render_view_unittest_mac.mm index e146f1e..c2c766f 100644 --- a/chrome/renderer/render_view_unittest_mac.mm +++ b/chrome/renderer/render_view_unittest_mac.mm @@ -12,12 +12,16 @@ #include <Carbon/Carbon.h> // for the kVK_* constants. NSEvent* CmdDeadKeyEvent(NSEventType type, unsigned short code) { - UniChar uniChar = 0; switch(code) { - case kVK_UpArrow: uniChar = NSUpArrowFunctionKey; break; - case kVK_DownArrow: uniChar = NSDownArrowFunctionKey; break; - default: CHECK(false); + case kVK_UpArrow: + uniChar = NSUpArrowFunctionKey; + break; + case kVK_DownArrow: + uniChar = NSDownArrowFunctionKey; + break; + default: + CHECK(false); } NSString* s = [NSString stringWithFormat:@"%C", uniChar]; @@ -36,7 +40,6 @@ NSEvent* CmdDeadKeyEvent(NSEventType type, unsigned short code) { // Test that cmd-up/down scrolls the page exactly if it is not intercepted by // javascript. TEST_F(RenderViewTest, MacTestCmdUp) { - // Some preprocessor trickery so that we can have literal html in our source, // makes it easier to copy html to and from an html file for testing (the // preprocessor will remove the newlines at the line ends, turning this into diff --git a/chrome/test/render_view_test.h b/chrome/test/render_view_test.h index 45f8369..df4e2d3 100644 --- a/chrome/test/render_view_test.h +++ b/chrome/test/render_view_test.h @@ -10,8 +10,8 @@ #include "base/command_line.h" #include "base/scoped_ptr.h" #include "chrome/common/main_function_params.h" -#include "chrome/common/sandbox_init_wrapper.h" #include "chrome/common/native_web_keyboard_event.h" +#include "chrome/common/sandbox_init_wrapper.h" #include "chrome/renderer/mock_keyboard.h" #include "chrome/renderer/mock_render_process.h" #include "chrome/renderer/mock_render_thread.h" |