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

Side by Side Diff: chrome/browser/internal_auth_unittest.cc

Issue 10500016: Move test_browser_thread.h from content\test to content\public\test. This way we can enforce that i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/internal_auth.h" 5 #include "chrome/browser/internal_auth.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "content/test/test_browser_thread.h" 12 #include "content/public/test/test_browser_thread.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace browser { 15 namespace browser {
16 16
17 class InternalAuthTest : public ::testing::Test { 17 class InternalAuthTest : public ::testing::Test {
18 public: 18 public:
19 InternalAuthTest() { 19 InternalAuthTest() {
20 long_string_ = "seed"; 20 long_string_ = "seed";
21 for (int i = 20; i--;) 21 for (int i = 20; i--;)
22 long_string_ += long_string_; 22 long_string_ += long_string_;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 token = browser::InternalAuthGeneration::GeneratePassport("zapata", map); 191 token = browser::InternalAuthGeneration::GeneratePassport("zapata", map);
192 ASSERT_GT(token.size(), 10u); 192 ASSERT_GT(token.size(), 10u);
193 for (int i = 20; i--;) 193 for (int i = 20; i--;)
194 browser::InternalAuthGeneration::GenerateNewKey(); 194 browser::InternalAuthGeneration::GenerateNewKey();
195 // Passport should not survive series of key changes. 195 // Passport should not survive series of key changes.
196 ASSERT_FALSE(browser::InternalAuthVerification::VerifyPassport( 196 ASSERT_FALSE(browser::InternalAuthVerification::VerifyPassport(
197 token, "zapata", map)); 197 token, "zapata", map));
198 } 198 }
199 199
200 } // namespace browser 200 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/intents/web_intents_registry_unittest.cc ('k') | chrome/browser/managed_mode_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698