OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/x11_util.h" | 5 #include "app/x11_util.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/ref_counted.h" | 7 #include "base/ref_counted.h" |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 class NotificationTest : public InProcessBrowserTest, | 48 class NotificationTest : public InProcessBrowserTest, |
49 public NotificationObserver { | 49 public NotificationObserver { |
50 public: | 50 public: |
51 NotificationTest() | 51 NotificationTest() |
52 : under_chromeos_(false), | 52 : under_chromeos_(false), |
53 state_(PanelController::INITIAL), | 53 state_(PanelController::INITIAL), |
54 expected_(PanelController::INITIAL) { | 54 expected_(PanelController::INITIAL) { |
55 } | 55 } |
56 | 56 |
57 void HandleDOMUIMessage(const Value* value) { | 57 void HandleDOMUIMessage(const ListValue* value) { |
58 MessageLoop::current()->Quit(); | 58 MessageLoop::current()->Quit(); |
59 } | 59 } |
60 | 60 |
61 protected: | 61 protected: |
62 virtual void SetUp() { | 62 virtual void SetUp() { |
63 // Detect if we're running under ChromeOS WindowManager. See | 63 // Detect if we're running under ChromeOS WindowManager. See |
64 // the description for "under_chromeos_" below for why we need this. | 64 // the description for "under_chromeos_" below for why we need this. |
65 std::string wm_name; | 65 std::string wm_name; |
66 bool wm_name_valid = x11_util::GetWindowManagerName(&wm_name); | 66 bool wm_name_valid = x11_util::GetWindowManagerName(&wm_name); |
67 // NOTE: On Chrome OS the wm and Chrome are started in parallel. This | 67 // NOTE: On Chrome OS the wm and Chrome are started in parallel. This |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 EXPECT_TRUE(collection->AddDOMUIMessageCallback( | 602 EXPECT_TRUE(collection->AddDOMUIMessageCallback( |
603 NewMockNotification("1"), | 603 NewMockNotification("1"), |
604 "test", | 604 "test", |
605 NewCallback( | 605 NewCallback( |
606 static_cast<NotificationTest*>(this), | 606 static_cast<NotificationTest*>(this), |
607 &NotificationTest::HandleDOMUIMessage))); | 607 &NotificationTest::HandleDOMUIMessage))); |
608 MessageLoop::current()->Run(); | 608 MessageLoop::current()->Run(); |
609 } | 609 } |
610 | 610 |
611 } // namespace chromeos | 611 } // namespace chromeos |
OLD | NEW |