summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 14:59:33 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 14:59:33 +0000
commite6e1501235c39803ea97000a94f9cd9f00de303e (patch)
tree89fff8c96109b58f9870ec5fc1cbf62d5274a7a7
parentc7c9b8ff8028602c0f39f4e12af4976f06cc1f30 (diff)
downloadchromium_src-e6e1501235c39803ea97000a94f9cd9f00de303e.zip
chromium_src-e6e1501235c39803ea97000a94f9cd9f00de303e.tar.gz
chromium_src-e6e1501235c39803ea97000a94f9cd9f00de303e.tar.bz2
Address review comments.
Belongs to http://codereview.chromium.org/254002 BUG=none TEST=none Review URL: http://codereview.chromium.org/244044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27609 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/renderer/render_view.cc6
-rw-r--r--chrome/renderer/render_view_unittest_mac.mm13
-rw-r--r--chrome/test/render_view_test.h2
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"