OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <map> | 5 #include <map> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 virtual void Close(bool by_user) override { | 77 virtual void Close(bool by_user) override { |
78 log_ += "Close_"; | 78 log_ += "Close_"; |
79 log_ += ( by_user ? "by_user_" : "programmatically_"); | 79 log_ += ( by_user ? "by_user_" : "programmatically_"); |
80 } | 80 } |
81 virtual void Click() override { log_ += "Click_"; } | 81 virtual void Click() override { log_ += "Click_"; } |
82 virtual void ButtonClick(int button_index) override { | 82 virtual void ButtonClick(int button_index) override { |
83 log_ += "ButtonClick_"; | 83 log_ += "ButtonClick_"; |
84 log_ += base::IntToString(button_index) + "_"; | 84 log_ += base::IntToString(button_index) + "_"; |
85 } | 85 } |
86 virtual std::string id() const override { return id_; } | 86 virtual std::string id() const override { return id_; } |
87 virtual content::WebContents* GetWebContents() const override { | |
88 return NULL; | |
89 } | |
90 | 87 |
91 const std::string& log() { return log_; } | 88 const std::string& log() { return log_; } |
92 | 89 |
93 private: | 90 private: |
94 virtual ~TestDelegate() {} | 91 virtual ~TestDelegate() {} |
95 std::string id_; | 92 std::string id_; |
96 std::string log_; | 93 std::string log_; |
97 | 94 |
98 DISALLOW_COPY_AND_ASSIGN(TestDelegate); | 95 DISALLOW_COPY_AND_ASSIGN(TestDelegate); |
99 }; | 96 }; |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 manager()->Update(notification, profile()); | 351 manager()->Update(notification, profile()); |
355 | 352 |
356 // Expect that the progress notification update is performed. | 353 // Expect that the progress notification update is performed. |
357 EXPECT_EQ(base::StringPrintf("update-%s", notification_id.c_str()), | 354 EXPECT_EQ(base::StringPrintf("update-%s", notification_id.c_str()), |
358 observer.log(notification_id)); | 355 observer.log(notification_id)); |
359 | 356 |
360 delegate->Release(); | 357 delegate->Release(); |
361 } | 358 } |
362 | 359 |
363 #endif // !defined(OS_MACOSX) | 360 #endif // !defined(OS_MACOSX) |
OLD | NEW |