| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/in_process_webkit/webkit_thread.h" | 5 #include "chrome/browser/in_process_webkit/webkit_thread.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
| 7 | 7 |
| 8 // This is important because if there are 2 different message loops, we must | 8 // TODO(jorlow): Write some tests. http://crbug.com/16155 |
| 9 // have 2 different WebKit threads which would be very bad. | |
| 10 TEST(WebKitThreadTest, TwoThreadsShareMessageLoopTest) { | |
| 11 scoped_refptr<WebKitThread> thread_a = new WebKitThread; | |
| 12 scoped_refptr<WebKitThread> thread_b = new WebKitThread; | |
| 13 MessageLoop* loop_a = thread_a->GetMessageLoop(); | |
| 14 MessageLoop* loop_b = thread_b->GetMessageLoop(); | |
| 15 ASSERT_FALSE(loop_a == NULL); | |
| 16 ASSERT_EQ(loop_a, loop_b); | |
| 17 } | |
| OLD | NEW |