diff options
author | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-20 17:35:57 +0000 |
---|---|---|
committer | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-20 17:35:57 +0000 |
commit | 4a856bd7d23d27153ff8a5c5d943edd74bd155a6 (patch) | |
tree | 0af75b7c8af0c2ea6de2851a75e9f3a8da7e6efa /chrome_frame/test | |
parent | 4dcc2ec6b1a9417aab85183acbca64761ccdd32d (diff) | |
download | chromium_src-4a856bd7d23d27153ff8a5c5d943edd74bd155a6.zip chromium_src-4a856bd7d23d27153ff8a5c5d943edd74bd155a6.tar.gz chromium_src-4a856bd7d23d27153ff8a5c5d943edd74bd155a6.tar.bz2 |
Add base:: to string16 in chrome_frame/.
R=grt@chromium.org
BUG=329295
Review URL: https://codereview.chromium.org/113143006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242115 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/chrome_frame_test_utils.cc | 6 | ||||
-rw-r--r-- | chrome_frame/test/delete_chrome_history_test.cc | 2 | ||||
-rw-r--r-- | chrome_frame/test/http_negotiate_unittest.cc | 44 | ||||
-rw-r--r-- | chrome_frame/test/ie_configurator.cc | 6 | ||||
-rw-r--r-- | chrome_frame/test/mock_ie_event_sink_actions.h | 8 | ||||
-rw-r--r-- | chrome_frame/test/test_scrubber.cc | 4 | ||||
-rw-r--r-- | chrome_frame/test/ui_test.cc | 20 |
7 files changed, 44 insertions, 46 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc index 8dfc86e..df912de2 100644 --- a/chrome_frame/test/chrome_frame_test_utils.cc +++ b/chrome_frame/test/chrome_frame_test_utils.cc @@ -512,7 +512,7 @@ base::FilePath GetSeleniumTestFolder() { } std::wstring GetPathFromUrl(const std::wstring& url) { - string16 url16 = WideToUTF16(url); + base::string16 url16 = WideToUTF16(url); GURL gurl = GURL(url16); if (gurl.has_query()) { GURL::Replacements replacements; @@ -523,13 +523,13 @@ std::wstring GetPathFromUrl(const std::wstring& url) { } std::wstring GetPathAndQueryFromUrl(const std::wstring& url) { - string16 url16 = WideToUTF16(url); + base::string16 url16 = WideToUTF16(url); GURL gurl = GURL(url16); return UTF8ToWide(gurl.PathForRequest()); } std::wstring GetClipboardText() { - string16 text16; + base::string16 text16; ui::Clipboard::GetForCurrentThread()->ReadText( ui::CLIPBOARD_TYPE_COPY_PASTE, &text16); return UTF16ToWide(text16); diff --git a/chrome_frame/test/delete_chrome_history_test.cc b/chrome_frame/test/delete_chrome_history_test.cc index 32056ca..119aac4 100644 --- a/chrome_frame/test/delete_chrome_history_test.cc +++ b/chrome_frame/test/delete_chrome_history_test.cc @@ -109,7 +109,7 @@ ACTION_P2(ExpectFormValuesForElementNameMatch, element_name, matcher) { EXPECT_EQ(sql::INIT_OK, init_status); if (init_status == sql::INIT_OK) { - std::vector<string16> values; + std::vector<base::string16> values; autofill_table.GetFormValuesForElementName( element_name, L"", &values, 9999); EXPECT_THAT(values, matcher); diff --git a/chrome_frame/test/http_negotiate_unittest.cc b/chrome_frame/test/http_negotiate_unittest.cc index a21e4e8..c61491d 100644 --- a/chrome_frame/test/http_negotiate_unittest.cc +++ b/chrome_frame/test/http_negotiate_unittest.cc @@ -67,17 +67,16 @@ TEST_F(HttpNegotiateTest, BeginningTransaction) { static_cast<IHttpNegotiate*>( &test_http)))[kBeginningTransactionIndex]); - string16 cf_ua( + base::string16 cf_ua( ASCIIToWide(http_utils::GetDefaultUserAgentHeaderWithCFTag())); - string16 cf_tag( - ASCIIToWide(http_utils::GetChromeFrameUserAgent())); + base::string16 cf_tag(ASCIIToWide(http_utils::GetChromeFrameUserAgent())); - EXPECT_NE(string16::npos, cf_ua.find(L"chromeframe/")); + EXPECT_NE(base::string16::npos, cf_ua.find(L"chromeframe/")); struct TestCase { - const string16 original_headers_; - const string16 delegate_additional_; - const string16 expected_additional_; + const base::string16 original_headers_; + const base::string16 delegate_additional_; + const base::string16 expected_additional_; HRESULT delegate_return_value_; } test_cases[] = { { L"Accept: */*\r\n", @@ -118,7 +117,7 @@ TEST_F(HttpNegotiateTest, BeginningTransaction) { if (additional) { // Check against the expected additional headers. - EXPECT_EQ(test.expected_additional_, string16(additional)); + EXPECT_EQ(test.expected_additional_, base::string16(additional)); ::CoTaskMemFree(additional); } } @@ -133,28 +132,27 @@ TEST_F(HttpNegotiateTest, BeginningTransactionUARemoval) { static_cast<IHttpNegotiate*>( &test_http)))[kBeginningTransactionIndex]); - string16 nocf_ua( + base::string16 nocf_ua( ASCIIToWide(http_utils::RemoveChromeFrameFromUserAgentValue( http_utils::GetDefaultUserAgentHeaderWithCFTag()))); - string16 cf_ua( - ASCIIToWide(http_utils::AddChromeFrameToUserAgentValue( - WideToASCII(nocf_ua)))); + base::string16 cf_ua(ASCIIToWide( + http_utils::AddChromeFrameToUserAgentValue(WideToASCII(nocf_ua)))); - EXPECT_EQ(string16::npos, nocf_ua.find(L"chromeframe/")); - EXPECT_NE(string16::npos, cf_ua.find(L"chromeframe/")); + EXPECT_EQ(base::string16::npos, nocf_ua.find(L"chromeframe/")); + EXPECT_NE(base::string16::npos, cf_ua.find(L"chromeframe/")); - string16 ua_url(L"www.withua.com"); - string16 no_ua_url(L"www.noua.com"); + base::string16 ua_url(L"www.withua.com"); + base::string16 no_ua_url(L"www.noua.com"); RegistryListPreferencesHolder& ua_holder = GetUserAgentPreferencesHolderForTesting(); ua_holder.AddStringForTesting(no_ua_url); struct TestCase { - const string16 url_; - const string16 original_headers_; - const string16 delegate_additional_; - const string16 expected_additional_; + const base::string16 url_; + const base::string16 original_headers_; + const base::string16 delegate_additional_; + const base::string16 expected_additional_; } test_cases[] = { { ua_url, L"", @@ -186,7 +184,7 @@ TEST_F(HttpNegotiateTest, BeginningTransactionUARemoval) { if (additional) { // Check against the expected additional headers. - EXPECT_EQ(test.expected_additional_, string16(additional)) + EXPECT_EQ(test.expected_additional_, base::string16(additional)) << "Iteration: " << i; ::CoTaskMemFree(additional); } @@ -247,13 +245,13 @@ END_COM_MAP() return status_; } - const string16& last_status_text() const { + const base::string16& last_status_text() const { return status_text_; } protected: ULONG status_; - string16 status_text_; + base::string16 status_text_; base::win::ScopedComPtr<IWebBrowser2> browser_; }; diff --git a/chrome_frame/test/ie_configurator.cc b/chrome_frame/test/ie_configurator.cc index 8f30c30..78d8711 100644 --- a/chrome_frame/test/ie_configurator.cc +++ b/chrome_frame/test/ie_configurator.cc @@ -184,7 +184,7 @@ class ModernIEConfigurator : public IEConfigurator { static const RunOnceValueNames* RunOnceNamesForVersion(IEVersion ie_version); bool IsPerUserSetupComplete(); - static string16 GetChromeFrameBHOCLSID(); + static base::string16 GetChromeFrameBHOCLSID(); static bool IsAddonPromptDisabledForChromeFrame(); const IEVersion ie_version_; @@ -462,8 +462,8 @@ bool ModernIEConfigurator::IsPerUserSetupComplete() { // Returns the path to the IE9 Approved Extensions key for Chrome Frame. // static -string16 ModernIEConfigurator::GetChromeFrameBHOCLSID() { - string16 bho_guid(39, L'\0'); +base::string16 ModernIEConfigurator::GetChromeFrameBHOCLSID() { + base::string16 bho_guid(39, L'\0'); int guid_len = StringFromGUID2(CLSID_ChromeFrameBHO, &bho_guid[0], bho_guid.size()); DCHECK_EQ(guid_len, static_cast<int>(bho_guid.size())); diff --git a/chrome_frame/test/mock_ie_event_sink_actions.h b/chrome_frame/test/mock_ie_event_sink_actions.h index 9aa57a1..ff13a7f 100644 --- a/chrome_frame/test/mock_ie_event_sink_actions.h +++ b/chrome_frame/test/mock_ie_event_sink_actions.h @@ -43,15 +43,15 @@ MATCHER_P(AccSatisfies, matcher, "satisfies the given AccObjectMatcher") { // |arg|. Both url and title are matched to account for a race between the test // and Chrome when the window title is transitioned from the url to the title. MATCHER_P2(TabContentsTitleEq, the_url, the_title, "") { - const string16 url(the_url); + const base::string16 url(the_url); DCHECK(!url.empty()); - const string16 title(the_title); + const base::string16 title(the_title); DCHECK(!title.empty()); HWND parent = GetParent(arg); if (parent != NULL) { - string16 parent_title(255, L'\0'); + base::string16 parent_title(255, L'\0'); std::ostringstream titles_found(std::string("titles found: ")); - string16 first_title; + base::string16 first_title; do { parent_title.resize(255, L'\0'); parent_title.resize(GetWindowText(parent, &parent_title[0], diff --git a/chrome_frame/test/test_scrubber.cc b/chrome_frame/test/test_scrubber.cc index 8881a8b..64dbdce 100644 --- a/chrome_frame/test/test_scrubber.cc +++ b/chrome_frame/test/test_scrubber.cc @@ -74,8 +74,8 @@ class TestScrubber { bool is_initialized() const { return !default_data_directory_.empty(); } - string16 default_data_directory_; - string16 data_directory_override_; + base::string16 default_data_directory_; + base::string16 data_directory_override_; DISALLOW_COPY_AND_ASSIGN(TestScrubber); }; diff --git a/chrome_frame/test/ui_test.cc b/chrome_frame/test/ui_test.cc index faab2a2..6ea0d17 100644 --- a/chrome_frame/test/ui_test.cc +++ b/chrome_frame/test/ui_test.cc @@ -484,7 +484,7 @@ class ContextMenuTest : public MockIEEventSinkTest, public testing::Test { InSequence expect_in_sequence_for_scope; // Open 'Save As' dialog. - string16 initial_url(GetTestUrl(L"save_as_context_menu.html")); + base::string16 initial_url(GetTestUrl(L"save_as_context_menu.html")); const char* kSaveDlgCaption = "Save As"; EXPECT_CALL(acc_observer_, OnAccDocLoad(TabContentsTitleEq(initial_url, @@ -532,7 +532,7 @@ TEST_F(ContextMenuTest, CFReload) { server_mock_.ExpectAndServeAnyRequests(CFInvocation::MetaTag()); InSequence expect_in_sequence_for_scope; - string16 initial_url(GetSimplePageUrl()); + base::string16 initial_url(GetSimplePageUrl()); EXPECT_CALL(acc_observer_, OnAccDocLoad(TabContentsTitleEq(initial_url, GetSimplePageTitle()))) @@ -559,7 +559,7 @@ TEST_F(ContextMenuTest, CFViewSource) { MockIEEventSink view_source_mock; view_source_mock.ExpectAnyNavigations(); InSequence expect_in_sequence_for_scope; - string16 initial_url(GetSimplePageUrl()); + base::string16 initial_url(GetSimplePageUrl()); // View the page source. EXPECT_CALL(acc_observer_, @@ -597,7 +597,7 @@ TEST_F(ContextMenuTest, DISABLED_CFPageInfo) { server_mock_.ExpectAndServeAnyRequests(CFInvocation::MetaTag()); MockWindowObserver win_observer_mock; InSequence expect_in_sequence_for_scope; - string16 initial_url(GetSimplePageUrl()); + base::string16 initial_url(GetSimplePageUrl()); // View page information. EXPECT_CALL(acc_observer_, @@ -630,7 +630,7 @@ TEST_F(ContextMenuTest, CFInspector) { // Devtools begins life with "Untitled" caption and it changes // later to the 'Developer Tools - <url> form. const char* kPageInfoCaptionPattern = "Untitled*"; - string16 initial_url(GetSimplePageUrl()); + base::string16 initial_url(GetSimplePageUrl()); EXPECT_CALL(acc_observer_, OnAccDocLoad(TabContentsTitleEq(initial_url, GetSimplePageTitle()))) @@ -688,7 +688,7 @@ TEST_F(ContextMenuTest, CFAboutVersionLoads) { MockIEEventSink new_window_mock; new_window_mock.ExpectAnyNavigations(); InSequence expect_in_sequence_for_scope; - string16 initial_url(GetSimplePageUrl()); + base::string16 initial_url(GetSimplePageUrl()); EXPECT_CALL(acc_observer_, OnAccDocLoad(TabContentsTitleEq(initial_url, @@ -717,7 +717,7 @@ TEST_F(ContextMenuTest, CFAboutVersionLoads) { TEST_F(ContextMenuTest, IEOpen) { server_mock_.ExpectAndServeAnyRequests(CFInvocation::None()); InSequence expect_in_sequence_for_scope; - string16 initial_url(GetLinkPageUrl()); + base::string16 initial_url(GetLinkPageUrl()); // Open the link through the context menu. EXPECT_CALL(acc_observer_, @@ -744,7 +744,7 @@ TEST_F(ContextMenuTest, IEOpenInNewWindow) { MockIEEventSink new_window_mock; new_window_mock.ExpectAnyNavigations(); InSequence expect_in_sequence_for_scope; - string16 initial_url(GetLinkPageUrl()); + base::string16 initial_url(GetLinkPageUrl()); // Open the link in a new window. EXPECT_CALL(acc_observer_, @@ -807,7 +807,7 @@ TEST_F(ContextMenuTest, DISABLED_CFOpenLinkInNewWindow) { server_mock_.ExpectAndServeAnyRequests(CFInvocation::MetaTag()); MockIEEventSink new_window_mock; new_window_mock.ExpectAnyNavigations(); - string16 initial_url(GetLinkPageUrl()); + base::string16 initial_url(GetLinkPageUrl()); // Invoke 'Open link in new window' context menu item. EXPECT_CALL(acc_observer_, @@ -830,7 +830,7 @@ TEST_F(ContextMenuTest, DISABLED_CFOpenLinkInNewWindow) { // Test CF link context menu - Copy link address. TEST_F(ContextMenuTest, CFCopyLinkAddress) { server_mock_.ExpectAndServeAnyRequests(CFInvocation::MetaTag()); - string16 initial_url(GetLinkPageUrl()); + base::string16 initial_url(GetLinkPageUrl()); // Invoke 'Copy link address' context menu item. EXPECT_CALL(acc_observer_, |