OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/metrics/user_metrics.h" | 9 #include "base/metrics/user_metrics.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 action_callback_ = | 57 action_callback_ = |
58 base::Bind(&NativeAppNavigationControllerTest::OnUserAction, | 58 base::Bind(&NativeAppNavigationControllerTest::OnUserAction, |
59 base::Unretained(this)); | 59 base::Unretained(this)); |
60 base::AddActionCallback(action_callback_); | 60 base::AddActionCallback(action_callback_); |
61 | 61 |
62 handler_called_counter_ = 0; | 62 handler_called_counter_ = 0; |
63 } | 63 } |
64 | 64 |
65 void TearDown() override { | 65 void TearDown() override { |
66 base::RemoveActionCallback(action_callback_); | 66 base::RemoveActionCallback(action_callback_); |
| 67 controller_ = nil; |
67 ChromeWebTest::TearDown(); | 68 ChromeWebTest::TearDown(); |
68 } | 69 } |
69 | 70 |
70 void SetExpectedActionName(const std::string& action_name) { | 71 void SetExpectedActionName(const std::string& action_name) { |
71 expected_action_name_.reset(new std::string(action_name)); | 72 expected_action_name_.reset(new std::string(action_name)); |
72 } | 73 } |
73 | 74 |
74 void OnUserAction(const std::string& action_name) { | 75 void OnUserAction(const std::string& action_name) { |
75 EXPECT_EQ(*expected_action_name_, action_name); | 76 EXPECT_EQ(*expected_action_name_, action_name); |
76 handler_called_counter_++; | 77 handler_called_counter_++; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 2); | 199 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 2); |
199 [fakeManager setAppScheme:kMapsAppName]; | 200 [fakeManager setAppScheme:kMapsAppName]; |
200 [controller_ removeAppFromNotification:notificationMaps]; | 201 [controller_ removeAppFromNotification:notificationMaps]; |
201 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 1); | 202 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 1); |
202 [fakeManager setAppScheme:kYoutubeAppName]; | 203 [fakeManager setAppScheme:kYoutubeAppName]; |
203 [controller_ removeAppFromNotification:notificationYouTube]; | 204 [controller_ removeAppFromNotification:notificationYouTube]; |
204 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 0); | 205 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 0); |
205 } | 206 } |
206 | 207 |
207 } // namespace | 208 } // namespace |
OLD | NEW |