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

Side by Side Diff: components/feedback/feedback_common_unittest.cc

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/feedback/feedback_common.h" 5 #include "components/feedback/feedback_common.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "components/feedback/proto/common.pb.h" 8 #include "components/feedback/proto/common.pb.h"
9 #include "components/feedback/proto/dom.pb.h" 9 #include "components/feedback/proto/dom.pb.h"
10 #include "components/feedback/proto/extension.pb.h" 10 #include "components/feedback/proto/extension.pb.h"
(...skipping 10 matching lines...) Expand all
21 const char kLongLog[] = TEN_LINES TEN_LINES TEN_LINES TEN_LINES TEN_LINES; 21 const char kLongLog[] = TEN_LINES TEN_LINES TEN_LINES TEN_LINES TEN_LINES;
22 const char kLogsAttachmentName[] = "system_logs.zip"; 22 const char kLogsAttachmentName[] = "system_logs.zip";
23 } // namespace 23 } // namespace
24 24
25 class FeedbackCommonTest : public testing::Test { 25 class FeedbackCommonTest : public testing::Test {
26 protected: 26 protected:
27 FeedbackCommonTest() { 27 FeedbackCommonTest() {
28 feedback = scoped_refptr<FeedbackCommon>(new FeedbackCommon()); 28 feedback = scoped_refptr<FeedbackCommon>(new FeedbackCommon());
29 } 29 }
30 30
31 virtual ~FeedbackCommonTest() {} 31 ~FeedbackCommonTest() override {}
32 32
33 scoped_refptr<FeedbackCommon> feedback; 33 scoped_refptr<FeedbackCommon> feedback;
34 userfeedback::ExtensionSubmit report; 34 userfeedback::ExtensionSubmit report;
35 }; 35 };
36 36
37 TEST_F(FeedbackCommonTest, TestBasicData) { 37 TEST_F(FeedbackCommonTest, TestBasicData) {
38 // Test that basic data can be set and propagates to the request. 38 // Test that basic data can be set and propagates to the request.
39 feedback->set_category_tag(kOne); 39 feedback->set_category_tag(kOne);
40 feedback->set_description(kTwo); 40 feedback->set_description(kTwo);
41 feedback->set_page_url(kThree); 41 feedback->set_page_url(kThree);
(...skipping 28 matching lines...) Expand all
70 // Add a large and small log, verify that an attachment has been 70 // Add a large and small log, verify that an attachment has been
71 // added with the right name. 71 // added with the right name.
72 feedback->AddLog(kOne, kTwo); 72 feedback->AddLog(kOne, kTwo);
73 feedback->AddLog(kThree, kLongLog); 73 feedback->AddLog(kThree, kLongLog);
74 feedback->CompressLogs(); 74 feedback->CompressLogs();
75 feedback->PrepareReport(&report); 75 feedback->PrepareReport(&report);
76 76
77 EXPECT_EQ(1, report.product_specific_binary_data_size()); 77 EXPECT_EQ(1, report.product_specific_binary_data_size());
78 EXPECT_EQ(kLogsAttachmentName, report.product_specific_binary_data(0).name()); 78 EXPECT_EQ(kLogsAttachmentName, report.product_specific_binary_data(0).name());
79 } 79 }
OLDNEW
« no previous file with comments | « components/error_page/renderer/net_error_helper_core_unittest.cc ('k') | components/feedback/feedback_uploader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698