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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/json/json_reader.h" | 6 #include "base/json/json_reader.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 void ExpectTitle(const std::string& expected_title) const { | 168 void ExpectTitle(const std::string& expected_title) const { |
169 base::string16 expected_title16(base::ASCIIToUTF16(expected_title)); | 169 base::string16 expected_title16(base::ASCIIToUTF16(expected_title)); |
170 TitleWatcher title_watcher(shell()->web_contents(), expected_title16); | 170 TitleWatcher title_watcher(shell()->web_contents(), expected_title16); |
171 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); | 171 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); |
172 } | 172 } |
173 | 173 |
174 // Execute the javascript of addPeerConnection. | 174 // Execute the javascript of addPeerConnection. |
175 void ExecuteAddPeerConnectionJs(const PeerConnectionEntry& pc) { | 175 void ExecuteAddPeerConnectionJs(const PeerConnectionEntry& pc) { |
176 std::stringstream ss; | 176 std::stringstream ss; |
177 ss << "{pid:" << pc.pid_ <<", lid:" << pc.lid_ << ", " << | 177 ss << "{pid:" << pc.pid_ <<", lid:" << pc.lid_ << ", " << |
178 "url:'u', servers:'s', constraints:'c'}"; | 178 "url:'u', rtcConfiguration:'s', constraints:'c'}"; |
179 ASSERT_TRUE(ExecuteJavascript("addPeerConnection(" + ss.str() + ");")); | 179 ASSERT_TRUE(ExecuteJavascript("addPeerConnection(" + ss.str() + ");")); |
180 } | 180 } |
181 | 181 |
182 // Execute the javascript of removePeerConnection. | 182 // Execute the javascript of removePeerConnection. |
183 void ExecuteRemovePeerConnectionJs(const PeerConnectionEntry& pc) { | 183 void ExecuteRemovePeerConnectionJs(const PeerConnectionEntry& pc) { |
184 std::stringstream ss; | 184 std::stringstream ss; |
185 ss << "{pid:" << pc.pid_ <<", lid:" << pc.lid_ << "}"; | 185 ss << "{pid:" << pc.pid_ <<", lid:" << pc.lid_ << "}"; |
186 | 186 |
187 ASSERT_TRUE(ExecuteJavascript("removePeerConnection(" + ss.str() + ");")); | 187 ASSERT_TRUE(ExecuteJavascript("removePeerConnection(" + ss.str() + ");")); |
188 } | 188 } |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 ASSERT_TRUE(ExecuteScriptAndExtractInt( | 874 ASSERT_TRUE(ExecuteScriptAndExtractInt( |
875 shell()->web_contents(), | 875 shell()->web_contents(), |
876 "window.domAutomationController.send(" | 876 "window.domAutomationController.send(" |
877 " peerConnectionDataStore['" + pc.getIdString() + "']" + | 877 " peerConnectionDataStore['" + pc.getIdString() + "']" + |
878 " .getDataSeries('" + data_series_id + "').getCount())", | 878 " .getDataSeries('" + data_series_id + "').getCount())", |
879 &count)); | 879 &count)); |
880 EXPECT_EQ(3, count); | 880 EXPECT_EQ(3, count); |
881 } | 881 } |
882 | 882 |
883 } // namespace content | 883 } // namespace content |
OLD | NEW |