OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 // Unit tests for |FeedbackSender| object. | 5 // Unit tests for |FeedbackSender| object. |
6 | 6 |
7 #include "chrome/browser/spellchecker/feedback_sender.h" | 7 #include "chrome/browser/spellchecker/feedback_sender.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 67 } |
68 | 68 |
69 ~FeedbackSenderTest() override {} | 69 ~FeedbackSenderTest() override {} |
70 | 70 |
71 protected: | 71 protected: |
72 // Appends the "--enable-spelling-service-feedback" switch to the | 72 // Appends the "--enable-spelling-service-feedback" switch to the |
73 // command-line. | 73 // command-line. |
74 void AppendCommandLineSwitch() { | 74 void AppendCommandLineSwitch() { |
75 // The command-line switch is temporary. | 75 // The command-line switch is temporary. |
76 // TODO(rouslan): Remove the command-line switch. http://crbug.com/247726 | 76 // TODO(rouslan): Remove the command-line switch. http://crbug.com/247726 |
77 CommandLine::ForCurrentProcess()->AppendSwitch( | 77 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
78 switches::kEnableSpellingFeedbackFieldTrial); | 78 switches::kEnableSpellingFeedbackFieldTrial); |
79 feedback_.reset(new FeedbackSender(NULL, kLanguage, kCountry)); | 79 feedback_.reset(new FeedbackSender(NULL, kLanguage, kCountry)); |
80 feedback_->StartFeedbackCollection(); | 80 feedback_->StartFeedbackCollection(); |
81 } | 81 } |
82 | 82 |
83 // Enables the "SpellingServiceFeedback.Enabled" field trial. | 83 // Enables the "SpellingServiceFeedback.Enabled" field trial. |
84 void EnableFieldTrial() { | 84 void EnableFieldTrial() { |
85 // The field trial is temporary. | 85 // The field trial is temporary. |
86 // TODO(rouslan): Remove the field trial. http://crbug.com/247726 | 86 // TODO(rouslan): Remove the field trial. http://crbug.com/247726 |
87 field_trial_list_.reset( | 87 field_trial_list_.reset( |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 AddPendingFeedback(); | 615 AddPendingFeedback(); |
616 feedback_->OnReceiveDocumentMarkers(kRendererProcessId, | 616 feedback_->OnReceiveDocumentMarkers(kRendererProcessId, |
617 std::vector<uint32>()); | 617 std::vector<uint32>()); |
618 feedback_->StartFeedbackCollection(); | 618 feedback_->StartFeedbackCollection(); |
619 feedback_->OnReceiveDocumentMarkers(kRendererProcessId, | 619 feedback_->OnReceiveDocumentMarkers(kRendererProcessId, |
620 std::vector<uint32>()); | 620 std::vector<uint32>()); |
621 EXPECT_FALSE(IsUploadingData()); | 621 EXPECT_FALSE(IsUploadingData()); |
622 } | 622 } |
623 | 623 |
624 } // namespace spellcheck | 624 } // namespace spellcheck |
OLD | NEW |