OLD | NEW |
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/ui/gtk/confirm_bubble_gtk.h" | 5 #include "chrome/browser/ui/gtk/confirm_bubble_gtk.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
13 #include "chrome/browser/ui/confirm_bubble_model.h" | 13 #include "chrome/browser/ui/confirm_bubble_model.h" |
14 #include "chrome/test/base/in_process_browser_test.h" | 14 #include "chrome/test/base/in_process_browser_test.h" |
15 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources_standard.h" |
16 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // The model object used in this test. This model implements all methods and | 20 // The model object used in this test. This model implements all methods and |
21 // updates its status when ConfirmBubbleGtk calls its methods. | 21 // updates its status when ConfirmBubbleGtk calls its methods. |
22 class TestConfirmBubbleModel : public ConfirmBubbleModel { | 22 class TestConfirmBubbleModel : public ConfirmBubbleModel { |
23 public: | 23 public: |
24 TestConfirmBubbleModel(bool* model_deleted, | 24 TestConfirmBubbleModel(bool* model_deleted, |
25 bool* accept_clicked, | 25 bool* accept_clicked, |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 IN_PROC_BROWSER_TEST_F(ConfirmBubbleGtkTest, ClickOk) { | 174 IN_PROC_BROWSER_TEST_F(ConfirmBubbleGtkTest, ClickOk) { |
175 ShowBubble(); | 175 ShowBubble(); |
176 bubble()->OnOkButton(NULL); | 176 bubble()->OnOkButton(NULL); |
177 | 177 |
178 EXPECT_TRUE(model_deleted()); | 178 EXPECT_TRUE(model_deleted()); |
179 EXPECT_TRUE(accept_clicked()); | 179 EXPECT_TRUE(accept_clicked()); |
180 EXPECT_FALSE(cancel_clicked()); | 180 EXPECT_FALSE(cancel_clicked()); |
181 EXPECT_FALSE(link_clicked()); | 181 EXPECT_FALSE(link_clicked()); |
182 } | 182 } |
OLD | NEW |