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

Side by Side Diff: chrome/browser/ui/find_bar/find_bar_host_browsertest.cc

Issue 12220139: find_bar: Convert a bunch of string constants to char array. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/file_util.h" 5 #include "base/file_util.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/common/cancelable_request.h" 10 #include "chrome/browser/common/cancelable_request.h"
(...skipping 22 matching lines...) Expand all
33 #include "content/public/browser/web_contents.h" 33 #include "content/public/browser/web_contents.h"
34 #include "content/public/browser/web_contents_view.h" 34 #include "content/public/browser/web_contents_view.h"
35 #include "content/public/test/browser_test_utils.h" 35 #include "content/public/test/browser_test_utils.h"
36 #include "net/base/net_util.h" 36 #include "net/base/net_util.h"
37 #include "ui/base/accelerators/accelerator.h" 37 #include "ui/base/accelerators/accelerator.h"
38 #include "ui/base/keycodes/keyboard_codes.h" 38 #include "ui/base/keycodes/keyboard_codes.h"
39 39
40 using content::NavigationController; 40 using content::NavigationController;
41 using content::WebContents; 41 using content::WebContents;
42 42
43 const std::string kAnchorPage = "anchor.html"; 43 namespace {
44 const std::string kAnchor = "#chapter2"; 44
45 const std::string kFramePage = "frames.html"; 45 const char kAnchorPage[] = "anchor.html";
46 const std::string kFrameData = "framedata_general.html"; 46 const char kAnchor[] = "#chapter2";
47 const std::string kUserSelectPage = "user-select.html"; 47 const char kFramePage[] = "frames.html";
48 const std::string kCrashPage = "crash_1341577.html"; 48 const char kFrameData[] = "framedata_general.html";
49 const std::string kTooFewMatchesPage = "bug_1155639.html"; 49 const char kUserSelectPage[] = "user-select.html";
50 const std::string kLongTextareaPage = "large_textarea.html"; 50 const char kCrashPage[] = "crash_1341577.html";
51 const std::string kEndState = "end_state.html"; 51 const char kTooFewMatchesPage[] = "bug_1155639.html";
52 const std::string kPrematureEnd = "premature_end.html"; 52 const char kLongTextareaPage[] = "large_textarea.html";
53 const std::string kMoveIfOver = "move_if_obscuring.html"; 53 const char kEndState[] = "end_state.html";
54 const std::string kBitstackCrash = "crash_14491.html"; 54 const char kPrematureEnd[] = "premature_end.html";
55 const std::string kSelectChangesOrdinal = "select_changes_ordinal.html"; 55 const char kMoveIfOver[] = "move_if_obscuring.html";
56 const std::string kStartAfterSelection = "start_after_selection.html"; 56 const char kBitstackCrash[] = "crash_14491.html";
57 const std::string kSimple = "simple.html"; 57 const char kSelectChangesOrdinal[] = "select_changes_ordinal.html";
58 const std::string kLinkPage = "link.html"; 58 const char kStartAfterSelection[] = "start_after_selection.html";
59 const char kSimple[] = "simple.html";
60 const char kLinkPage[] = "link.html";
59 61
60 const bool kBack = false; 62 const bool kBack = false;
61 const bool kFwd = true; 63 const bool kFwd = true;
62 64
63 const bool kIgnoreCase = false; 65 const bool kIgnoreCase = false;
64 const bool kCaseSensitive = true; 66 const bool kCaseSensitive = true;
65 67
66 const int kMoveIterations = 30; 68 const int kMoveIterations = 30;
67 69
68 namespace {
69
70 void HistoryServiceQueried(int) { 70 void HistoryServiceQueried(int) {
71 MessageLoop::current()->Quit(); 71 MessageLoop::current()->Quit();
72 } 72 }
73 73
74 } // namespace 74 } // namespace
75 75
76 class FindInPageControllerTest : public InProcessBrowserTest { 76 class FindInPageControllerTest : public InProcessBrowserTest {
77 public: 77 public:
78 FindInPageControllerTest() { 78 FindInPageControllerTest() {
79 chrome::DisableFindBarAnimationsDuringTesting(true); 79 chrome::DisableFindBarAnimationsDuringTesting(true);
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 content::RunAllPendingInMessageLoop(); // Needed on Linux. 1495 content::RunAllPendingInMessageLoop(); // Needed on Linux.
1496 EXPECT_TRUE(GetFindBarWindowInfo(&position, NULL)); 1496 EXPECT_TRUE(GetFindBarWindowInfo(&position, NULL));
1497 1497
1498 ui_test_utils::NavigateToURLWithDisposition( 1498 ui_test_utils::NavigateToURLWithDisposition(
1499 browser(), url, NEW_FOREGROUND_TAB, 1499 browser(), url, NEW_FOREGROUND_TAB,
1500 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 1500 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
1501 chrome::CloseTab(browser()); 1501 chrome::CloseTab(browser());
1502 EXPECT_TRUE(GetFindBarWindowInfo(&position2, NULL)); 1502 EXPECT_TRUE(GetFindBarWindowInfo(&position2, NULL));
1503 EXPECT_EQ(position, position2); 1503 EXPECT_EQ(position, position2);
1504 } 1504 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698