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

Side by Side Diff: third_party/libaddressinput/chromium/cpp/test/retriever_test.cc

Issue 109323011: [rac] Download all rules for a country code in libaddressinput. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a TODO. Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (C) 2013 Google Inc. 1 // Copyright (C) 2013 Google Inc.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 TEST_F(RetrieverTest, RequestsDontStack) { 136 TEST_F(RetrieverTest, RequestsDontStack) {
137 Retriever slow_retriever(FakeDownloader::kFakeDataUrl, 137 Retriever slow_retriever(FakeDownloader::kFakeDataUrl,
138 scoped_ptr<const Downloader>(new HangingDownloader), 138 scoped_ptr<const Downloader>(new HangingDownloader),
139 scoped_ptr<Storage>(new FakeStorage)); 139 scoped_ptr<Storage>(new FakeStorage));
140 140
141 slow_retriever.Retrieve(kKey, BuildCallback()); 141 slow_retriever.Retrieve(kKey, BuildCallback());
142 EXPECT_FALSE(success_); 142 EXPECT_FALSE(success_);
143 EXPECT_TRUE(key_.empty()); 143 EXPECT_TRUE(key_.empty());
144 144
145 #if !defined(NDEBUG) 145 EXPECT_NO_FATAL_FAILURE(slow_retriever.Retrieve(kKey, BuildCallback()));
146 // This request should cause an assert.
147 ASSERT_DEATH(slow_retriever.Retrieve(kKey, BuildCallback()), "");
148 #endif
149 } 146 }
150 147
151 } // namespace 148 } // namespace
152 149
153 } // namespace addressinput 150 } // namespace addressinput
154 } // namespace i18n 151 } // namespace i18n
OLDNEW
« no previous file with comments | « third_party/libaddressinput/chromium/cpp/src/ruleset.cc ('k') | third_party/libaddressinput/libaddressinput.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698