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

Unified Diff: remoting/test/app_remoting_report_issue_request_unittest.cc

Issue 1357973002: Removing Test and Staging environments from App Remoting Test Driver tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing unittest Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/test/app_remoting_service_urls.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/app_remoting_report_issue_request_unittest.cc
diff --git a/remoting/test/app_remoting_report_issue_request_unittest.cc b/remoting/test/app_remoting_report_issue_request_unittest.cc
index 8a263221cd36072a6b24fea9a0d206ad7ecb3f7f..245988b15c9726a037693ea8af385e83f49cf470 100644
--- a/remoting/test/app_remoting_report_issue_request_unittest.cc
+++ b/remoting/test/app_remoting_report_issue_request_unittest.cc
@@ -43,8 +43,6 @@ class AppRemotingReportIssueRequestTest : public ::testing::Test {
// Used for result verification.
std::string dev_service_environment_url_;
- std::string test_service_environment_url_;
- std::string staging_service_environment_url_;
scoped_ptr<base::RunLoop> run_loop_;
scoped_ptr<base::Timer> timer_;
@@ -73,16 +71,6 @@ void AppRemotingReportIssueRequestTest::SetUp() {
GetReportIssueUrl(kTestApplicationId, kTestHostId, kDeveloperEnvironment);
SetFakeResponse(GURL(dev_service_environment_url_), kReportIssueResponse,
net::HTTP_NOT_FOUND, net::URLRequestStatus::FAILED);
-
- test_service_environment_url_ =
- GetReportIssueUrl(kTestApplicationId, kTestHostId, kTestingEnvironment);
- SetFakeResponse(GURL(test_service_environment_url_), kReportIssueResponse,
- net::HTTP_NOT_FOUND, net::URLRequestStatus::FAILED);
-
- staging_service_environment_url_ =
- GetReportIssueUrl(kTestApplicationId, kTestHostId, kStagingEnvironment);
- SetFakeResponse(GURL(staging_service_environment_url_), kReportIssueResponse,
- net::HTTP_NOT_FOUND, net::URLRequestStatus::FAILED);
}
void AppRemotingReportIssueRequestTest::SetFakeResponse(
@@ -112,44 +100,6 @@ TEST_F(AppRemotingReportIssueRequestTest, ReportIssueFromDev) {
timer_->Stop();
}
-TEST_F(AppRemotingReportIssueRequestTest, ReportIssueFromTest) {
- SetFakeResponse(GURL(test_service_environment_url_), kReportIssueResponse,
- net::HTTP_OK, net::URLRequestStatus::SUCCESS);
-
- timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(1),
- run_loop_->QuitClosure());
-
- bool request_started = app_remoting_report_issue_request_.Start(
- kTestApplicationId, kTestHostId, kAccessTokenValue, kTestingEnvironment,
- true, run_loop_->QuitClosure());
- EXPECT_TRUE(request_started);
-
- run_loop_->Run();
-
- // Verify we stopped because of the request completing and not the timer.
- EXPECT_TRUE(timer_->IsRunning());
- timer_->Stop();
-}
-
-TEST_F(AppRemotingReportIssueRequestTest, ReportIssueFromStaging) {
- SetFakeResponse(GURL(staging_service_environment_url_), kReportIssueResponse,
- net::HTTP_OK, net::URLRequestStatus::SUCCESS);
-
- timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(1),
- run_loop_->QuitClosure());
-
- bool request_started = app_remoting_report_issue_request_.Start(
- kTestApplicationId, kTestHostId, kAccessTokenValue, kStagingEnvironment,
- true, run_loop_->QuitClosure());
- EXPECT_TRUE(request_started);
-
- run_loop_->Run();
-
- // Verify we stopped because of the request completing and not the timer.
- EXPECT_TRUE(timer_->IsRunning());
- timer_->Stop();
-}
-
TEST_F(AppRemotingReportIssueRequestTest, ReportIssueFromInvalidEnvironment) {
bool request_started = app_remoting_report_issue_request_.Start(
kTestApplicationId, kTestHostId, kAccessTokenValue, kUnknownEnvironment,
@@ -163,7 +113,7 @@ TEST_F(AppRemotingReportIssueRequestTest, ReportIssueNetworkError) {
run_loop_->QuitClosure());
bool request_started = app_remoting_report_issue_request_.Start(
- kTestApplicationId, kTestHostId, kAccessTokenValue, kStagingEnvironment,
+ kTestApplicationId, kTestHostId, kAccessTokenValue, kDeveloperEnvironment,
true, run_loop_->QuitClosure());
EXPECT_TRUE(request_started);
@@ -175,14 +125,14 @@ TEST_F(AppRemotingReportIssueRequestTest, ReportIssueNetworkError) {
}
TEST_F(AppRemotingReportIssueRequestTest, MultipleRequestsCanBeIssued) {
- SetFakeResponse(GURL(staging_service_environment_url_), kReportIssueResponse,
+ SetFakeResponse(GURL(dev_service_environment_url_), kReportIssueResponse,
net::HTTP_OK, net::URLRequestStatus::SUCCESS);
timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(1),
run_loop_->QuitClosure());
bool request_started = app_remoting_report_issue_request_.Start(
- kTestApplicationId, kTestHostId, kAccessTokenValue, kStagingEnvironment,
+ kTestApplicationId, kTestHostId, kAccessTokenValue, kDeveloperEnvironment,
true, run_loop_->QuitClosure());
EXPECT_TRUE(request_started);
@@ -197,7 +147,7 @@ TEST_F(AppRemotingReportIssueRequestTest, MultipleRequestsCanBeIssued) {
run_loop_->QuitClosure());
request_started = app_remoting_report_issue_request_.Start(
- kTestApplicationId, kTestHostId, kAccessTokenValue, kStagingEnvironment,
+ kTestApplicationId, kTestHostId, kAccessTokenValue, kDeveloperEnvironment,
true, run_loop_->QuitClosure());
EXPECT_TRUE(request_started);
@@ -212,7 +162,7 @@ TEST_F(AppRemotingReportIssueRequestTest, MultipleRequestsCanBeIssued) {
run_loop_->QuitClosure());
request_started = app_remoting_report_issue_request_.Start(
- kTestApplicationId, kTestHostId, kAccessTokenValue, kStagingEnvironment,
+ kTestApplicationId, kTestHostId, kAccessTokenValue, kDeveloperEnvironment,
true, run_loop_->QuitClosure());
EXPECT_TRUE(request_started);
« no previous file with comments | « no previous file | remoting/test/app_remoting_service_urls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698