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

Side by Side Diff: chrome_frame/test/ui_test.cc

Issue 112433004: Update uses of UTF conversions in chrome_frame/, chromeos/, components/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | « chrome_frame/test/test_with_web_server.cc ('k') | chrome_frame/test/util_unittests.cc » ('j') | 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 <mshtmcid.h> 5 #include <mshtmcid.h>
6 #include <string> 6 #include <string>
7 7
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/test/test_file_util.h" 10 #include "base/test/test_file_util.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 if (!GetParam().invokes_cf()) { 74 if (!GetParam().invokes_cf()) {
75 LOG(ERROR) << "Test not implemented for this configuration."; 75 LOG(ERROR) << "Test not implemented for this configuration.";
76 return; 76 return;
77 } 77 }
78 std::wstring key_event_url = GetTestUrl(L"keyevent.html"); 78 std::wstring key_event_url = GetTestUrl(L"keyevent.html");
79 79
80 static const char input[] = "chrome"; 80 static const char input[] = "chrome";
81 EXPECT_CALL(ie_mock_, OnLoad(GetParam().invokes_cf(), StrEq(key_event_url))) 81 EXPECT_CALL(ie_mock_, OnLoad(GetParam().invokes_cf(), StrEq(key_event_url)))
82 .WillOnce(PostKeyMessagesToRenderer(&ie_mock_, input)); 82 .WillOnce(PostKeyMessagesToRenderer(&ie_mock_, input));
83 83
84 EXPECT_CALL(ie_mock_, OnMessage(StrCaseEq(UTF8ToWide(input)), _, _)) 84 EXPECT_CALL(ie_mock_, OnMessage(StrCaseEq(base::UTF8ToWide(input)), _, _))
85 .WillOnce(CloseBrowserMock(&ie_mock_)); 85 .WillOnce(CloseBrowserMock(&ie_mock_));
86 86
87 LaunchIEAndNavigate(key_event_url); 87 LaunchIEAndNavigate(key_event_url);
88 } 88 }
89 89
90 // Tests keyboard shortcuts for back and forward. 90 // Tests keyboard shortcuts for back and forward.
91 // http://code.google.com/p/chromium/issues/detail?id=114058 91 // http://code.google.com/p/chromium/issues/detail?id=114058
92 TEST_P(FullTabUITest, DISABLED_KeyboardBackForward) { 92 TEST_P(FullTabUITest, DISABLED_KeyboardBackForward) {
93 if (IsWorkstationLocked()) { 93 if (IsWorkstationLocked()) {
94 LOG(ERROR) << "This test cannot be run in a locked workstation."; 94 LOG(ERROR) << "This test cannot be run in a locked workstation.";
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 EXPECT_CALL(ie_mock_, OnLoad(in_cf, 315 EXPECT_CALL(ie_mock_, OnLoad(in_cf,
316 StrEq(GetSimplePageUrl()))) 316 StrEq(GetSimplePageUrl())))
317 .WillOnce(DelayExecCommand( 317 .WillOnce(DelayExecCommand(
318 &ie_mock_, &loop_, base::TimeDelta(), &CGID_MSHTML, 318 &ie_mock_, &loop_, base::TimeDelta(), &CGID_MSHTML,
319 static_cast<OLECMDID>(IDM_VIEWSOURCE), 319 static_cast<OLECMDID>(IDM_VIEWSOURCE),
320 OLECMDEXECOPT_DONTPROMPTUSER, &empty, &empty)); 320 OLECMDEXECOPT_DONTPROMPTUSER, &empty, &empty));
321 321
322 // Expect notification for view-source window, handle new window event 322 // Expect notification for view-source window, handle new window event
323 // and attach a new ie_mock_ to the received web browser 323 // and attach a new ie_mock_ to the received web browser
324 std::wstring view_source_url; 324 std::wstring view_source_url;
325 view_source_url += UTF8ToWide(content::kViewSourceScheme); 325 view_source_url += base::UTF8ToWide(content::kViewSourceScheme);
326 view_source_url += L":"; 326 view_source_url += L":";
327 view_source_url += GetSimplePageUrl(); 327 view_source_url += GetSimplePageUrl();
328 std::wstring url_in_new_window = kChromeProtocolPrefix; 328 std::wstring url_in_new_window = kChromeProtocolPrefix;
329 url_in_new_window += view_source_url; 329 url_in_new_window += view_source_url;
330 330
331 ie_mock_.ExpectNewWindow(&view_source_mock); 331 ie_mock_.ExpectNewWindow(&view_source_mock);
332 // For some reason this happens occasionally at least on XP IE7. 332 // For some reason this happens occasionally at least on XP IE7.
333 EXPECT_CALL(view_source_mock, OnLoad(IN_IE, StrEq(url_in_new_window))) 333 EXPECT_CALL(view_source_mock, OnLoad(IN_IE, StrEq(url_in_new_window)))
334 .Times(testing::AtMost(1)); 334 .Times(testing::AtMost(1));
335 EXPECT_CALL(view_source_mock, OnLoad(in_cf, StrEq(view_source_url))) 335 EXPECT_CALL(view_source_mock, OnLoad(in_cf, StrEq(view_source_url)))
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 EXPECT_CALL(acc_observer_, 565 EXPECT_CALL(acc_observer_,
566 OnAccDocLoad(TabContentsTitleEq(initial_url, 566 OnAccDocLoad(TabContentsTitleEq(initial_url,
567 GetSimplePageTitle()))) 567 GetSimplePageTitle())))
568 .WillOnce(OpenContextMenuAsync()); 568 .WillOnce(OpenContextMenuAsync());
569 EXPECT_CALL(acc_observer_, OnMenuPopup(_)) 569 EXPECT_CALL(acc_observer_, OnMenuPopup(_))
570 .WillOnce(AccLeftClick(AccObjectMatcher(L"View page source"))); 570 .WillOnce(AccLeftClick(AccObjectMatcher(L"View page source")));
571 571
572 // Expect notification for view-source window, handle new window event 572 // Expect notification for view-source window, handle new window event
573 // and attach a new ie_mock_ to the received web browser 573 // and attach a new ie_mock_ to the received web browser
574 std::wstring view_source_url; 574 std::wstring view_source_url;
575 view_source_url += UTF8ToWide(content::kViewSourceScheme); 575 view_source_url += base::UTF8ToWide(content::kViewSourceScheme);
576 view_source_url += L":"; 576 view_source_url += L":";
577 view_source_url += initial_url; 577 view_source_url += initial_url;
578 std::wstring url_in_new_window = kChromeProtocolPrefix; 578 std::wstring url_in_new_window = kChromeProtocolPrefix;
579 url_in_new_window += view_source_url; 579 url_in_new_window += view_source_url;
580 580
581 ie_mock_.ExpectNewWindow(&view_source_mock); 581 ie_mock_.ExpectNewWindow(&view_source_mock);
582 // For some reason this happens occasionally at least on XP IE7 and Win7 IE8. 582 // For some reason this happens occasionally at least on XP IE7 and Win7 IE8.
583 EXPECT_CALL(view_source_mock, OnLoad(IN_IE, StrEq(url_in_new_window))) 583 EXPECT_CALL(view_source_mock, OnLoad(IN_IE, StrEq(url_in_new_window)))
584 .Times(testing::AtMost(1)); 584 .Times(testing::AtMost(1));
585 EXPECT_CALL(view_source_mock, OnLoad(IN_CF, StrEq(view_source_url))) 585 EXPECT_CALL(view_source_mock, OnLoad(IN_CF, StrEq(view_source_url)))
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 EXPECT_CALL(acc_observer_, OnMenuPopup(_)) 1104 EXPECT_CALL(acc_observer_, OnMenuPopup(_))
1105 .WillOnce(AccLeftClick(AccObjectMatcher(L"Forward"))); 1105 .WillOnce(AccLeftClick(AccObjectMatcher(L"Forward")));
1106 1106
1107 EXPECT_CALL(ie_mock_, OnLoad(IN_CF, StrEq(page3))) 1107 EXPECT_CALL(ie_mock_, OnLoad(IN_CF, StrEq(page3)))
1108 .WillOnce(CloseBrowserMock(&ie_mock_)); 1108 .WillOnce(CloseBrowserMock(&ie_mock_));
1109 1109
1110 LaunchIENavigateAndLoop(page1, kChromeFrameVeryLongNavigationTimeout); 1110 LaunchIENavigateAndLoop(page1, kChromeFrameVeryLongNavigationTimeout);
1111 } 1111 }
1112 1112
1113 } // namespace chrome_frame_test 1113 } // namespace chrome_frame_test
OLDNEW
« no previous file with comments | « chrome_frame/test/test_with_web_server.cc ('k') | chrome_frame/test/util_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698