Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/test/media_router/media_router_integration_browsertest.h" | 5 #include "chrome/test/media_router/media_router_integration_browsertest.h" |
| 6 | 6 |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 10 #include "content/public/test/browser_test_utils.h" | 10 #include "content/public/test/browser_test_utils.h" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 "domAutomationController.send(window.document.getElementById(" | 25 "domAutomationController.send(window.document.getElementById(" |
| 26 "'media-router-container').sinkList.length)"); | 26 "'media-router-container').sinkList.length)"); |
| 27 ASSERT_EQ(2, ExecuteScriptAndExtractInt(dialog_contents, script)); | 27 ASSERT_EQ(2, ExecuteScriptAndExtractInt(dialog_contents, script)); |
| 28 | 28 |
| 29 ChooseSink(web_contents, "id1", ""); | 29 ChooseSink(web_contents, "id1", ""); |
| 30 WaitUntilRouteCreated(); | 30 WaitUntilRouteCreated(); |
| 31 | 31 |
| 32 // Verify the new route. | 32 // Verify the new route. |
| 33 script = base::StringPrintf( | 33 script = base::StringPrintf( |
| 34 "domAutomationController.send(window.document.getElementById(" | 34 "domAutomationController.send(window.document.getElementById(" |
| 35 "'media-router-container').routeList[0].title)"); | 35 "'media-router-container').routeList[0].description)"); |
| 36 std::string route_title = ExecuteScriptAndExtractString( | 36 std::string route_title = ExecuteScriptAndExtractString( |
|
apacible
2015/09/08 23:48:53
Update title to description here and below, for co
Lei Lei
2015/09/08 23:55:03
Done.
| |
| 37 dialog_contents, script); | 37 dialog_contents, script); |
| 38 ASSERT_EQ("Test Route", route_title); | 38 ASSERT_EQ("Test Route", route_title); |
| 39 | 39 |
| 40 script = base::StringPrintf( | 40 script = base::StringPrintf( |
| 41 "domAutomationController.send(window.document.getElementById(" | 41 "domAutomationController.send(window.document.getElementById(" |
| 42 "'media-router-container').routeList[0].id)"); | 42 "'media-router-container').routeList[0].id)"); |
| 43 std::string route_id = ExecuteScriptAndExtractString(dialog_contents, script); | 43 std::string route_id = ExecuteScriptAndExtractString(dialog_contents, script); |
| 44 std::string current_route = base::StringPrintf( | 44 std::string current_route = base::StringPrintf( |
| 45 "{'id': '%s', 'sinkId': '%s', 'title': '%s', 'isLocal': '%s'}", | 45 "{'id': '%s', 'sinkId': '%s', 'title': '%s', 'isLocal': '%s'}", |
| 46 route_id.c_str(), "id1", route_title.c_str(), "false"); | 46 route_id.c_str(), "id1", route_title.c_str(), "false"); |
| 47 | 47 |
| 48 ChooseSink(web_contents, "id1", current_route); | 48 ChooseSink(web_contents, "id1", current_route); |
| 49 // TODO(leilei): Verify the router details dialog, including the title and | 49 // TODO(leilei): Verify the router details dialog, including the title and |
| 50 // the text, also close the route. | 50 // the text, also close the route. |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace media_router | 53 } // namespace media_router |
| OLD | NEW |