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

Side by Side Diff: chrome/browser/managed_mode_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/managed_mode.h" 5 #include "chrome/browser/managed_mode.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "chrome/browser/managed_mode.h" 13 #include "chrome/browser/managed_mode.h"
14 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/test/base/test_browser_window.h" 15 #include "chrome/test/base/test_browser_window.h"
16 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
17 #include "content/test/test_browser_thread.h" 17 #include "content/public/test/test_browser_thread.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
20 20
21 using ::testing::StrictMock; 21 using ::testing::StrictMock;
22 22
23 namespace { 23 namespace {
24 24
25 class FakeManagedMode : public ManagedMode { 25 class FakeManagedMode : public ManagedMode {
26 public: 26 public:
27 FakeManagedMode() : in_managed_mode_(false), should_cancel_enter_(false) { 27 FakeManagedMode() : in_managed_mode_(false), should_cancel_enter_(false) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 TEST_F(ManagedModeTest, Cancelled) { 222 TEST_F(ManagedModeTest, Cancelled) {
223 BrowserFixture managed_mode_browser(&managed_mode_, &managed_mode_profile_); 223 BrowserFixture managed_mode_browser(&managed_mode_, &managed_mode_profile_);
224 BrowserFixture other_browser(&managed_mode_, &other_profile_); 224 BrowserFixture other_browser(&managed_mode_, &other_profile_);
225 225
226 // If the user cancelled entering managed mode, it should fail immediately. 226 // If the user cancelled entering managed mode, it should fail immediately.
227 managed_mode_.set_should_cancel_enter(true); 227 managed_mode_.set_should_cancel_enter(true);
228 managed_mode_.EnterManagedModeForTesting(&managed_mode_profile_, 228 managed_mode_.EnterManagedModeForTesting(&managed_mode_profile_,
229 CreateExpectedCallback(false)); 229 CreateExpectedCallback(false));
230 } 230 }
OLDNEW
« no previous file with comments | « chrome/browser/internal_auth_unittest.cc ('k') | chrome/browser/media/media_internals_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698