| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/values.h" | 5 #include "base/values.h" |
| 6 #include "components/physical_web/data_source/physical_web_data_source_impl.h" | 6 #include "components/physical_web/data_source/physical_web_data_source_impl.h" |
| 7 #include "components/physical_web/data_source/physical_web_listener.h" | 7 #include "components/physical_web/data_source/physical_web_listener.h" |
| 8 | 8 |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 148 } |
| 149 | 149 |
| 150 TEST_F(PhysicalWebDataSourceImplTest, OnDistanceChangedNotRegistered) { | 150 TEST_F(PhysicalWebDataSourceImplTest, OnDistanceChangedNotRegistered) { |
| 151 data_source_.UnregisterListener(&listener_); | 151 data_source_.UnregisterListener(&listener_); |
| 152 data_source_.NotifyOnDistanceChanged(kUrl, 0.0); | 152 data_source_.NotifyOnDistanceChanged(kUrl, 0.0); |
| 153 EXPECT_FALSE(listener_.OnFoundNotified()); | 153 EXPECT_FALSE(listener_.OnFoundNotified()); |
| 154 EXPECT_FALSE(listener_.OnLostNotified()); | 154 EXPECT_FALSE(listener_.OnLostNotified()); |
| 155 EXPECT_FALSE(listener_.OnDistanceChangedNotified()); | 155 EXPECT_FALSE(listener_.OnDistanceChangedNotified()); |
| 156 EXPECT_TRUE(listener_.LastEventUrl().empty()); | 156 EXPECT_TRUE(listener_.LastEventUrl().empty()); |
| 157 } | 157 } |
| 158 |
| 158 } // namespace physical_web | 159 } // namespace physical_web |
| OLD | NEW |