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

Side by Side Diff: chrome/browser/chromeos/login/owner_manager_unittest.cc

Issue 7628006: GTTF: Use a fresh TestingBrowserProcess for each test, part #6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 4 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/chromeos/login/owner_manager.h" 5 #include "chrome/browser/chromeos/login/owner_manager.h"
6 #include "chrome/browser/chromeos/login/owner_manager_unittest.h" 6 #include "chrome/browser/chromeos/login/owner_manager_unittest.h"
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/scoped_temp_dir.h" 13 #include "base/scoped_temp_dir.h"
14 #include "chrome/browser/chromeos/login/mock_owner_key_utils.h" 14 #include "chrome/browser/chromeos/login/mock_owner_key_utils.h"
15 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
16 #include "chrome/test/base/testing_browser_process_test.h"
16 #include "content/browser/browser_thread.h" 17 #include "content/browser/browser_thread.h"
17 #include "crypto/nss_util.h" 18 #include "crypto/nss_util.h"
18 #include "crypto/rsa_private_key.h" 19 #include "crypto/rsa_private_key.h"
19 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
20 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
21 22
22 using ::crypto::RSAPrivateKey; 23 using ::crypto::RSAPrivateKey;
23 using ::testing::DoAll; 24 using ::testing::DoAll;
24 using ::testing::Eq; 25 using ::testing::Eq;
25 using ::testing::Invoke; 26 using ::testing::Invoke;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 DCHECK_EQ(expected_code_, return_code); 112 DCHECK_EQ(expected_code_, return_code);
112 for (uint32 i = 0; i < payload.size(); ++i) 113 for (uint32 i = 0; i < payload.size(); ++i)
113 DCHECK_EQ(expected_sig_[i], payload[i]); 114 DCHECK_EQ(expected_sig_[i], payload[i]);
114 if (event_) 115 if (event_)
115 event_->Signal(); 116 event_->Signal();
116 } 117 }
117 118
118 //////////////////////////////////////////////////////////////////////////////// 119 ////////////////////////////////////////////////////////////////////////////////
119 // OwnerManagerTest 120 // OwnerManagerTest
120 121
121 class OwnerManagerTest : public ::testing::Test { 122 class OwnerManagerTest : public TestingBrowserProcessTest {
122 public: 123 public:
123 OwnerManagerTest() 124 OwnerManagerTest()
124 : message_loop_(MessageLoop::TYPE_UI), 125 : message_loop_(MessageLoop::TYPE_UI),
125 ui_thread_(BrowserThread::UI, &message_loop_), 126 ui_thread_(BrowserThread::UI, &message_loop_),
126 file_thread_(BrowserThread::FILE), 127 file_thread_(BrowserThread::FILE),
127 mock_(new MockKeyUtils), 128 mock_(new MockKeyUtils),
128 injector_(mock_) /* injector_ takes ownership of mock_ */ { 129 injector_(mock_) /* injector_ takes ownership of mock_ */ {
129 } 130 }
130 virtual ~OwnerManagerTest() {} 131 virtual ~OwnerManagerTest() {}
131 132
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 NewRunnableMethod(manager.get(), 356 NewRunnableMethod(manager.get(),
356 &OwnerManager::Sign, 357 &OwnerManager::Sign,
357 BrowserThread::UI, 358 BrowserThread::UI,
358 data, 359 data,
359 &delegate)); 360 &delegate));
360 while (!event.IsSignaled()) 361 while (!event.IsSignaled())
361 message_loop_.RunAllPending(); 362 message_loop_.RunAllPending();
362 } 363 }
363 364
364 } // namespace chromeos 365 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/online_attempt_unittest.cc ('k') | chrome/browser/chromeos/login/ownership_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698