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

Side by Side Diff: base/message_loop_unittest.cc

Issue 10546083: Convert ProtocolHandlerRegistry to be a ProfileKeyedService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge with upstream. Created 8 years, 5 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
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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/eintr_wrapper.h" 10 #include "base/eintr_wrapper.h"
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 // Post quit task; 2047 // Post quit task;
2048 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( 2048 MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
2049 &MessageLoop::Quit, base::Unretained(MessageLoop::current()))); 2049 &MessageLoop::Quit, base::Unretained(MessageLoop::current())));
2050 2050
2051 // Now kick things off 2051 // Now kick things off
2052 MessageLoop::current()->Run(); 2052 MessageLoop::current()->Run();
2053 2053
2054 EXPECT_EQ(foo->test_count(), 1); 2054 EXPECT_EQ(foo->test_count(), 1);
2055 EXPECT_EQ(foo->result(), "a"); 2055 EXPECT_EQ(foo->result(), "a");
2056 } 2056 }
2057
2058 TEST(MessageLoopTest, IsType) {
2059 MessageLoop loop(MessageLoop::TYPE_UI);
2060 EXPECT_TRUE(loop.IsType(MessageLoop::TYPE_UI));
2061 EXPECT_FALSE(loop.IsType(MessageLoop::TYPE_IO));
2062 EXPECT_FALSE(loop.IsType(MessageLoop::TYPE_DEFAULT));
2063 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698