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

Unified Diff: extensions/renderer/service_worker_apitest.cc

Issue 1211243010: [Service Worker Registration] Registered extension scheme to allow service workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test Created 5 years, 5 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: extensions/renderer/service_worker_apitest.cc
diff --git a/extensions/renderer/service_worker_apitest.cc b/extensions/renderer/service_worker_apitest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..03e5642265434e96c32537255891f1fd3616abba
--- /dev/null
+++ b/extensions/renderer/service_worker_apitest.cc
@@ -0,0 +1,28 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
Devlin 2015/07/10 21:51:23 nit: no (c)
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/extension_apitest.h"
Devlin 2015/07/10 21:51:23 This would be a layering violation (no chrome/ fil
+
+namespace extensions {
+namespace {
Devlin 2015/07/10 21:51:23 No need to put this in an anonymous namespace (I d
+
+class ServiceWorkerTest : public ExtensionApiTest {
+public:
Devlin 2015/07/10 21:51:23 nit: indentation is off. You can also use "git cl
+ // Set the channel to "trunk" since service workers are restricted to trunk.
+ ServiceWorkerTest()
+ : current_channel_(chrome::VersionInfo::CHANNEL_UNKNOWN) {}
+ ~ServiceWorkerTest() override {}
+
+private:
+ extensions::ScopedCurrentChannel current_channel_;
Devlin 2015/07/10 21:51:23 DISALLOW_COPY_AND_ASSIGN()
+};
+
+// This should fail because there are changes to be made to
+// successfully register a service worker.
+IN_PROC_BROWSER_TEST_F(ServiceWorkerTest, RegisterServiceWorker) {
Devlin 2015/07/10 21:51:23 Let's have two tests, one that checks that service
+ ASSERT_FALSE(RunExtensionTest("service_worker/register")) << message_;
+}
+
+} // namespace
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698