| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 condition_devices_listed().Wait(); | 163 condition_devices_listed().Wait(); |
| 164 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("checkNoDevices")); | 164 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("checkNoDevices")); |
| 165 } | 165 } |
| 166 | 166 |
| 167 IN_PROC_BROWSER_TEST_F(LocalDiscoveryUITest, AddRowTest) { | 167 IN_PROC_BROWSER_TEST_F(LocalDiscoveryUITest, AddRowTest) { |
| 168 ui_test_utils::NavigateToURL(browser(), GURL( | 168 ui_test_utils::NavigateToURL(browser(), GURL( |
| 169 chrome::kChromeUIDevicesFrameURL)); | 169 chrome::kChromeUIDevicesFrameURL)); |
| 170 condition_devices_listed().Wait(); | 170 condition_devices_listed().Wait(); |
| 171 DeviceDescription description; | 171 DeviceDescription description; |
| 172 | 172 |
| 173 description.id = kSampleDeviceID; | |
| 174 description.name = "Sample device"; | 173 description.name = "Sample device"; |
| 175 description.description = "Sample device description"; | 174 description.description = "Sample device description"; |
| 176 | 175 |
| 177 ui_factory()->privet_lister()->delegate()->DeviceChanged( | 176 ui_factory()->privet_lister()->delegate()->DeviceChanged( |
| 178 true, kSampleServiceName, description); | 177 true, kSampleServiceName, description); |
| 179 | 178 |
| 180 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("checkOneDevice")); | 179 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("checkOneDevice")); |
| 181 | 180 |
| 182 ui_factory()->privet_lister()->delegate()->DeviceRemoved( | 181 ui_factory()->privet_lister()->delegate()->DeviceRemoved( |
| 183 kSampleServiceName); | 182 kSampleServiceName); |
| 184 | 183 |
| 185 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("checkNoDevices")); | 184 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("checkNoDevices")); |
| 186 } | 185 } |
| 187 | 186 |
| 188 } // namespace | 187 } // namespace |
| 189 | 188 |
| 190 } // namespace local_discovery | 189 } // namespace local_discovery |
| OLD | NEW |