Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5216)

Unified Diff: chrome/test/data/extensions/hangout_services_test.html

Issue 59113003: Add a browser test to automatically run end-to-end Hangout Services test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix getSinks test for platforms with no audio sinks. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/hangout_services_test.html
diff --git a/chrome/test/data/extensions/hangout_services_test.html b/chrome/test/data/extensions/hangout_services_test.html
index 90c128c9b678246790f8a49c1360ac8867bb88ce..ed1fcc57e422686fc584fc4b0a4cffecec00ef5c 100644
--- a/chrome/test/data/extensions/hangout_services_test.html
+++ b/chrome/test/data/extensions/hangout_services_test.html
@@ -13,7 +13,8 @@ the Hangout Services component extension and the APIs it uses.
</script>
<script>
//
-// UI glue, leaving in HTML file with the UI elements it is using.
+// UI glue and other code that needs to use the document. Leaving in
+// HTML file with the UI elements it is using.
//
// Populates UI elements with initial contents.
@@ -69,6 +70,39 @@ function getAssociatedDeviceFromSelection() {
alert('Associated sink ID: ' + sinkId);
});
}
+
+//
+// Manual tests.
+//
+
+function manualTestChooseDesktopMedia() {
+ chooseDesktopMedia(function(results) {
+ alert('Cancel ID: ' + results.cancelId +
+ ', stream ID: ' + results.streamId);
+ });
+}
+
+function manualTestListenForSinksChangedEvent() {
+ listenForSinksChangedEvent(function(msg) {
+ if (msg['eventName'] && msg['eventName'] == 'onSinksChanged')
+ alert('Got onSinksChanged event.');
+ });
+}
+
+// Browser test scaffolding. Starts the test run from a browser
+// test. Sets the document title to 'success' or 'failure' when the
+// test completes.
+function browsertestRunAllTests() {
+ runAllTests(function(results) {
+ if (results == '') {
+ document.title = 'success';
+ } else {
+ console.log('Test failed:');
+ console.log(results);
+ document.title = 'failure';
+ }
+ });
+}
</script>
</head>
<body onload="populate()">

Powered by Google App Engine
This is Rietveld 408576698