diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-08 00:56:07 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-08 00:56:07 +0000 |
commit | fe8b2727568e86e14dbd00f5e9e0d5154d6b7fb4 (patch) | |
tree | b7f2c0bc36bcfa1dc156bfa18e0d6b1d168aa295 | |
parent | 56ec73072f135e7e77788f5a09e43e807faa9882 (diff) | |
download | chromium_src-fe8b2727568e86e14dbd00f5e9e0d5154d6b7fb4.zip chromium_src-fe8b2727568e86e14dbd00f5e9e0d5154d6b7fb4.tar.gz chromium_src-fe8b2727568e86e14dbd00f5e9e0d5154d6b7fb4.tar.bz2 |
mac: Prepare most test code for -Wunused-functions too.
BUG=315884
R=akalin@chromium.org, isherman@chromium.org, thestig@chromium.org, yzshen@chromium.org
TBR=piman, sergeyu
Review URL: https://codereview.chromium.org/65813002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233737 0039d316-1c4b-4281-b951-d872f2087c98
27 files changed, 13 insertions, 318 deletions
diff --git a/base/debug/trace_event_unittest.cc b/base/debug/trace_event_unittest.cc index f94d9ee..6ad3d66 100644 --- a/base/debug/trace_event_unittest.cc +++ b/base/debug/trace_event_unittest.cc @@ -841,13 +841,6 @@ void ValidateInstantEventPresentOnEveryThread(const ListValue& trace_parsed, } } -void TraceCallsWithCachedCategoryPointersPointers(const char* name_str) { - TRACE_EVENT0("category name1", name_str); - TRACE_EVENT_INSTANT0("category name2", name_str, TRACE_EVENT_SCOPE_THREAD); - TRACE_EVENT_BEGIN0("category name3", name_str); - TRACE_EVENT_END0("category name4", name_str); -} - } // namespace void HighResSleepForTraceTest(base::TimeDelta elapsed) { diff --git a/base/files/file_path_watcher_browsertest.cc b/base/files/file_path_watcher_browsertest.cc index 69ff806..5ded1e8 100644 --- a/base/files/file_path_watcher_browsertest.cc +++ b/base/files/file_path_watcher_browsertest.cc @@ -138,19 +138,6 @@ void SetupWatchCallback(const FilePath& target, completion->Signal(); } -void QuitLoopWatchCallback(MessageLoop* loop, - const FilePath& expected_path, - bool expected_error, - bool* flag, - const FilePath& path, - bool error) { - ASSERT_TRUE(flag); - *flag = true; - EXPECT_EQ(expected_path, path); - EXPECT_EQ(expected_error, error); - loop->PostTask(FROM_HERE, loop->QuitWhenIdleClosure()); -} - class FilePathWatcherTest : public testing::Test { public: FilePathWatcherTest() diff --git a/chrome/browser/drive/fake_drive_service.cc b/chrome/browser/drive/fake_drive_service.cc index 352e517..cd6d55b 100644 --- a/chrome/browser/drive/fake_drive_service.cc +++ b/chrome/browser/drive/fake_drive_service.cc @@ -105,13 +105,6 @@ bool EntryMatchWithQuery(const ResourceEntry& entry, return true; } -// Returns |url| without query parameter. -GURL RemoveQueryParameter(const GURL& url) { - GURL::Replacements replacements; - replacements.ClearQuery(); - return url.ReplaceComponents(replacements); -} - void ScheduleUploadRangeCallback(const UploadRangeCallback& callback, int64 start_position, int64 end_position, diff --git a/chrome/browser/extensions/api/identity/experimental_identity_apitest.cc b/chrome/browser/extensions/api/identity/experimental_identity_apitest.cc index 19d537f..c87cbb2 100644 --- a/chrome/browser/extensions/api/identity/experimental_identity_apitest.cc +++ b/chrome/browser/extensions/api/identity/experimental_identity_apitest.cc @@ -177,10 +177,6 @@ class TestOAuth2MintTokenFlow : public OAuth2MintTokenFlow { OAuth2MintTokenFlow::Delegate* delegate_; }; -BrowserContextKeyedService* IdentityAPITestFactory(Profile* profile) { - return new IdentityAPI(profile); -} - } // namespace class ExperimentalMockGetAuthTokenFunction : diff --git a/chrome/browser/extensions/api/identity/identity_apitest.cc b/chrome/browser/extensions/api/identity/identity_apitest.cc index 3050998..ac3fe6a 100644 --- a/chrome/browser/extensions/api/identity/identity_apitest.cc +++ b/chrome/browser/extensions/api/identity/identity_apitest.cc @@ -188,11 +188,6 @@ class TestOAuth2MintTokenFlow : public OAuth2MintTokenFlow { OAuth2MintTokenFlow::Delegate* delegate_; }; -BrowserContextKeyedService* IdentityAPITestFactory( - content::BrowserContext* profile) { - return new IdentityAPI(static_cast<Profile*>(profile)); -} - // Waits for a specific GURL to generate a NOTIFICATION_LOAD_STOP event and // saves a pointer to the window embedding the WebContents, which can be later // closed. diff --git a/chrome/browser/history/history_types_unittest.cc b/chrome/browser/history/history_types_unittest.cc index 58033f6..bc3fa3b 100644 --- a/chrome/browser/history/history_types_unittest.cc +++ b/chrome/browser/history/history_types_unittest.cc @@ -31,9 +31,8 @@ void CheckHistoryResultConsistency(const QueryResults& result) { } } -static const char kURL1[] = "http://www.google.com/"; -static const char kURL2[] = "http://news.google.com/"; -static const char kURL3[] = "http://images.google.com/"; +const char kURL1[] = "http://www.google.com/"; +const char kURL2[] = "http://news.google.com/"; // Adds kURL1 twice and kURL2 once. void AddSimpleData(QueryResults* results) { @@ -50,19 +49,6 @@ void AddSimpleData(QueryResults* results) { CheckHistoryResultConsistency(*results); } -// Adds kURL2 once and kURL3 once. -void AddAlternateData(QueryResults* results) { - GURL url2(kURL2); - GURL url3(kURL3); - URLResult result1(url2, base::Time::Now()); - URLResult result2(url3, base::Time::Now()); - - // The URLResults are invalid after being inserted. - results->AppendURLBySwapping(&result1); - results->AppendURLBySwapping(&result2); - CheckHistoryResultConsistency(*results); -} - } // namespace // Tests insertion and deletion by range. @@ -157,4 +143,4 @@ TEST(HistoryQueryResult, RowSignificance) { EXPECT_FALSE(RowQualifiesAsSignificant(url_row, base::Time())); } -} // namespace +} // namespace history diff --git a/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc b/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc index 7a09c81..d9d7767 100644 --- a/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc +++ b/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc @@ -27,17 +27,6 @@ using content::BrowserThread; using net::SSLConfig; using net::SSLConfigService; -namespace { - -void SetCookiePref(TestingProfile* profile, ContentSetting setting) { - HostContentSettingsMap* host_content_settings_map = - profile->GetHostContentSettingsMap(); - host_content_settings_map->SetDefaultContentSetting( - CONTENT_SETTINGS_TYPE_COOKIES, setting); -} - -} // namespace - class SSLConfigServiceManagerPrefTest : public testing::Test { public: SSLConfigServiceManagerPrefTest() diff --git a/chrome/browser/sessions/better_session_restore_browsertest.cc b/chrome/browser/sessions/better_session_restore_browsertest.cc index 46f1dfe..b6f21da 100644 --- a/chrome/browser/sessions/better_session_restore_browsertest.cc +++ b/chrome/browser/sessions/better_session_restore_browsertest.cc @@ -52,15 +52,6 @@ namespace { -Browser* FindOneOtherBrowserForProfile(Profile* profile, - Browser* not_this_browser) { - for (chrome::BrowserIterator it; !it.done(); it.Next()) { - if (*it != not_this_browser && it->profile() == profile) - return *it; - } - return NULL; -} - // We need to serve the test files so that PRE_Test and Test can access the same // page using the same URL. In addition, perceived security origin of the page // needs to stay the same, so e.g., redirecting the URL requests doesn't diff --git a/chrome/browser/sessions/session_types_unittest.cc b/chrome/browser/sessions/session_types_unittest.cc index 74a8602..aab796e 100644 --- a/chrome/browser/sessions/session_types_unittest.cc +++ b/chrome/browser/sessions/session_types_unittest.cc @@ -27,7 +27,6 @@ namespace { -const int kUniqueID = 50; const content::Referrer kReferrer = content::Referrer(GURL("http://www.referrer.com"), blink::WebReferrerPolicyAlways); @@ -35,57 +34,11 @@ const GURL kVirtualURL("http://www.virtual-url.com"); const string16 kTitle = ASCIIToUTF16("title"); const content::PageState kPageState = content::PageState::CreateFromEncodedData("page state"); -const content::PageTransition kTransitionType = - static_cast<content::PageTransition>( - content::PAGE_TRANSITION_AUTO_SUBFRAME | - content::PAGE_TRANSITION_HOME_PAGE | - content::PAGE_TRANSITION_CLIENT_REDIRECT); -const bool kHasPostData = true; -const int64 kPostID = 100; const GURL kOriginalRequestURL("http://www.original-request.com"); -const bool kIsOverridingUserAgent = true; const base::Time kTimestamp = syncer::ProtoTimeToTime(100); const string16 kSearchTerms = ASCIIToUTF16("my search terms"); const GURL kFaviconURL("http://virtual-url.com/favicon.ico"); -// Create a NavigationEntry from the constants above. -scoped_ptr<content::NavigationEntry> MakeNavigationEntryForTest() { - scoped_ptr<content::NavigationEntry> navigation_entry( - content::NavigationEntry::Create()); - navigation_entry->SetReferrer(kReferrer); - navigation_entry->SetVirtualURL(kVirtualURL); - navigation_entry->SetTitle(kTitle); - navigation_entry->SetPageState(kPageState); - navigation_entry->SetTransitionType(kTransitionType); - navigation_entry->SetHasPostData(kHasPostData); - navigation_entry->SetPostID(kPostID); - navigation_entry->SetOriginalRequestURL(kOriginalRequestURL); - navigation_entry->SetIsOverridingUserAgent(kIsOverridingUserAgent); - navigation_entry->SetTimestamp(kTimestamp); - navigation_entry->SetExtraData(sessions::kSearchTermsKey, kSearchTerms); - navigation_entry->GetFavicon().valid = true; - navigation_entry->GetFavicon().url = kFaviconURL; - return navigation_entry.Pass(); -} - -// Create a sync_pb::TabNavigation from the constants above. -sync_pb::TabNavigation MakeSyncDataForTest() { - sync_pb::TabNavigation sync_data; - sync_data.set_virtual_url(kVirtualURL.spec()); - sync_data.set_referrer(kReferrer.url.spec()); - sync_data.set_title(UTF16ToUTF8(kTitle)); - sync_data.set_state(kPageState.ToEncodedData()); - sync_data.set_page_transition( - sync_pb::SyncEnums_PageTransition_AUTO_SUBFRAME); - sync_data.set_unique_id(kUniqueID); - sync_data.set_timestamp_msec(syncer::TimeToProtoTime(kTimestamp)); - sync_data.set_redirect_type(sync_pb::SyncEnums::CLIENT_REDIRECT); - sync_data.set_navigation_home_page(true); - sync_data.set_search_terms(UTF16ToUTF8(kSearchTerms)); - sync_data.set_favicon_url(kFaviconURL.spec()); - return sync_data; -} - // Create a typical SessionTab protocol buffer and set an existing // SessionTab from it. The data from the protocol buffer should // clobber the existing data. diff --git a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc index eed132c..85656ba 100644 --- a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc +++ b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc @@ -226,10 +226,6 @@ TEST_F(SyncBackendRegistrarTest, ActivateDeactivateUIDataType) { TriggerChanges(registrar_.get(), BOOKMARKS); } -void ActiviateDoneOnDb(base::WaitableEvent* done) { - done->Signal(); -} - TEST_F(SyncBackendRegistrarTest, ActivateDeactivateNonUIDataType) { InSequence in_sequence; registrar_->SetInitialTypes(ModelTypeSet()); diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc b/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc index 265f2a0..c866662 100644 --- a/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc +++ b/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc @@ -53,15 +53,6 @@ void ExpectEquivalent(const ServiceMetadata* left, test_util::ExpectEquivalentServiceMetadata(*left, *right); } -void ExpectEquivalent(const FileDetails* left, const FileDetails* right) { - if (!left) { - ASSERT_FALSE(right); - return; - } - ASSERT_TRUE(right); - test_util::ExpectEquivalentDetails(*left, *right); -} - void ExpectEquivalent(const FileMetadata* left, const FileMetadata* right) { if (!left) { ASSERT_FALSE(right); diff --git a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc index d1493f0..2f09cb3 100644 --- a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc +++ b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc @@ -88,15 +88,6 @@ using testing::HasSubstr; namespace { -// Creates a bitmap of the specified color. Caller takes ownership. -gfx::Image CreateBitmap(SkColor color) { - SkBitmap thumbnail; - thumbnail.setConfig(SkBitmap::kARGB_8888_Config, 4, 4); - thumbnail.allocPixels(); - thumbnail.eraseColor(color); - return gfx::Image::CreateFrom1xBitmap(thumbnail); // adds ref. -} - // Task used to make sure history has finished processing a request. Intended // for use with BlockUntilHistoryProcessesPendingRequests. class QuittingHistoryDBTask : public history::HistoryDBTask { diff --git a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc index a3372f0..e40ccc3 100644 --- a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc +++ b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc @@ -97,16 +97,6 @@ std::string GetConfiguration(const DictionaryValue* extra_values, return args; } -void CheckInt(const DictionaryValue* dictionary, - const std::string& key, - int expected_value) { - int actual_value; - EXPECT_TRUE(dictionary->GetInteger(key, &actual_value)) << - "Did not expect to find value for " << key; - EXPECT_EQ(actual_value, expected_value) << - "Mismatch found for " << key; -} - // Checks whether the passed |dictionary| contains a |key| with the given // |expected_value|. If |omit_if_false| is true, then the value should only // be present if |expected_value| is true. @@ -132,22 +122,6 @@ void CheckBool(const DictionaryValue* dictionary, return CheckBool(dictionary, key, expected_value, false); } -void CheckString(const DictionaryValue* dictionary, - const std::string& key, - const std::string& expected_value, - bool omit_if_empty) { - if (omit_if_empty && expected_value.empty()) { - EXPECT_FALSE(dictionary->HasKey(key)) << - "Did not expect to find value for " << key; - } else { - std::string actual_value; - EXPECT_TRUE(dictionary->GetString(key, &actual_value)) << - "No value found for " << key; - EXPECT_EQ(actual_value, expected_value) << - "Mismatch found for " << key; - } -} - // Checks to make sure that the values stored in |dictionary| match the values // expected by the showSyncSetupPage() JS function for a given set of data // types. diff --git a/chrome/service/cloud_print/printer_job_handler_unittest.cc b/chrome/service/cloud_print/printer_job_handler_unittest.cc index a97a1f1..e93290a 100644 --- a/chrome/service/cloud_print/printer_job_handler_unittest.cc +++ b/chrome/service/cloud_print/printer_job_handler_unittest.cc @@ -209,10 +209,6 @@ GURL JobListURI(const char* reason) { return GURL(StringPrintf(kExamplePrinterJobListURI, reason)); } -std::string JobID(int job_num) { - return StringPrintf(kExampleJobID, job_num); -} - GURL DoneURI(int job_num) { return GURL(StringPrintf(kExampleUpdateDoneURI, job_num)); } diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc index 88c1e43..c766db9 100644 --- a/chrome/test/base/ui_test_utils.cc +++ b/chrome/test/base/ui_test_utils.cc @@ -97,6 +97,7 @@ namespace ui_test_utils { namespace { +#if defined(OS_WIN) const char kSnapshotBaseName[] = "ChromiumSnapshot"; const char kSnapshotExtension[] = ".png"; @@ -121,6 +122,7 @@ base::FilePath GetSnapshotFileName(const base::FilePath& snapshot_directory) { } return snapshot_file; } +#endif // defined(OS_WIN) Browser* WaitForBrowserNotInSet(std::set<Browser*> excluded_browsers) { Browser* new_browser = GetBrowserNotInSet(excluded_browsers); diff --git a/chrome/test/chromedriver/element_util.cc b/chrome/test/chromedriver/element_util.cc index b765ddd..ec0c962 100644 --- a/chrome/test/chromedriver/element_util.cc +++ b/chrome/test/chromedriver/element_util.cc @@ -47,13 +47,6 @@ bool ParseFromValue(base::Value* value, WebSize* size) { return true; } -base::Value* CreateValueFrom(const WebSize& size) { - base::DictionaryValue* dict = new base::DictionaryValue(); - dict->SetInteger("width", size.width); - dict->SetInteger("height", size.height); - return dict; -} - bool ParseFromValue(base::Value* value, WebRect* rect) { base::DictionaryValue* dict_value; if (!value->GetAsDictionary(&dict_value)) diff --git a/chrome/test/perf/generate_profile.cc b/chrome/test/perf/generate_profile.cc index d3484b5..b3fcf66 100644 --- a/chrome/test/perf/generate_profile.cc +++ b/chrome/test/perf/generate_profile.cc @@ -114,11 +114,6 @@ string16 ConstructRandomTitle() { return RandomWords(RandomInt(3, 15)); } -// Return a random string that could function as page contents. -string16 ConstructRandomPage() { - return RandomWords(RandomInt(10, 4000)); -} - // Insert a batch of |batch_size| URLs, starting at pageid |page_id|. void InsertURLBatch(Profile* profile, int page_id, diff --git a/components/autofill/core/browser/autofill_manager_unittest.cc b/components/autofill/core/browser/autofill_manager_unittest.cc index f9aef86..3dccf40 100644 --- a/components/autofill/core/browser/autofill_manager_unittest.cc +++ b/components/autofill/core/browser/autofill_manager_unittest.cc @@ -206,41 +206,6 @@ class TestPersonalDataManager : public PersonalDataManager { DISALLOW_COPY_AND_ASSIGN(TestPersonalDataManager); }; -// Populates |form| with 3 fields and a field with autocomplete attribute. -void CreateTestFormWithAutocompleteAttribute(FormData* form) { - form->name = ASCIIToUTF16("UserSpecified"); - form->method = ASCIIToUTF16("POST"); - form->origin = GURL("http://myform.com/userspecified.html"); - form->action = GURL("http://myform.com/submit.html"); - form->user_submitted = true; - - FormFieldData field; - test::CreateTestFormField("First Name", "firstname", "", "text", &field); - form->fields.push_back(field); - test::CreateTestFormField("Middle Name", "middlename", "", "text", &field); - form->fields.push_back(field); - test::CreateTestFormField("Last Name", "lastname", "", "text", &field); - form->fields.push_back(field); - field.autocomplete_attribute="cc-type"; - test::CreateTestFormField("cc-type", "cc-type", "", "text", &field); - form->fields.push_back(field); -} - -// Populates |form| with data corresponding to a simple shipping options form. -void CreateTestShippingOptionsFormData(FormData* form) { - form->name = ASCIIToUTF16("Shipping Options"); - form->method = ASCIIToUTF16("POST"); - form->origin = GURL("http://myform.com/shipping.html"); - form->action = GURL("http://myform.com/submit.html"); - form->user_submitted = true; - - FormFieldData field; - test::CreateTestFormField("Shipping1", "option", "option1", "radio", &field); - form->fields.push_back(field); - test::CreateTestFormField("Shipping2", "option", "option2", "radio", &field); - form->fields.push_back(field); -} - // Populates |form| with data corresponding to a simple credit card form. // Note that this actually appends fields to the form data, which can be useful // for building up more complex test forms. @@ -275,31 +240,6 @@ void CreateTestCreditCardFormData(FormData* form, } } -void ExpectSuggestions(int page_id, - const std::vector<base::string16>& values, - const std::vector<base::string16>& labels, - const std::vector<base::string16>& icons, - const std::vector<int>& unique_ids, - int expected_page_id, - size_t expected_num_suggestions, - const base::string16 expected_values[], - const base::string16 expected_labels[], - const base::string16 expected_icons[], - const int expected_unique_ids[]) { - EXPECT_EQ(expected_page_id, page_id); - ASSERT_EQ(expected_num_suggestions, values.size()); - ASSERT_EQ(expected_num_suggestions, labels.size()); - ASSERT_EQ(expected_num_suggestions, icons.size()); - ASSERT_EQ(expected_num_suggestions, unique_ids.size()); - for (size_t i = 0; i < expected_num_suggestions; ++i) { - SCOPED_TRACE(base::StringPrintf("i: %" PRIuS, i)); - EXPECT_EQ(expected_values[i], values[i]); - EXPECT_EQ(expected_labels[i], labels[i]); - EXPECT_EQ(expected_icons[i], icons[i]); - EXPECT_EQ(expected_unique_ids[i], unique_ids[i]); - } -} - void ExpectFilledField(const char* expected_label, const char* expected_name, const char* expected_value, diff --git a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc index d4b9a3f..417d916 100644 --- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc +++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc @@ -45,10 +45,9 @@ using content::BrowserPluginGuest; using content::BrowserPluginHostFactory; using content::WebContentsImpl; -namespace { - const char kHTMLForGuest[] = "data:text/html,<html><body>hello world</body></html>"; + const char kHTMLForGuestTouchHandler[] = "data:text/html,<html><body><div id=\"touch\">With touch</div></body>" "<script type=\"text/javascript\">" @@ -62,11 +61,7 @@ const char kHTMLForGuestTouchHandler[] = " handler);" "}" "</script></html>"; -const char kHTMLForGuestWithTitle[] = - "data:text/html," - "<html><head><title>%s</title></head>" - "<body>hello world</body>" - "</html>"; + const char kHTMLForGuestAcceptDrag[] = "data:text/html,<html><body>" "<script>" @@ -78,6 +73,7 @@ const char kHTMLForGuestAcceptDrag[] = " ondrop=\"dropped();\">" "</textarea>" "</body></html>"; + const char kHTMLForGuestWithSize[] = "data:text/html," "<html>" @@ -86,12 +82,6 @@ const char kHTMLForGuestWithSize[] = "</body>" "</html>"; -std::string GetHTMLForGuestWithTitle(const std::string& title) { - return base::StringPrintf(kHTMLForGuestWithTitle, title.c_str()); -} - -} // namespace - namespace content { // Test factory for creating test instances of BrowserPluginEmbedder and diff --git a/content/browser/fileapi/sandbox_file_system_backend_unittest.cc b/content/browser/fileapi/sandbox_file_system_backend_unittest.cc index 50f1c06..4bb1226 100644 --- a/content/browser/fileapi/sandbox_file_system_backend_unittest.cc +++ b/content/browser/fileapi/sandbox_file_system_backend_unittest.cc @@ -66,12 +66,6 @@ const struct RootPathFileURITest { "000" PS "p", NULL }, }; -FileSystemURL CreateFileSystemURL(const char* path) { - const GURL kOrigin("http://foo/"); - return FileSystemURL::CreateForTest( - kOrigin, kFileSystemTypeTemporary, base::FilePath::FromUTF8Unsafe(path)); -} - void DidOpenFileSystem(base::PlatformFileError* error_out, const GURL& origin_url, const std::string& name, diff --git a/content/common/input/input_param_traits_unittest.cc b/content/common/input/input_param_traits_unittest.cc index df42fd6..6418efc 100644 --- a/content/common/input/input_param_traits_unittest.cc +++ b/content/common/input/input_param_traits_unittest.cc @@ -15,10 +15,6 @@ namespace { typedef ScopedVector<InputEvent> InputEvents; -void AddTo(InputEvents& events, const blink::WebInputEvent& event) { - events.push_back(new InputEvent(event, ui::LatencyInfo(), false)); -} - class InputParamTraitsTest : public testing::Test { protected: static void Compare(const InputEvent* a, const InputEvent* b) { diff --git a/net/ssl/default_server_bound_cert_store_unittest.cc b/net/ssl/default_server_bound_cert_store_unittest.cc index c3f8452..a742e0c 100644 --- a/net/ssl/default_server_bound_cert_store_unittest.cc +++ b/net/ssl/default_server_bound_cert_store_unittest.cc @@ -24,10 +24,6 @@ void CallCounter(int* counter) { (*counter)++; } -void NotCalled() { - ADD_FAILURE() << "Unexpected callback execution."; -} - void GetCertCallbackNotCalled(int err, const std::string& server_identifier, base::Time expiration_time, diff --git a/ppapi/tests/test_graphics_2d.cc b/ppapi/tests/test_graphics_2d.cc index 23a4fe7..9cb69dc 100644 --- a/ppapi/tests/test_graphics_2d.cc +++ b/ppapi/tests/test_graphics_2d.cc @@ -28,14 +28,6 @@ REGISTER_TEST_CASE(Graphics2D); namespace { -// A NOP flush callback for use in various tests. -void FlushCallbackNOP(void* data, int32_t result) { -} - -void FlushCallbackQuitMessageLoop(void* data, int32_t result) { - static_cast<TestGraphics2D*>(data)->QuitMessageLoop(); -} - bool CanFlushContext(pp::Instance* instance, pp::Graphics2D* context) { TestCompletionCallback callback(instance->pp_instance()); callback.WaitForResult(context->Flush(callback.GetCallback())); diff --git a/remoting/host/host_main.cc b/remoting/host/host_main.cc index 512bc64..75ce6fd 100644 --- a/remoting/host/host_main.cc +++ b/remoting/host/host_main.cc @@ -36,11 +36,13 @@ namespace remoting { // Known entry points. +int HostProcessMain(); +#if defined(OS_WIN) int DaemonProcessMain(); int DesktopProcessMain(); int ElevatedControllerMain(); -int HostProcessMain(); int RdpDesktopSessionMain(); +#endif // defined(OS_WIN) const char kElevateSwitchName[] = "elevate"; const char kProcessTypeSwitchName[] = "type"; @@ -126,29 +128,6 @@ int RunElevated() { return kSuccessExitCode; } -#else // !defined(OS_WIN) - -// Fake entry points that exist only on Windows. -int DaemonProcessMain() { - NOTREACHED(); - return kInitializationFailed; -} - -int DesktopProcessMain() { - NOTREACHED(); - return kInitializationFailed; -} - -int ElevatedControllerMain() { - NOTREACHED(); - return kInitializationFailed; -} - -int RdpDesktopSessionMain() { - NOTREACHED(); - return kInitializationFailed; -} - #endif // !defined(OS_WIN) // Select the entry point corresponding to the process type. diff --git a/remoting/host/input_injector_mac.cc b/remoting/host/input_injector_mac.cc index ac68761..6ea7467 100644 --- a/remoting/host/input_injector_mac.cc +++ b/remoting/host/input_injector_mac.cc @@ -32,13 +32,6 @@ using protocol::ClipboardEvent; using protocol::KeyEvent; using protocol::MouseEvent; -// skia/ext/skia_utils_mac.h only defines CGRectToSkRect(). -SkIRect CGRectToSkIRect(const CGRect& rect) { - SkIRect result; - gfx::CGRectToSkRect(rect).round(&result); - return result; -} - // A class to generate events on Mac. class InputInjectorMac : public InputInjector { public: diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc index 97886e9..a2c1d94 100644 --- a/remoting/host/remoting_me2me_host.cc +++ b/remoting/host/remoting_me2me_host.cc @@ -98,8 +98,6 @@ #include "ui/gfx/gtk_util.h" #endif // defined(TOOLKIT_GTK) -namespace { - // This is used for tagging system event logs. const char kApplicationName[] = "chromoting"; @@ -117,12 +115,6 @@ const char kSignalParentSwitchName[] = "signal-parent"; // from stdin. const char kStdinConfigPath[] = "-"; -void QuitMessageLoop(base::MessageLoop* message_loop) { - message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); -} - -} // namespace - namespace remoting { class HostProcess diff --git a/ui/gfx/render_text_unittest.cc b/ui/gfx/render_text_unittest.cc index b831ad6..4573968 100644 --- a/ui/gfx/render_text_unittest.cc +++ b/ui/gfx/render_text_unittest.cc @@ -65,6 +65,7 @@ void SetRTL(bool rtl) { EXPECT_EQ(rtl, base::i18n::IsRTL()); } +#if !defined(OS_MACOSX) // Ensure cursor movement in the specified |direction| yields |expected| values. void RunMoveCursorLeftRightTest(RenderText* render_text, const std::vector<SelectionModel>& expected, @@ -81,6 +82,7 @@ void RunMoveCursorLeftRightTest(RenderText* render_text, render_text->MoveCursor(LINE_BREAK, direction, false); EXPECT_EQ(expected.back(), render_text->selection_model()); } +#endif // !defined(OS_MACOSX) } // namespace |