Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: chrome/browser/extensions/extension_keybinding_apitest.cc

Issue 635573005: Cleanup: Better constify some strings in chrome/browser/{chromeos,extensions}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cros, really Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/extensions/active_tab_permission_granter.h" 6 #include "chrome/browser/extensions/active_tab_permission_granter.h"
7 #include "chrome/browser/extensions/api/commands/command_service.h" 7 #include "chrome/browser/extensions/api/commands/command_service.h"
8 #include "chrome/browser/extensions/browser_action_test_util.h" 8 #include "chrome/browser/extensions/browser_action_test_util.h"
9 #include "chrome/browser/extensions/extension_action.h" 9 #include "chrome/browser/extensions/extension_action.h"
10 #include "chrome/browser/extensions/extension_action_manager.h" 10 #include "chrome/browser/extensions/extension_action_manager.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 "1"); 366 "1");
367 367
368 ASSERT_TRUE(RunExtensionTest("keybinding/basics")) 368 ASSERT_TRUE(RunExtensionTest("keybinding/basics"))
369 << message_; 369 << message_;
370 370
371 CommandService* command_service = CommandService::Get(browser()->profile()); 371 CommandService* command_service = CommandService::Get(browser()->profile());
372 372
373 const Extension* extension = GetSingleLoadedExtension(); 373 const Extension* extension = GetSingleLoadedExtension();
374 // Simulate the user setting the keybinding to Ctrl+D. 374 // Simulate the user setting the keybinding to Ctrl+D.
375 #if defined(OS_MACOSX) 375 #if defined(OS_MACOSX)
376 const char* hotkey = "Command+D"; 376 const char hotkey[] = "Command+D";
377 #else 377 #else
378 const char* hotkey = "Ctrl+D"; 378 const char hotkey[] = "Ctrl+D";
379 #endif // defined(OS_MACOSX) 379 #endif // defined(OS_MACOSX)
380 command_service->UpdateKeybindingPrefs( 380 command_service->UpdateKeybindingPrefs(
381 extension->id(), manifest_values::kBrowserActionCommandEvent, hotkey); 381 extension->id(), manifest_values::kBrowserActionCommandEvent, hotkey);
382 382
383 ui_test_utils::NavigateToURL(browser(), 383 ui_test_utils::NavigateToURL(browser(),
384 test_server()->GetURL( 384 test_server()->GetURL(
385 "files/extensions/test_file_with_ctrl-d_keybinding.html")); 385 "files/extensions/test_file_with_ctrl-d_keybinding.html"));
386 386
387 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); 387 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
388 ASSERT_TRUE(tab); 388 ASSERT_TRUE(tab);
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 #define MAYBE_ChromeOSConversions DISABLED_ChromeOSConversions 772 #define MAYBE_ChromeOSConversions DISABLED_ChromeOSConversions
773 #else 773 #else
774 #define MAYBE_ChromeOSConversions ChromeOSConversions 774 #define MAYBE_ChromeOSConversions ChromeOSConversions
775 #endif 775 #endif
776 IN_PROC_BROWSER_TEST_F(CommandsApiTest, MAYBE_ChromeOSConversions) { 776 IN_PROC_BROWSER_TEST_F(CommandsApiTest, MAYBE_ChromeOSConversions) {
777 RunChromeOSConversionTest("keybinding/chromeos_conversions"); 777 RunChromeOSConversionTest("keybinding/chromeos_conversions");
778 } 778 }
779 #endif // OS_CHROMEOS 779 #endif // OS_CHROMEOS
780 780
781 } // namespace extensions 781 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698