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

Unified Diff: chrome/browser/extensions/api/dial/dial_apitest.cc

Issue 511943004: Don't set lastError if chrome.dial.discoverNow() can't start. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: chrome/browser/extensions/api/dial/dial_apitest.cc
diff --git a/chrome/browser/extensions/api/dial/dial_apitest.cc b/chrome/browser/extensions/api/dial/dial_apitest.cc
index 7bdb4f18e341674ba8e57444edf47c958a03ac31..b86d59bd813bb78e7ff1d39ed40e89364e222843 100644
--- a/chrome/browser/extensions/api/dial/dial_apitest.cc
+++ b/chrome/browser/extensions/api/dial/dial_apitest.cc
@@ -52,7 +52,6 @@ IN_PROC_BROWSER_TEST_F(DialAPITest, MAYBE_DeviceListEvents) {
ASSERT_TRUE(api.get());
extensions::DialRegistry::DeviceList devices;
-
ResultCatcher catcher;
DialDeviceData device1;
@@ -82,12 +81,17 @@ IN_PROC_BROWSER_TEST_F(DialAPITest, MAYBE_DeviceListEvents) {
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}
-// Test discoverNow fails if there are no listeners. When there are no listeners
-// the DIAL API will not be active.
IN_PROC_BROWSER_TEST_F(DialAPITest, Discovery) {
Wez 2014/08/28 19:59:52 So the Discovery test is now doing discovery _with
mark a. foltz 2014/08/28 20:14:50 Acknowledged.
ASSERT_TRUE(RunExtensionSubtest("dial/experimental", "discovery.html"));
}
+// discoverNow does not do discovery when there are no listeners; in that case
+// the DIAL service will not be active.
+IN_PROC_BROWSER_TEST_F(DialAPITest, DiscoveryNoListeners) {
+ ASSERT_TRUE(RunExtensionSubtest("dial/experimental",
+ "discovery_no_listeners.html"));
+}
+
// Make sure this API is only accessible to whitelisted extensions.
IN_PROC_BROWSER_TEST_F(DialAPITest, NonWhitelistedExtension) {
ResultCatcher catcher;

Powered by Google App Engine
This is Rietveld 408576698