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

Unified Diff: chrome/test/data/webui/local_discovery_ui_test.js

Issue 20070002: Demo UI for device discovery and registration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added FILE_PATH_LITERAL macro to fix windows compile problem Created 7 years, 4 months 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/local_discovery_ui_test.js
diff --git a/chrome/test/data/webui/local_discovery_ui_test.js b/chrome/test/data/webui/local_discovery_ui_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..7d9e6a5c3ee5e490f87ff51ebf0b14910d266aa9
--- /dev/null
+++ b/chrome/test/data/webui/local_discovery_ui_test.js
@@ -0,0 +1,36 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function tableRows() {
+ return document.querySelectorAll('#devices-table tr');
+}
+
+function checkTableHasOneRow() {
+ var rows = tableRows();
+ assertEquals(2, rows.length);
+ var firstRow = rows.item(1);
+
+ var td = firstRow.firstChild;
+ assertEquals('myService._privet._tcp.local', td.textContent);
+
+ td = td.nextSibling;
+ assertEquals('myservice.local', td.textContent);
+
+ td = td.nextSibling;
+ assertEquals('8888', td.textContent);
+
+ td = td.nextSibling;
+ assertEquals('1.2.3.4', td.textContent);
+
+ td = td.nextSibling;
+ assertEquals('unknown', td.textContent);
+
+ td = td.nextSibling;
+ assertEquals('Registered', td.textContent);
+}
+
+function checkTableHasNoRows() {
+ var rows = tableRows();
+ assertEquals(1, rows.length);
+}
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698